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/46909] [4.6 Regression] elf32-i386.c and elf64-x86-64.c in binutils are miscompiled


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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2010-12-12 19:27:08 UTC ---
Smaller one:

[hjl@gnu-6 tmp]$ cat y.c
extern void abort ();
int
__attribute__ ((__noinline__))
foo (unsigned int tls_type)
{
  if (! (tls_type == 4 || (tls_type == 6))
      || (tls_type == 2 || (tls_type == 6)))
    return 1;
  return -1;
}
int
main ()
{
  if (foo (6) != 1)
    abort ();
  return 0;
}
[hjl@gnu-6 tmp]$ /usr/gcc-4.6/bin/gcc -O2 y.c      
[hjl@gnu-6 tmp]$ ./a.out 
Aborted
[hjl@gnu-6 tmp]$


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