[Patch, Fortran] PR 48624 - fix DECL for external procedures with proc arguments

Tobias Burnus burnus@net-b.de
Fri Apr 15 22:49:00 GMT 2011


Hi all,

the following patch fixes an issue with a multiple decl for procedures 
with procedure dummy arguments. Without the patch, multiple declarations 
are generated, which causes link failures ("euler" is optimized away) 
with -fwhole-program.  (Thanks goes to Richard for spotting the problem 
with gfortran.dg/cray_pointers_8.f90.)

I have no idea why there should be a problem with inlining (cf. deleted 
comment), but removing that part did not give any test suite failure 
(check-gfortran + libgomp's check). Additionally, I have build and run 
the Polyhedron testsuite with "-march=native -ffast-math -funroll-loops 
-O3 -fno-protect-parens -finline-limit=400 -fwhole-program".

Build and tested on x86-64-linux.
OK for the trunk?

Tobias

PS: I have not created a test case; you think it should be added, one 
can copy gfortran.dg/cray_pointers_8.f90 and add a version with 
dg-options "-fwhole-file".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: decl-fix.diff
Type: text/x-patch
Size: 1492 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110415/c578fce4/attachment.bin>


More information about the Gcc-patches mailing list