Bug 53089 - [4.8 Regression] gfortran.dg/coarray/atomic_1.f90 and gfortran.dg/coarray/registering_1.f90
Summary: [4.8 Regression] gfortran.dg/coarray/atomic_1.f90 and gfortran.dg/coarray/reg...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 4.8.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 53088
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-23 17:02 UTC by H.J. Lu
Modified: 2012-04-29 14:07 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-04-23 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2012-04-23 17:02:15 UTC
+++ 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
Comment 1 Richard Biener 2012-04-23 18:55:25 UTC
Confirmed.  Maybe a frontend bug.
Comment 2 Jan Hubicka 2012-04-24 13:10:21 UTC
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.
Comment 3 Jan Hubicka 2012-04-25 12:34:18 UTC
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
Comment 4 Jan Hubicka 2012-04-25 14:54:35 UTC
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
Comment 5 Hans-Peter Nilsson 2012-04-29 06:07:51 UTC
Looks fixed to me.  H.J. or Honza, close?
Comment 6 H.J. Lu 2012-04-29 14:07:33 UTC
Fixed.