Fortran ICE

Tim Prince tprince@computer.org
Mon Oct 29 06:15:00 GMT 2001


I don't think this combination of extensions to Fortran makes sense.
%val() would say to pass a value stored in memory rather than a reference
to it, and I think it is not supported reliably anyway by g77.  Setting
the value as a parameter allows the compiler to avoid storing it in
memory.  Optimization level may make a difference.  With g77, you would
not get a reference to an exit() function in the C library (which would
accept a call by value), unless you took specific action to make it so
(such as invoking -fno-underscoring).  It makes no sense anyway to use a
C exit() from a program with a Fortran main.
----- Original Message -----
From: "Jakub Jelinek" <jakub@redhat.com>
To: "Toon Moene" <toon@moene.indiv.nluug.nl>
Cc: <gcc-bugs@gcc.gnu.org>
Sent: Monday, October 29, 2001 3:25 AM
Subject: Fortran ICE


> Hi!
>
>       program tmp
>       implicit none
>       integer *8  zero
>       parameter (zero = 0)
>       call exit(%val(zero))
>       end
>
> crashes in any g77 I've tried with something like:
> ../../../gcc/f/com.c:3863: failed assertion "bad op" == NULL'
> (FFEBLD_opPERCENT_VAL is not handled in the switch).
> Can you please look at this (I don't even know what %val means)?
> Thanks.
>
> Jakub



More information about the Gcc-bugs mailing list