This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g77.f-torture/execute/alpha1.f is strange
- To: hjl at lucon dot org (H.J. Lu)
- Subject: Re: g77.f-torture/execute/alpha1.f is strange
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Sun, 2 Nov 97 11:54:55 +0100
- Cc: egcs at cygnus dot com
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <m0xRqJB-0004ecC@ocean.lucon.org>
> Here is g77.f-torture/execute/alpha1.f. It may call exit
> (1) if I doesn't happen to be 0. I don't remember what
> Fortran should be in this case. I think I is default to
> INTEGER. But I don't know if it should be initialized to
> 0. From the x86 asm code, gcc doesn't initialize it at
> all. In any case, I got the exit value 1 on
> linux/x86/glibc 2 and linux/alpha/glibc 2.0.5c.
>
>
> -- H.J. Lu (hjl@gnu.ai.mit.edu)
> ---g77.f-torture/execute/alpha1.f---
> REAL*8 A,B,C
> REAL*4 RARRAY(19)/19*(-1)/
> INTEGER BOTTOM,RIGHT
> INTEGER IARRAY(19)/0,0,0,0,0,0,0,0,0,0,0,0,13,14,0,0,0,0,0/
> EQUIVALENCE (RARRAY(13),BOTTOM),(RARRAY(14),RIGHT)
> C
> IF(I.NE.0) call exit(1)
>C gcc: Internal compiler error: program f771 got fatal signal 11
>C at this point!
> END
Yep, just using a variable I without initialising it is a deadly
sin - you might be glad g77 didn't start WW III on it - as per the
comp.lang.fortran FAQ. Probably the right optional hardware wasn't
installed ?
This code will only complete normally by chance, so I think it
needs updating.
Toon.