This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/27173] [4.0 regression] ICE with -O -ftrapv
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 May 2006 10:56:36 -0000
- Subject: [Bug middle-end/27173] [4.0 regression] ICE with -O -ftrapv
- References: <bug-27173-1710@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from reichelt at gcc dot gnu dot org 2006-05-03 10:56 -------
The testcase in comment #3 only crashes on x86_64-unknown-linux-gnu,
but not on i686-pc-linux-gnu.
The testcase below crashes on both archs:
===================================
char *p, *q;
inline int foo(int i)
{
int j = (p - q) + i;
return -j;
}
void bar()
{
int n, i;
for (n = 7; n-- > 0; )
for (i = n; i-- > 0; )
if (i)
p += foo(i-1);
}
===================================
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27173