------- Comment #5 from kargl at gcc dot gnu dot org  2008-09-12 19:03 -------
(In reply to comment #4)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > the program is non-standard Fortran, but it is legacy, so an option would 
> > > be
> > > useful.
> > > 
> > 
> > Why is it nonstandard?
> > 
> 
> Maybe not, I was guessing based on 16.5.6 that n3 and n4 are actually
> undefined at the point of printing.

AFAICT, n3 and n4 are defined in one() because they are associated
with n3 and n4 of the main program which have the same type and kind.
n2(2) is undefined in one() and it would be undefined even if r1 had
been set in prog because their types are different.

This is equivalent to the ever popular use of EQUIVALENCE to set a
real type to Inf or NaN via integers.

   equivalence(x,i)
   ! The following makes x undefined.
   i = SOME_INT_BIT_PATTERN_FOR_INF 
   ! Do stuff with i.
   ! The following makes i undefined.
   x  = 1.
   end


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37486

Reply via email to