aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-05-02 08:00:46 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2013-05-02 08:00:46 +0200
commit203550bff1051792cf01cb784c868adaefce6673 (patch)
tree72df506b12c01d549352744104371e6e17d28238 /gcc
parent61294862501135fa33a7d7b5a30f234d5740d4bf (diff)
downloadgcc-203550bff1051792cf01cb784c868adaefce6673.zip
gcc-203550bff1051792cf01cb784c868adaefce6673.tar.gz
gcc-203550bff1051792cf01cb784c868adaefce6673.tar.bz2
re PR rtl-optimization/57131 (Wrong register assignment?)
PR rtl-optimization/57131 * gcc.c-torture/execute/pr57131.c: New test. From-SVN: r198511
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57131.c19
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index bce4185..a083699 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..f2c41a1
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57131.c
@@ -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;
+}