This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/37738] Fortran DW_TAG_common_block has incorrect placement/scope



------- Comment #7 from robert dot mance at intel dot com  2009-08-19 21:28 -------
I've managed to download and install 4.4.5 of gfortran and can verify that what
you're doing here is just about identical to what ifort is doing.  

I have a request to emit a DW_TAG_common_inclusion record in our dwarf output
for Fortran named commons.  As you probably know, DW_TAG_common_inclusion would
contain a DW_AT_reference entry that would refer to a single
DW_TAG_common_block that would be shared by all of the common users.  

While that sounds good, it seems at best impractical, and at worse, impossible.
 Users of commons are free to map them as they like.  Declaring a single common
block that would satisfy all users of the common would be tricky, and perhaps
impossible, if two such users both declared a variable with the same name, but
with different types and locations in the common.

It gets worse when you consider multiple subroutines including the common in
separately compiled programs.

The only potential use here maybe when an include statement is used to bring a
named common into multiple subroutines.  We currently don't know that is
happening (in debug info output), but given enough time and code, might be able
to do that.

I'm just curious about views on this and if gfortran has any plans to implement
support for DW_TAG_common_inclusion.

Thanks.

Bob


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]