[Bug fortran/51502] [4.6/4.7 Regression] Potentially wrong code generation due to wrong implict_pure check

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jan 1 16:13:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51502

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-01-01 16:12:50 UTC ---
Author: tkoenig
Date: Sun Jan  1 16:12:39 2012
New Revision: 182770

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182770
Log:
2012-01-01  Thomas König  <tkoenig@gcc.gnu.org>

    Backport from trunk
    PR fortran/51502
    * expr.c (gfc_check_vardef_context):  When determining
    implicit pure status, also check for variable definition
    context.  Walk up namespaces until a procedure is
    found to reset the implict pure attribute.
    * resolve.c (gfc_implicit_pure):  Walk up namespaces
    until a procedure is found.

2012-01-01  Thomas König  <tkoenig@gcc.gnu.org>

    Backport from trunk
    PR fortran/51502
    * lib/gcc-dg.exp (scan-module-absence):  New function.
    * gfortran.dg/implicit_pure_2.f90:  New test.


Added:
    branches/gcc-4_6-branch/gcc/testsuite/gfortran.dg/implicit_pure_2.f90
Modified:
    branches/gcc-4_6-branch/gcc/fortran/ChangeLog
    branches/gcc-4_6-branch/gcc/fortran/expr.c
    branches/gcc-4_6-branch/gcc/fortran/resolve.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_6-branch/gcc/testsuite/lib/gcc-dg.exp



More information about the Gcc-bugs mailing list