This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Add testcase for PR rtl-optimization/83771
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 17 Jan 2018 12:05:19 +0100
- Subject: [committed] Add testcase for PR rtl-optimization/83771
- Authentication-results: sourceware.org; auth=none
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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