public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/25937] New: ICE: Illegal instruction, with valid code
@ 2006-01-24 1:48 uttamp at us dot ibm dot com
2006-01-24 1:58 ` [Bug tree-optimization/25937] " uttamp at us dot ibm dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: uttamp at us dot ibm dot com @ 2006-01-24 1:48 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4907 bytes --]
Hi,
Following code causing an ICE with mainline.
elm3b9:/home/pawar> cat test.c
1 int func(float *v1, const float *v2, int l, int e)
2 {
3 int i,j, bi=0;
4 float md=0, d=0, t;
5 for (i=0;i< e;i--)
6 {
7 for (j=0;j<l;j++)
8 {
9 t = v1[j]-*v2++;
10 d += t*t;
11 }
12 if ( d > md)
13 md=d;
14 }
15 }
$ /opt/gcc-nightly/trunk-20060123/bin/gcc -v -c -O2 -ftree-loop-linear test.c
Using built-in specs.
Target: powerpc64-linux
Configured with: /home/gccbuild/gcc_trunk_anonsvn/trunk/configure
--prefix=/opt/gcc-nightly/trunk-20060123 --build=powerpc64-linux
--host=powerpc64-linux --target=powerpc64-linux --with-cpu=default32
--with-as=/opt/gcc-nightly/trunk-20060123/bin/as
--with-ld=/opt/gcc-nightly/trunk-20060123/bin/ld --enable-threads=posix
--enable-shared --enable-__cxa_atexit --enable-languages=c,c++,f95,java,objc
--enable-checking --with-mpfr=/opt/gcc-nightly/trunk-20060123
Thread model: posix
gcc version 4.2.0 20060123 (experimental)
/home/gcc-nightly/trunk-20060123/bin/../libexec/gcc/powerpc64-linux/4.2.0/cc1
-quiet -v -iprefix
/home/gcc-nightly/trunk-20060123/bin/../lib/gcc/powerpc64-linux/4.2.0/
-D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux
-Asystem=linux -Asystem=unix -Asystem=posix test.c -quiet -dumpbase test.c
-auxbase test -O2 -version -ftree-loop-linear -o /tmp/cc145sWC.s
ignoring nonexistent directory
"/home/gcc-nightly/trunk-20060123/bin/../lib/gcc/powerpc64-linux/4.2.0/../../../../powerpc64-linux/include"
ignoring duplicate directory
"/opt/gcc-nightly/trunk-20060123/lib/gcc/powerpc64-linux/4.2.0/include"
ignoring nonexistent directory
"/opt/gcc-nightly/trunk-20060123/lib/gcc/powerpc64-linux/4.2.0/../../../../powerpc64-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/home/gcc-nightly/trunk-20060123/bin/../lib/gcc/powerpc64-linux/4.2.0/include
/usr/local/include
/opt/gcc-nightly/trunk-20060123/include
/usr/include
End of search list.
GNU C version 4.2.0 20060123 (experimental) (powerpc64-linux)
compiled by GNU C version 4.2.0 20060123 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: ab2acf781189b94f37d1814045ecf667
test.c: In function func:
test.c:2: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
If I remove -v option from the command line, I get following,
$ /opt/gcc-nightly/trunk-20060123/bin/gcc -c -O2 -ftree-loop-linear test.c
gcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
If I remove, declaration bi=0 from line 3, I get following,
$ elm3b11:/home/pawar/reghunt/work> /opt/gcc-nightly/trunk-20060123/bin/gcc -c
-O2 -ftree-loop-linear test.c
test.c: In function func:
test.c:2: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
On line 5, if change i-- to i++, I get following (without bi=0),
$ elm3b11:/home/pawar/reghunt/work> /opt/gcc-nightly/trunk-20060123/bin/gcc -c
-O2 -ftree-loop-linear test.c
test.c: In function func:
test.c:2: error: definition in block 17 does not dominate use in block 6
for SSA_NAME: v2_38 in statement:
v2_42 = PHI <v2_38(6), v2_31(11)>;
PHI argument
v2_38
for PHI node
v2_42 = PHI <v2_38(6), v2_31(11)>;
test.c:2: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
and with bi=0, on line 3 I get,
$ elm3b11:/home/pawar/reghunt/work> /opt/gcc-nightly/trunk-20060123/bin/gcc -c
-O2 -ftree-loop-linear test.c
test.c: In function func:
test.c:2: error: definition in block 17 does not dominate use in block 6
for SSA_NAME: v2_38 in statement:
v2_42 = PHI <v2_38(6), v2_9(11)>;
PHI argument
v2_38
for PHI node
v2_42 = PHI <v2_38(6), v2_9(11)>;
test.c:2: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: ICE: Illegal instruction, with valid code
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: uttamp at us dot ibm dot com
GCC build triplet: powerpc64-linux
GCC host triplet: powerpc64-linux
GCC target triplet: powerpc64-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25937
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/25937] ICE: Illegal instruction, with valid code
2006-01-24 1:48 [Bug tree-optimization/25937] New: ICE: Illegal instruction, with valid code uttamp at us dot ibm dot com
@ 2006-01-24 1:58 ` uttamp at us dot ibm dot com
2006-01-24 2:00 ` [Bug tree-optimization/25937] ICE with -O2 -ftree-loop-linear pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: uttamp at us dot ibm dot com @ 2006-01-24 1:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from uttamp at us dot ibm dot com 2006-01-24 01:58 -------
fyi: This works till trunk-20060106.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25937
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/25937] ICE with -O2 -ftree-loop-linear
2006-01-24 1:48 [Bug tree-optimization/25937] New: ICE: Illegal instruction, with valid code uttamp at us dot ibm dot com
2006-01-24 1:58 ` [Bug tree-optimization/25937] " uttamp at us dot ibm dot com
@ 2006-01-24 2:00 ` pinskia at gcc dot gnu dot org
2006-01-24 2:18 ` [Bug tree-optimization/25937] [4.2 Regression] " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-24 2:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-01-24 02:00 -------
Confirmed, for us normal people who cannot copy and paste without the line
numbers:
int func(float *v1, const float *v2, int l, int e)
{
int i,j, bi=0;
float md=0, d=0, t;
for (i=0;i< e;i--)
{
for (j=0;j<l;j++)
{
t = v1[j]-*v2++;
d += t*t;
}
if ( d > md)
md=d;
}
}
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dberlin at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2006-01-24 02:00:48
date| |
Summary|ICE: Illegal instruction, |ICE with -O2 -ftree-loop-
|with valid code |linear
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25937
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/25937] [4.2 Regression] ICE with -O2 -ftree-loop-linear
2006-01-24 1:48 [Bug tree-optimization/25937] New: ICE: Illegal instruction, with valid code uttamp at us dot ibm dot com
2006-01-24 1:58 ` [Bug tree-optimization/25937] " uttamp at us dot ibm dot com
2006-01-24 2:00 ` [Bug tree-optimization/25937] ICE with -O2 -ftree-loop-linear pinskia at gcc dot gnu dot org
@ 2006-01-24 2:18 ` pinskia at gcc dot gnu dot org
2006-01-24 3:15 ` [Bug tree-optimization/25937] " dberlin at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-24 2:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-01-24 02:18 -------
Note I think this is a latent bug, I think improvements to PRE or the
reassociate rewrite cause the ICE.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet|powerpc64-linux |
GCC host triplet|powerpc64-linux |
GCC target triplet|powerpc64-linux |
Summary|ICE with -O2 -ftree-loop- |[4.2 Regression] ICE with -
|linear |O2 -ftree-loop-linear
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25937
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/25937] ICE with -O2 -ftree-loop-linear
2006-01-24 1:48 [Bug tree-optimization/25937] New: ICE: Illegal instruction, with valid code uttamp at us dot ibm dot com
` (2 preceding siblings ...)
2006-01-24 2:18 ` [Bug tree-optimization/25937] [4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-01-24 3:15 ` dberlin at gcc dot gnu dot org
2006-01-25 23:14 ` uttamp at us dot ibm dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2006-01-24 3:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dberlin at gcc dot gnu dot org 2006-01-24 03:15 -------
These ICE's are very hard to fix without real loop distribution. They
basically all concern the perfect nest transformation.
I'm not even sure it's worth attempting to fix them by hacking up the perfect
nest transformation further.
--
dberlin at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet| |powerpc64-linux
GCC host triplet| |powerpc64-linux
GCC target triplet| |powerpc64-linux
Summary|[4.2 Regression] ICE with - |ICE with -O2 -ftree-loop-
|O2 -ftree-loop-linear |linear
Target Milestone|4.2.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25937
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/25937] ICE with -O2 -ftree-loop-linear
2006-01-24 1:48 [Bug tree-optimization/25937] New: ICE: Illegal instruction, with valid code uttamp at us dot ibm dot com
` (3 preceding siblings ...)
2006-01-24 3:15 ` [Bug tree-optimization/25937] " dberlin at gcc dot gnu dot org
@ 2006-01-25 23:14 ` uttamp at us dot ibm dot com
2006-03-23 9:35 ` rguenth at gcc dot gnu dot org
2006-05-18 5:50 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: uttamp at us dot ibm dot com @ 2006-01-25 23:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from uttamp at us dot ibm dot com 2006-01-25 23:14 -------
I put the line numbers in there because I just wanted to point out the
different error messages I get with small changes in code. ;-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25937
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/25937] ICE with -O2 -ftree-loop-linear
2006-01-24 1:48 [Bug tree-optimization/25937] New: ICE: Illegal instruction, with valid code uttamp at us dot ibm dot com
` (4 preceding siblings ...)
2006-01-25 23:14 ` uttamp at us dot ibm dot com
@ 2006-03-23 9:35 ` rguenth at gcc dot gnu dot org
2006-05-18 5:50 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-23 9:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2006-03-23 09:35 -------
Looks related to PR25211
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |25211
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25937
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/25937] ICE with -O2 -ftree-loop-linear
2006-01-24 1:48 [Bug tree-optimization/25937] New: ICE: Illegal instruction, with valid code uttamp at us dot ibm dot com
` (5 preceding siblings ...)
2006-03-23 9:35 ` rguenth at gcc dot gnu dot org
@ 2006-05-18 5:50 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-18 5:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2006-05-18 05:49 -------
Fixed by:
2006-05-17 Sebastian Pop <pop@cri.ensmp.fr>
PR middle-end/20256
PR middle-end/26435
* tree-loop-linear.c (linear_transform_loops): Don't test
perfect_nest_p.
Call rewrite_into_loop_closed_ssa only when something changed.
* lambda.h (gcc_loopnest_to_lambda_loopnest): Update declaration.
* lambda-code.c (can_convert_to_perfect_nest): Declared.
(gcc_loopnest_to_lambda_loopnest): Removed need_perfect_nest parameter.
Test for perfect_nest_p here. Fix formating.
(replace_uses_equiv_to_x_with_y): Fix formating.
(stmt_uses_op): Removed.
(can_convert_to_perfect_nest): Removed loopivs parameter.
Complete the test by checking the scalar dependences.
(perfect_nestify): Remove the test for can_convert_to_perfect_nest.
Fix formating.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25937
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-05-18 5:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-24 1:48 [Bug tree-optimization/25937] New: ICE: Illegal instruction, with valid code uttamp at us dot ibm dot com
2006-01-24 1:58 ` [Bug tree-optimization/25937] " uttamp at us dot ibm dot com
2006-01-24 2:00 ` [Bug tree-optimization/25937] ICE with -O2 -ftree-loop-linear pinskia at gcc dot gnu dot org
2006-01-24 2:18 ` [Bug tree-optimization/25937] [4.2 Regression] " pinskia at gcc dot gnu dot org
2006-01-24 3:15 ` [Bug tree-optimization/25937] " dberlin at gcc dot gnu dot org
2006-01-25 23:14 ` uttamp at us dot ibm dot com
2006-03-23 9:35 ` rguenth at gcc dot gnu dot org
2006-05-18 5:50 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).