This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41227] COMMON block, BIND(C) and LTO interoperability issues
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 10 Jun 2014 13:06:38 +0000
- Subject: [Bug fortran/41227] COMMON block, BIND(C) and LTO interoperability issues
- Auto-submitted: auto-generated
- References: <bug-41227-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41227
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think there is no good way apart from treating single-element structs equal
to its single element in LTO with regarding to TYPE_CANONICAL. At least not if
you want to inter-operate with both int i; and struct { int i; }. Otherwise
I'd lean towards not using a struct in Fortran for single-element commons.
That should be an implementation detail anyways.
> Unfortunately, the idiom "use a single variable common block, say common/x/y,
> access it via the name of the common block, followed by an underscore, say x_"
> is also common. At least in my workplace it's the way everybody uses.
But then simply name the symbol of the variable without a struct in that way,
no?