Bug 27332 - [4.2 Regression] ICE in try_interchange_loops with -ftree-loop-linear
Summary: [4.2 Regression] ICE in try_interchange_loops with -ftree-loop-linear
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.2.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2006-04-26 23:04 UTC by Janis Johnson
Modified: 2006-05-18 04:56 UTC (History)
2 users (show)

See Also:
Host:
Target: powerpc-linux
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-04-26 23:10:20


Attachments
test case (155 bytes, text/plain)
2006-04-26 23:05 UTC, Janis Johnson
Details
fix (316 bytes, patch)
2006-05-10 12:26 UTC, sebastian.pop@cri.ensmp.fr
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Janis Johnson 2006-04-26 23:04:56 UTC
Tests gap and twolf from SPEC CPU2000 ICE when built on powerpc64-linux with "-O2 -ftree-loop-linear" and either -m32 or -m64.  A third test, lucas, started getting segfaults for those options at the same time.  A regression hunt using a minimized testcase (to be attached) identified this patch:

    http://gcc.gnu.org/viewcvs?view=rev&rev=112437

    r112437 | spop | 2006-03-28 04:19:26 +0000 (Tue, 28 Mar 2006)

Output compiling the minimized testcase:

elm3b145% /opt/gcc-nightly/trunk/bin/gcc -O2 -ftree-loop-linear -c uloop.c
uloop.c: In function ‘foo’:
uloop.c:3: internal compiler error: vector VEC(ddr_p,base) index domain error, in try_interchange_loops at tree-loop-linear.c:183
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Janis Johnson 2006-04-26 23:05:25 UTC
Created attachment 11339 [details]
test case
Comment 2 Andrew Pinski 2006-04-26 23:10:20 UTC
Confirmed.  This was caused by the change over from varray to VEC.  Looks like we had a bug where we depend on pushing something but now we don't. 
Comment 3 sebastian.pop@cri.ensmp.fr 2006-05-10 12:26:11 UTC
Created attachment 11429 [details]
fix

proposed fix.  I didn't tested it other than making sure it fixed the bug.
Comment 4 Sebastian Pop 2006-05-17 12:47:51 UTC
Subject: Bug 27332

Author: spop
Date: Wed May 17 12:47:43 2006
New Revision: 113856

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113856
Log:
	PR middle-end/27332
	* tree-loop-linear.c (try_interchange_loops): Test for 
	no data dependences.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-loop-linear.c

Comment 5 Andrew Pinski 2006-05-18 04:56:10 UTC
Fixed.