[committed] Add testcase for PR rtl-optimization/83771
Jakub Jelinek
jakub@redhat.com
Wed Jan 17 11:11:00 GMT 2018
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.
--- 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);
+}
Jakub
More information about the Gcc-patches
mailing list