]> gcc.gnu.org Git - gcc.git/commitdiff
re PR target/53187 (ICE in arm_select_dominance_cc_mode)
authorJakub Jelinek <jakub@redhat.com>
Thu, 3 May 2012 10:16:01 +0000 (12:16 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 3 May 2012 10:16:01 +0000 (12:16 +0200)
PR target/53187
* config/arm/arm.c (arm_select_cc_mode): If x has MODE_CC class
mode, return that mode.

* gcc.target/arm/pr53187.c: New test.
* gcc.c-torture/compile/pr53187.c: New test.

From-SVN: r187085

gcc/ChangeLog
gcc/config/arm/arm.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr53187.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/pr53187.c [new file with mode: 0644]

index 10238595a66a521dd329e3f69e8aa97dcaa2536a..80cf8c050e65507cae2a420686410a2d925477af 100644 (file)
@@ -1,5 +1,9 @@
 2012-05-03  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/53187
+       * config/arm/arm.c (arm_select_cc_mode): If x has MODE_CC class
+       mode, return that mode.
+
        PR target/53194
        * config/i386/i386-c.c (ix86_target_macros_internal): Don't
        define __ATOMIC_HLE_* macros here.
index 68350b158da1ae03f2b4b2d11553117dbb723c33..4d11d7e5e3611ced9aeea2a680966c3e0e57d00f 100644 (file)
@@ -11964,6 +11964,9 @@ arm_select_cc_mode (enum rtx_code op, rtx x, rtx y)
        }
     }
 
+  if (GET_MODE_CLASS (GET_MODE (x)) == MODE_CC)
+    return GET_MODE (x);
+
   return CCmode;
 }
 
index 51777a203f1315b16eab876b0171da2efa858ac2..9a56a5be2edcef2d676ac7faaf661f2f40748beb 100644 (file)
@@ -1,3 +1,9 @@
+2012-05-03  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/53187
+       * gcc.target/arm/pr53187.c: New test.
+       * gcc.c-torture/compile/pr53187.c: New test.
+
 2012-05-03  Richard Guenther  <rguenther@suse.de>
 
        * gfortran.dg/pr52621.f90: Add -w to avoid diagnostic about
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr53187.c b/gcc/testsuite/gcc.c-torture/compile/pr53187.c
new file mode 100644 (file)
index 0000000..13455f4
--- /dev/null
@@ -0,0 +1,11 @@
+/* PR target/53187 */
+
+void bar (int);
+
+void
+foo (int x, double y, double z)
+{
+  _Bool t = z >= y;
+  if (!t || x)
+    bar (t ? 1 : 16);
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr53187.c b/gcc/testsuite/gcc.target/arm/pr53187.c
new file mode 100644 (file)
index 0000000..648a06d
--- /dev/null
@@ -0,0 +1,13 @@
+/* PR target/53187 */
+/* { dg-do compile } */
+/* { dg-options "-march=armv7-a -mfloat-abi=hard -O2" } */
+
+void bar (int);
+
+void
+foo (int x, double y, double z)
+{
+  _Bool t = z >= y;
+  if (!t || x)
+    bar (t ? 1 : 16);
+}
This page took 0.117817 seconds and 5 git commands to generate.