Bug 45551 - [4.6 Regression]: gcc.c-torture/execute/990326-1.c
Summary: [4.6 Regression]: gcc.c-torture/execute/990326-1.c
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2010-09-06 01:58 UTC by Hans-Peter Nilsson
Modified: 2010-09-06 21:48 UTC (History)
3 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: cris-axis-elf
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Simplified gcc.c-torture/execute/990326-1.c (170 bytes, text/plain)
2010-09-06 02:02 UTC, Hans-Peter Nilsson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2010-09-06 01:58:52 UTC
With revision 163380 this test passed.
From revision 163383 and on, this test has failed as follows:

Running /tmp/regressn1-383/gcc/gcc/testsuite/gcc.c-torture/execute/execute.exp ...
FAIL: gcc.c-torture/execute/990326-1.c execution,  -O2
FAIL: gcc.c-torture/execute/990326-1.c execution,  -O3 -fomit-frame-pointer
FAIL: gcc.c-torture/execute/990326-1.c execution,  -O3 -g
FAIL: gcc.c-torture/execute/990326-1.c execution,  -Os
FAIL: gcc.c-torture/execute/990326-1.c execution,  -O2 -flto
FAIL: gcc.c-torture/execute/990326-1.c execution,  -O2 -fwhopr

With the message in the logfile showing that abort was called.
RTL dumps show that the misoptimizing is done in the combine pass.
A simplified version of gcc.c-torture/execute/990326-1.c exposing the miscompilation will be attached.

Author of the suspect patch CC:ed.
Comment 1 Hans-Peter Nilsson 2010-09-06 02:02:25 UTC
Created attachment 21707 [details]
Simplified gcc.c-torture/execute/990326-1.c

See the combine dump at e.g. -O2.  I haven't disected the miscompilation, but at a glance it looks like the subregness is not handled properly.
Comment 2 Hans-Peter Nilsson 2010-09-06 21:48:07 UTC
Fixed by r163917, apparently.