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 rtl-optimization/51667] [4.7 Regression] new FAIL: 27_io/basic_*stream/* execution test with -m32


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51667

--- Comment #11 from Uros Bizjak <ubizjak at gmail dot com> 2011-12-24 13:36:43 UTC ---
Testcase:

--cut here--
void abort (void);

void __attribute__((noinline))
bar (int a)
{
  if (a != -1)
    abort ();
}

void __attribute__((noinline))
foo (short *a, int t)
{
  unsigned int r = *a;

  if (t)
    bar ((unsigned short) r);
  else
    bar ((signed short) r);
}

short v = -1;

int main()
{
  foo (&v, 0);
  return 0;
}
--cut here--

Fails also on x86_64-pc-linux-gnu.

$ ~/gcc-build/gcc/xgcc -B ~/gcc-build/gcc -O2 -free pr51667.c
$ ./a.out
Aborted
$ ~/gcc-build/gcc/xgcc -B ~/gcc-build/gcc -O2 -fno-ree pr51667.c
$ ./a.out
$


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