[fortran] Remove workaround introduced because of PR80945

Message ID 60f8791a-aca6-4c3e-bd90-a0a4bda8670d@netcologne.de
State New
Headers show
Series
  • [fortran] Remove workaround introduced because of PR80945
Related show

Commit Message

Thomas Koenig Feb. 18, 2018, 4:17 p.m.
Hello world,

after Paul's fix for PR80945, the code in frontend-passes.c meant
to circumvent this bug is no longer needed. The attached patch
removes it, adding a test case which shows that the optimization
is working.

After this, I think we can finally lay PR 35339 to rest.

Regression-tested. OK for trunk?

Regards

	Thomas

2018-02-18  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/35339
         * frontend-passes.c (traverse_io_block): Remove workaround for
         PR 80945.

2018-02-18  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/35339
         * gfortran.dg/implied_do_io_4.f90: New test.

Comments

Paul Richard Thomas Feb. 19, 2018, 12:33 p.m. | #1
Hi Thomas,

I have tested this with the new version of the patch for PR83344 - it
is OK for trunk.

Thanks

Paul


On 18 February 2018 at 16:17, Thomas Koenig <tkoenig@netcologne.de> wrote:
> Hello world,

>

> after Paul's fix for PR80945, the code in frontend-passes.c meant

> to circumvent this bug is no longer needed. The attached patch

> removes it, adding a test case which shows that the optimization

> is working.

>

> After this, I think we can finally lay PR 35339 to rest.

>

> Regression-tested. OK for trunk?

>

> Regards

>

>         Thomas

>

> 2018-02-18  Thomas Koenig  <tkoenig@gcc.gnu.org>

>

>         PR fortran/35339

>         * frontend-passes.c (traverse_io_block): Remove workaround for

>         PR 80945.

>

> 2018-02-18  Thomas Koenig  <tkoenig@gcc.gnu.org>

>

>         PR fortran/35339

>         * gfortran.dg/implied_do_io_4.f90: New test.




-- 
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein

Patch

Index: frontend-passes.c
===================================================================
--- frontend-passes.c	(Revision 257788)
+++ frontend-passes.c	(Arbeitskopie)
@@ -1162,14 +1162,7 @@  traverse_io_block (gfc_code *code, bool *has_reach
 
   gcc_assert (curr->op == EXEC_TRANSFER);
 
-  /* FIXME: Workaround for PR 80945 - array slices with deferred character
-     lenghts do not work.  Remove this section when the PR is fixed.  */
   e = curr->expr1;
-  if (e->expr_type == EXPR_VARIABLE && e->ts.type == BT_CHARACTER
-      && e->ts.deferred)
-    return false;
-  /* End of section to be removed.  */
-
   ref = e->ref;
   if (!ref || ref->type != REF_ARRAY || ref->u.ar.codimen != 0 || ref->next)
     return false;