This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, fortran] Fix PR 50327, regression in DO WHILE


Thomas Koenig wrote:
the attached patch fixes the PR by transforming

  DO WHILE (condition)
    ...
  END DO

into the equvialent

  DO WHILE(.true.)
    IF (.not. condition) exit
    ...
  END DO

before applying common function elimination.

Which matches what the current code in trans*.c already does (cf. dump in the PR).


OK for trunk?

OK. Thanks for the patch!


Tobias

2011-09-10 Thomas Koenig <tkoenig@gcc.gnu.org>

PR fortran/50327
* frontend-passes.c (dummy_expr_callback): New function.
(convert_do_while): New function.
(optimize_namespace): Call code walker to convert do while loops.


2011-09-10 Thomas Koenig <tkoenig@gcc.gnu.org>

        PR fortran/50327
        * gfortran.dg/do_while_1.f90:  New test.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]