Bug 41236 - [4.5 regression] RTL checking failure compiling libgcc
Summary: [4.5 regression] RTL checking failure compiling libgcc
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.5.0
: P3 critical
Target Milestone: 4.5.0
Assignee: Jakub Jelinek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-03 08:07 UTC by Eric Botcazou
Modified: 2009-09-03 16:36 UTC (History)
2 users (show)

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


Attachments
Reduced testcase. (458 bytes, text/plain)
2009-09-03 08:14 UTC, Eric Botcazou
Details
gcc45-pr41236.patch (492 bytes, patch)
2009-09-03 13:06 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Botcazou 2009-09-03 08:07:35 UTC
At revision 151371 I get an RTL checking failure compiling libgcc:

/home/eric/build/gcc/native32/./gcc/xgcc -B/home/eric/build/gcc/native32/./gcc/ -B/home/eric/install/gcc/i586-suse-linux/bin/ -B/home/eric/install/gcc/i586-suse-linux/lib/ -isystem /home/eric/install/gcc/i586-suse-linux/include -isystem /home/eric/install/gcc/i586-suse-linux/sys-include    -g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I. -I../.././gcc -I/home/eric/svn/gcc/libgcc -I/home/eric/svn/gcc/libgcc/. -I/home/eric/svn/gcc/libgcc/../gcc -I/home/eric/svn/gcc/libgcc/../include -I/home/eric/svn/gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -Wno-missing-prototypes -Wno-type-limits -o unordtf2.o -MT unordtf2.o -MD -MP -MF unordtf2.dep -fexceptions -c /home/eric/svn/gcc/libgcc/../gcc/config/soft-fp/unordtf2.c -fvisibility=hidden -DHIDE_EXPORTS
/home/eric/svn/gcc/libgcc/../gcc/config/soft-fp/unordtf2.c: In function '__unordtf2':
/home/eric/svn/gcc/libgcc/../gcc/config/soft-fp/unordtf2.c:45:1: internal compiler error: RTL check: expected code 'subreg', have 'sign_extend' in loc_descriptor, at dwarf2out.c:11681
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [unordtf2.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/eric/build/gcc/native32/i586-suse-linux/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/home/eric/build/gcc/native32'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/eric/build/gcc/native32'
make: *** [all] Error 2

All was working fine yesterday so it's very likely the enabling of VTA.
Comment 1 Eric Botcazou 2009-09-03 08:14:32 UTC
Created attachment 18470 [details]
Reduced testcase.

To be compiled at -O -g with an --enable-checking=yes,rtl compiler.
Comment 2 Jakub Jelinek 2009-09-03 13:06:48 UTC
Created attachment 18474 [details]
gcc45-pr41236.patch

Either this, or just using XEXP (rtl, 0) instead of SUBREG_REG (rtl).  This is only RTL checking problem, without RTL checking it will work just fine.

Doing full --enable-checking=yes,rtl bootstrap now.
Comment 3 Jakub Jelinek 2009-09-03 13:35:24 UTC
That still assumes that inside of SIGN_EXTEND/ZERO_EXTEND is a REG, which isn't always the case.  Testing with loc_descriptor call there instead now.
Comment 4 Jakub Jelinek 2009-09-03 16:33:43 UTC
Subject: Bug 41236

Author: jakub
Date: Thu Sep  3 16:33:27 2009
New Revision: 151385

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151385
Log:
	PR debug/41236
	* dwarf2out.c (loc_descriptor): Don't use SUBREG_REG macro on
	SIGN_EXTEND or ZERO_EXTEND.  Don't assume there is a REG inside of
	it or SUBREG.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c

Comment 5 Jakub Jelinek 2009-09-03 16:36:02 UTC
Fixed.