summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-27 17:03:27 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-27 17:03:27 +0000
commit2d83f118485d2ab2a50ffa91adda253b28fd2a6e (patch)
tree6099fc9275f626429cdd8617692299d802708dc0
parent12c4d4954f226beb1db88b8cea9618e4f4e66535 (diff)
downloadgcc-2d83f118485d2ab2a50ffa91adda253b28fd2a6e.tar.gz
PR tree-optimization/59014
* gcc.c-torture/execute/pr59014-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205454 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr59014-2.c23
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index cc389d4dc39..613f0306da5 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59014-2.c b/gcc/testsuite/gcc.c-torture/execute/pr59014-2.c
new file mode 100644
index 00000000000..18da0059eab
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr59014-2.c
@@ -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;
+}