This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/34490] [4.3 Regression] r128833 causes miscompilation of glibc clock_gettime.c
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Dec 2007 09:38:55 -0000
- Subject: [Bug rtl-optimization/34490] [4.3 Regression] r128833 causes miscompilation of glibc clock_gettime.c
- References: <bug-34490-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from jakub at gcc dot gnu dot org 2007-12-16 09:38 -------
Simpler testcase:
/* PR rtl-optimization/34490 */
extern void abort (void);
static int x;
int
__attribute__((noinline))
bar (void)
{
return x;
}
int
foo (void)
{
long int b = bar ();
if ((unsigned long) b < -4095L)
return b;
if (-b != 38)
b = -2;
return b + 1;
}
int
main (void)
{
x = 26;
if (foo () != 26)
abort ();
x = -39;
if (foo () != -1)
abort ();
x = -38;
if (foo () != -37)
abort ();
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34490