re PR rtl-optimization/57131 (Wrong register assignment?)
authorJakub Jelinek <jakub@redhat.com>
Thu, 2 May 2013 06:00:46 +0000 (08:00 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 2 May 2013 06:00:46 +0000 (08:00 +0200)
PR rtl-optimization/57131
* gcc.c-torture/execute/pr57131.c: New test.

From-SVN: r198511

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr57131.c [new file with mode: 0644]

index bce4185ca693ed44b10d22cc4c50ee9f45ed1ade..a083699029a4d8cc9ab31b3bbfb920c8096cf2cd 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-02  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/57131
+       * gcc.c-torture/execute/pr57131.c: New test.
+
 2013-05-01  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/57132
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57131.c b/gcc/testsuite/gcc.c-torture/execute/pr57131.c
new file mode 100644 (file)
index 0000000..f2c41a1
--- /dev/null
@@ -0,0 +1,19 @@
+/* PR rtl-optimization/57131 */
+
+extern void abort (void);
+
+int
+main ()
+{
+  volatile int x1 = 0;
+  volatile long long x2 = 0;
+  volatile int x3 = 0;
+  volatile int x4 = 1;
+  volatile int x5 = 1;
+  volatile long long x6 = 1;
+  long long t = ((x1 * (x2 << x3)) / (x4 * x5)) + x6;
+
+  if (t != 1)
+    abort ();
+  return 0;
+}