Patchwork [committed] Add testcase from PR57131

login
register
mail settings
Submitter Jakub Jelinek
Date May 2, 2013, 6:01 a.m.
Message ID <20130502060158.GU28963@tucnak.redhat.com>
Download mbox | patch
Permalink /patch/240898/
State New
Headers show

Comments

Jakub Jelinek - May 2, 2013, 6:01 a.m.
Hi!

This got fixed by Vlad in PR57097, I've committed the testcase as obvious
(so far to trunk, because the fix hasn't been backported to 4.8 branch yet,
will commit there too afterwards).

2013-05-02  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/57131
	* gcc.c-torture/execute/pr57131.c: New test.


	Jakub

Patch

--- gcc/testsuite/gcc.c-torture/execute/pr57131.c.jj	2013-05-02 07:58:05.557803157 +0200
+++ gcc/testsuite/gcc.c-torture/execute/pr57131.c	2013-05-02 07:54:14.000000000 +0200
@@ -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;
+}