[committed] Add testcase for PR rtl-optimization/83771

Message ID 20180117110519.GS2063@tucnak
State New
Headers show
Series
  • [committed] Add testcase for PR rtl-optimization/83771
Related show

Commit Message

Jakub Jelinek Jan. 17, 2018, 11:05 a.m.
Hi!

This testcase got fixed with Honza's PR middle-end/83575 fix
r256479, so I've just added a testcase after testing it on x86_64/i686-linux
and committed as obvious, so we can close the PR.

2018-01-17  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/83771
	* gcc.dg/pr83771.c: New test.


	Jakub

Patch

--- gcc/testsuite/gcc.dg/pr83771.c.jj	2018-01-17 11:56:01.097820393 +0100
+++ gcc/testsuite/gcc.dg/pr83771.c	2018-01-17 11:55:54.093819292 +0100
@@ -0,0 +1,19 @@ 
+/* PR rtl-optimization/83771 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fmodulo-sched -fno-ssa-phiopt" } */
+
+long int a;
+int b;
+int foo (int);
+
+void
+bar (void)
+{
+  int c;
+  do
+    {
+      c = a / (!!b == 1);
+      c = !!c + 1;
+    }
+  while (foo (c) < 1);
+}