Testcase for PR rtl-optimization/68381
PR rtl-optimization/68381 * gcc.c-torture/execute/pr68381.c: New test. From-SVN: r230809
This commit is contained in:
parent
ef3a75060e
commit
a4fb29bc4d
|
@ -1,3 +1,8 @@
|
|||
2015-11-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
PR rtl-optimization/68381
|
||||
* gcc.c-torture/execute/pr68381.c: New test.
|
||||
|
||||
2015-11-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
|
||||
|
||||
* gcc.target/aarch64/cmpimm_branch_1.c: New test.
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/* { dg-options "-O -fexpensive-optimizations -fno-tree-bit-ccp" } */
|
||||
|
||||
__attribute__ ((noinline, noclone))
|
||||
int
|
||||
foo (unsigned short x, unsigned short y)
|
||||
{
|
||||
int r;
|
||||
if (__builtin_mul_overflow (x, y, &r))
|
||||
__builtin_abort ();
|
||||
return r;
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
int x = 1;
|
||||
int y = 2;
|
||||
if (foo (x, y) != x * y)
|
||||
__builtin_abort ();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue