[Bug fortran/56293] Segfault when trying to access pass-by-reference value of a not-word-aligned REAL(16) / -fno-align-commons
tobi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 11 00:16:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56293
--- Comment #7 from Tobias Schlüter <tobi at gcc dot gnu.org> 2013-03-11 00:15:43 UTC ---
(In reply to comment #6)
> > The question is also whether one can construct a fully standard-conform example
> > which fails without -fno-align-commons – and whether some real-world code uses
> > COMMON in a way that would fails with alignments/padding.
>
> program main
> real a,f1,f2,d
> common /foo/ a,f1,f2,d
> a = 1.0
> d = 1.0
> call s1
> end
> subroutine s1
> real a,b
> double precision d
> common /foo/ a,d,b
> print *,a
> print *,b
> end
That's not valid. I'm looking at the F95 working draft:
according to note 5.33
"""Association in different scoping units between objects of default type,
objects of double precision real type, and sequence structures is permitted
according to the rules for equivalence objects (5.5.1)."""
and in 5.5.1. we have
"""If an equivalence-object is of type default integer, default real, double
precision real, default complex, default logical, or numeric sequence type, all
of the objects in the equivalence set shall be of these types."""
More information about the Gcc-bugs
mailing list