[Patch, Fortran] PR52452 [4.5-4.7 Regr.] Intrinsic wrongly rejected

Tobias Burnus burnus@net-b.de
Fri Mar 2 09:35:00 GMT 2012


There is a 4.5 to 4.7 regression for those (vendor) intrinsic 
procedures, which can exists as both subroutine and as function. Example:

     INTRINSIC :: etime
     CALL etime(tarray, result)

Here, the "etime" gets marked as attr.subroutine, but later in 
resolve_intrinsics, it is mapped to the intrinsic function "etime". But 
then the compiler complains:

   Error: FUNCTION attribute conflicts with SUBROUTINE attribute in 'etime' at (1)


Solution: Don't search for the function, if we have a subroutine. (For 
some reasons, it works without "INTRINSIC :: etime".)

Build and regtested on x86-64-linux.
OK for the trunk - and the 4.5 to 4.6 branches?

Tobias

PS: I will ask for RM approval if this patch gets approved after 
(today's?) RC1 release.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: intrinsic-etime.diff
Type: text/x-patch
Size: 1279 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20120302/167a012a/attachment.bin>


More information about the Fortran mailing list