+++ This bug was initially created as a clone of Bug #53088 +++ On Linux/x86, revision 186687: http://gcc.gnu.org/ml/gcc-cvs/2012-04/msg00639.html caused: FAIL: gfortran.dg/coarray/atomic_1.f90 -fcoarray=lib -O2 -lcaf_single execution test FAIL: gfortran.dg/coarray/registering_1.f90 -fcoarray=lib -O2 -lcaf_single execution test
Confirmed. Maybe a frontend bug.
I will take a look. Fortran is lax on finalizing variables (even defined ones) that are then ignored by IPA passes till wrapup_global_decls. This might lead to wrong code.
OK, the problem here is that Fortran produces nested functions that are static constructors and we are not quite ready for that. I am testing fix. Honza
Author: hubicka Date: Wed Apr 25 14:54:21 2012 New Revision: 186820 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186820 Log: PR middle-end/53089 * cgraphunit.c (referred_to_p): Move ahead in file to avoid forward declaration. (cgraph_finalize_function): Finalize them here. * symtab.c (dump_symtab): Dump ctors and dtors. Modified: trunk/gcc/ChangeLog trunk/gcc/cgraphunit.c trunk/gcc/symtab.c
Looks fixed to me. H.J. or Honza, close?
Fixed.