Bug 465974 - [RHEL5.3][gcc-4.3] Fortran DW_TAG_common_block has incorrect placement/scope
[RHEL5.3][gcc-4.3] Fortran DW_TAG_common_block has incorrect placement/scope
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc43 (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-07 10:43 EDT by Alan Matsuoka
Modified: 2010-10-23 01:02 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 15:47:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test.f90 (313 bytes, text/plain)
2008-10-07 10:43 EDT, Alan Matsuoka
no flags Details
test2.f90 (91 bytes, text/plain)
2008-10-07 10:44 EDT, Alan Matsuoka
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2009:0077 normal SHIPPED_LIVE gcc43 enhancement update 2009-01-20 11:04:14 EST

  None (edit)
Description Alan Matsuoka 2008-10-07 10:43:47 EDT
Created attachment 319648 [details]
test.f90

Description of problem:
Date problem reported: 10-6-08

Problem: gcc-4.3.2 / gfortran-4.3.2 (in the forthcoming tech-preview for RHEL5.3) appears to also have the "DW_TAG_common_block has incorrect placement/scope" issues listed in the following gcc upstream bug:

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

What gfortran is doing currently is:

(1) Merges all common blocks into a single one.
(2) Places this single common block into the first subroutine where it was
used.

Jan Kratochvil in BZ 459376, comment #12 noted that these issues are making it so that gcc-gfortran is incompatible with some fixes made to gdb-6.8 (see BZ 459672), which is what we'll be re-basing gdb on when RHEL5.3 ships (Jan is also the reporter of the upstream bug).


What is expected from SEG/Engineering:  Need to send this up so we can track possible fixes to gcc-4.3.  We need to try and squeeze this one in for RHEL5.3 as well.  


Issue escalated to Support Engineering Group by: kbaxley.
kbaxley assigned to issue for LLNL (HPC).
Category set to: Devel Tools::GCC
In BZ 459376 (see comment #12):


engineering noted that there was a gcc bug in gcc-4.3.2 that's making gfortran incompatible with gdb fixes that recently went in.  The BZ for the gdb issue is 459762. See comment #8 in that BZ.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
I have attached the two testcases that were used in the gcc-bugzilla, and I can reproduce this on an x86-64 system running the gfortran-4.3 tech preview packages:

gcc43-gfortran-4.3.2-6.el5

Compile the test programs using something like:

gfortran43 -g -o testing2 test2.f90
gfortran43 -g -o testing test.f90

Then run readelf -w against each output file.


  
Actual results:


Expected results:


Additional info:

see attached
Comment 1 Alan Matsuoka 2008-10-07 10:44:58 EDT
Created attachment 319649 [details]
test2.f90
Comment 2 Jakub Jelinek 2008-10-07 12:47:02 EDT
I agree this is fatal enough to need a rebuild, but I'm still waiting for upstream ack on the patch.
Comment 3 Jakub Jelinek 2008-10-14 08:16:39 EDT
This has been in rawhide for a few days, without problems and got even through gdb testing, so I'd like to respin gcc43 now for this.
Comment 5 Jan Kratochvil 2008-10-14 12:06:04 EDT
(In reply to comment #0)
> Jan Kratochvil in BZ 459376, comment #12 noted that these issues are making it
> so that gcc-gfortran is incompatible with some fixes made to gdb-6.8 (see BZ
> 459672), which is what we'll be re-basing gdb on when RHEL5.3 ships (Jan is
> also the reporter of the upstream bug).

This support for GDB exists as a patch now but it is not present in any GDB
release (upstream/rhel/fedora/archer).  It is a GDB fix/feature planned for
RHEL-5.4.

Still sure the GCC fix makes sense for other non-GDB debuggers.

I can also respin GDB for RHEL-5.3 with the common blocks fix from Bug 459762
but still not all of the other Fortran fixes are done+stable in GDB (all the
GCC Fortran fixes look as done already for 5.3, though).
Comment 11 errata-xmlrpc 2009-01-20 15:47:15 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-0077.html

Note You need to log in before you can comment on or make changes to this bug.