[Bug fortran/41227] COMMON block, BIND(C) and LTO interoperability issues

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 14 11:45:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41227

--- Comment #18 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Francois-Xavier Coudert from comment #14)
> (In reply to rguenther@suse.de from comment #13)
> > Does it need to inter-operate with
> > extern struct { struct { int i; } a; } a;
> No, I don't read anything in the standard that would allow this.

By your argument,
  int i;
and
  struct { int i; } a;
are interoperable. By this argument, one can also claim that it applies to
  struct { struct { int i; } a; } a;
At least I fail to see a difference between the single and the nested struct.

Otherwise, I stand to what I wrote before: I think the standard does not demand
the interoperability.

There are surely programs out there which do assume for a scalar variable in a
common block that it interoperates with "int" and others which assume that it
interoperates with "struct { int i; }". Thus, one might decide that one wants
to support both versions with LTO. But one shouldn't do so by arguing with the
Fortran standard.



More information about the Gcc-bugs mailing list