This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: g77.f-torture/execute/alpha1.f is strange


>  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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]