re PR tree-optimization/59014 (wrong code at -Os and above on x86_64-linux-gnu)
PR tree-optimization/59014 * gcc.c-torture/execute/pr59014-2.c: New test. From-SVN: r205454
This commit is contained in:
parent
e18a9b0997
commit
30f5fc6a42
@ -1,3 +1,8 @@
|
||||
2013-11-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/59014
|
||||
* gcc.c-torture/execute/pr59014-2.c: New test.
|
||||
|
||||
2013-11-27 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/58647
|
||||
|
23
gcc/testsuite/gcc.c-torture/execute/pr59014-2.c
Normal file
23
gcc/testsuite/gcc.c-torture/execute/pr59014-2.c
Normal file
@ -0,0 +1,23 @@
|
||||
/* PR tree-optimization/59014 */
|
||||
|
||||
__attribute__((noinline, noclone)) long long int
|
||||
foo (long long int x, long long int y)
|
||||
{
|
||||
if (((int) x | (int) y) != 0)
|
||||
return 6;
|
||||
return x + y;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if (sizeof (long long) == sizeof (int))
|
||||
return 0;
|
||||
int shift_half = sizeof (int) * __CHAR_BIT__ / 2;
|
||||
long long int x = (3LL << shift_half) << shift_half;
|
||||
long long int y = (5LL << shift_half) << shift_half;
|
||||
long long int z = foo (x, y);
|
||||
if (z != ((8LL << shift_half) << shift_half))
|
||||
__builtin_abort ();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user