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:
Kyrylo Tkachov 2015-11-24 13:35:56 +00:00 committed by Kyrylo Tkachov
parent ef3a75060e
commit a4fb29bc4d
2 changed files with 27 additions and 0 deletions

View File

@ -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.

View File

@ -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;
}