This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37486] alignment of data in COMMON blocks
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Sep 2008 19:03:19 -0000
- Subject: [Bug fortran/37486] alignment of data in COMMON blocks
- References: <bug-37486-16146@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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