Bug 465974 - [RHEL5.3][gcc-4.3] Fortran DW_TAG_common_block has incorrect placement/scope
Summary: [RHEL5.3][gcc-4.3] Fortran DW_TAG_common_block has incorrect placement/scope
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc43
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-07 14:43 UTC by Alan Matsuoka
Modified: 2018-10-20 02:57 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 20:47:15 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2009:0077 0 normal SHIPPED_LIVE gcc43 enhancement update 2009-01-20 16:04:14 UTC

Description Alan Matsuoka 2008-10-07 14:43:47 UTC
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 14:44:58 UTC
Created attachment 319649 [details]
test2.f90

Comment 2 Jakub Jelinek 2008-10-07 16:47:02 UTC
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 12:16:39 UTC
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 16:06:04 UTC
(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 20:47:15 UTC
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.