From 203550bff1051792cf01cb784c868adaefce6673 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 2 May 2013 08:00:46 +0200 Subject: [PATCH] re PR rtl-optimization/57131 (Wrong register assignment?) PR rtl-optimization/57131 * gcc.c-torture/execute/pr57131.c: New test. From-SVN: r198511 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.c-torture/execute/pr57131.c | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr57131.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bce4185ca69..a083699029a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-05-02 Jakub Jelinek + + PR rtl-optimization/57131 + * gcc.c-torture/execute/pr57131.c: New test. + 2013-05-01 Paolo Carlini 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 00000000000..f2c41a16b56 --- /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; +} -- 2.30.2