aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorYvan Roux <yvan.roux@linaro.org>2016-01-12 16:25:46 +0100
committerLinaro Code Review <review@review.linaro.org>2016-01-13 09:56:41 +0000
commit428ded17977c8142625804eb8f7545ae7bb06f7b (patch)
tree62dc59eef237f76cc5179402002a1d5a90118d32 /gcc/testsuite
parent70d504cf4dac578be53e6513ca9ed8a8adc2cdb3 (diff)
gcc/
Backport from trunk r230786. 2015-11-24 Segher Boessenkool <segher@kernel.crashing.org> PR rtl-optimization/68381 * combine.c (is_parallel_of_n_reg_sets): Return false if the pattern is poisoned. gcc/testsuite/ Backport from trunk r230809. 2015-11-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com> PR rtl-optimization/68381 * gcc.c-torture/execute/pr68381.c: New test. gcc/ Backport from trunk r230946. 2015-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * combine.c (subst): Do not return clobber of zero in widening mult case. Just return x unchanged if it is a no-op substitution. Change-Id: I3a644b62bce1ddd7d24ebd3b2c604076e040d755
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr68381.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr68381.c b/gcc/testsuite/gcc.c-torture/execute/pr68381.c
new file mode 100644
index 00000000000..cb6abcb265b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr68381.c
@@ -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;
+}
+