This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/32171] New: ICE w/ -ftree-loop-linear, gcc4.1 and 4.2
- From: "bu dot gz dot 200-7 at src dot neostrada dot pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 May 2007 18:59:46 -0000
- Subject: [Bug c/32171] New: ICE w/ -ftree-loop-linear, gcc4.1 and 4.2
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc segfaults on the code below (which is a simplified des.c from
nettle-1.15.tar.gz). '-ftree-loop-linear' seems to be the trigger,
at least -O1 is required too.
ICEs:
gcc version 4.2.1 20070531 (prerelease)
gcc version 4.1.3 20070519 (prerelease)
survives:
gcc version 4.0.4 20061113 (prerelease)
uname -a:
Linux node 2.6.21.1-g4ead5093 #29 PREEMPT Sun May 6 22:54:15 CEST 2007 i686
GNU/Linux
$ gcc -O1 -ftree-loop-linear -c des.c
des.c: In function 'f':
des.c:4: internal compiler error: Segmentation fault
where des.c is:
---
int f( char *p );
int f( char *p )
{
unsigned n, w;
char a[4];
n = 4;
do {
w = *p++;
do {
--n;
w >>= 1;
a[n] = w;
} while ( w >= 16 );
} while ( n );
return a[0];
}
---
--
Summary: ICE w/ -ftree-loop-linear, gcc4.1 and 4.2
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bu dot gz dot 200-7 at src dot neostrada dot pl
GCC target triplet: i486-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32171