This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/27173] [4.0 regression] ICE with -O -ftrapv



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]