Commit 8cd4a359 by Diego Novillo Committed by Diego Novillo

re PR rtl-optimization/8423 (CSE1 not propagating __builtin_constant_p enough)


	PR optimization/8423
	* gcc.c-torture/execute/builtin-constant.c: New test.

From-SVN: r58760
parent dff9f1b6
2002-11-02 Diego Novillo <dnovillo@redhat.com>
PR optimization/8423
* gcc.c-torture/execute/builtin-constant.c: New test.
2002-11-01 Zack Weinberg <zack@codesourcery.com>
* g++.dg/ext/typedef-init.C, gcc.dg/typedef-init.C:
......
/* PR optimization/8423. */
#define btest(x) __builtin_constant_p(x) ? "1" : "0"
#ifdef __OPTIMIZE__
void
foo (char *i)
{
if (*i == '0')
abort ();
}
#else
void
foo (char *i)
{
}
#endif
int
main (void)
{
int size = sizeof (int);
foo (btest (size));
foo (btest (size));
exit (0);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment