Bug 51623 - PowerPC section type conflict
Summary: PowerPC section type conflict
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Michael Meissner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-19 15:43 UTC by Chung-Lin Tang
Modified: 2011-12-29 21:13 UTC (History)
1 user (show)

See Also:
Host:
Target: powerpc-linux
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Uboot nand_dump testcase (878 bytes, text/plain)
2011-12-19 15:43 UTC, Chung-Lin Tang
Details
Minimal testcase (90 bytes, text/plain)
2011-12-19 15:44 UTC, Chung-Lin Tang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chung-Lin Tang 2011-12-19 15:43:40 UTC
Created attachment 26144 [details]
Uboot nand_dump testcase

gcc-patches discussion thread:
http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01240.html

During final output of objects, existence of a .text.unlikely section triggers a section flag mismatch when looking up in the section htab.

More information in mailing list thread, attached are testcases, a larger one from U-boot, and a very minimal one trying to demonstrate the fail.  (for the minimal testcase, use -Os/-O2 -mrelocatable to trigger, for the Uboot one add -ffreestanding)
Comment 1 Chung-Lin Tang 2011-12-19 15:44:10 UTC
Created attachment 26145 [details]
Minimal testcase
Comment 2 Michael Meissner 2011-12-28 18:02:56 UTC
Author: meissner
Date: Wed Dec 28 18:02:49 2011
New Revision: 182710

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182710
Log:
Fix PR 51623

Added:
    trunk/gcc/testsuite/gcc.target/powerpc/pr51623.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/rs6000.c
    trunk/gcc/testsuite/ChangeLog
Comment 3 Michael Meissner 2011-12-28 18:04:03 UTC
Fixed in subversion revision 182710.
Comment 4 Michael Meissner 2011-12-28 20:53:33 UTC
Author: meissner
Date: Wed Dec 28 20:53:30 2011
New Revision: 182712

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182712
Log:
Backport PR 51623 change

Added:
    branches/gcc-4_6-branch/gcc/testsuite/gcc.target/powerpc/pr51623.c
      - copied unchanged from r182710, trunk/gcc/testsuite/gcc.target/powerpc/pr51623.c
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/config/rs6000/rs6000.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
Comment 5 Michael Meissner 2011-12-29 21:13:15 UTC
Author: meissner
Date: Thu Dec 29 21:13:10 2011
New Revision: 182731

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182731
Log:
Update PR 51623, to eliminate checks against being in the text section.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/rs6000.c