r238114 - in /trunk/gcc: fortran/ChangeLog fort...
marxin@gcc.gnu.org
marxin@gcc.gnu.org
Thu Jul 7 13:15:00 GMT 2016
Author: marxin
Date: Thu Jul 7 13:15:39 2016
New Revision: 238114
URL: https://gcc.gnu.org/viewcvs?rev=238114&root=gcc&view=rev
Log:
Optimize fortran loops with +-1 step.
* gfortran.dg/do_1.f90: Remove a corner case that triggers
an undefined behavior.
* gfortran.dg/do_3.F90: Likewise.
* gfortran.dg/do_check_11.f90: New test.
* gfortran.dg/do_check_12.f90: New test.
* gfortran.dg/do_corner_warn.f90: New test.
* lang.opt (Wundefined-do-loop): New option.
* resolve.c (gfc_resolve_iterator): Warn for Wundefined-do-loop.
(gfc_trans_simple_do): Generate a c-style loop.
(gfc_trans_do): Fix GNU coding style.
* invoke.texi: Mention the new warning.
Added:
trunk/gcc/testsuite/gfortran.dg/do_check_11.f90
trunk/gcc/testsuite/gfortran.dg/do_check_12.f90
trunk/gcc/testsuite/gfortran.dg/do_corner_warn.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/invoke.texi
trunk/gcc/fortran/lang.opt
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/do_1.f90
trunk/gcc/testsuite/gfortran.dg/do_3.F90
trunk/gcc/testsuite/gfortran.dg/ldist-1.f90
trunk/gcc/testsuite/gfortran.dg/pr48636.f90
More information about the Gcc-cvs
mailing list