re PR target/65924 (ICE const_int_operand failed on arm-none-eabi)
authorYvan Roux <yvan.roux@linaro.org>
Wed, 29 Apr 2015 11:31:40 +0000 (11:31 +0000)
committerYvan Roux <yroux@gcc.gnu.org>
Wed, 29 Apr 2015 11:31:40 +0000 (11:31 +0000)
gcc/
2015-04-29  Yvan Roux  <yvan.roux@linaro.org>

PR target/65924
* config/arm/thumb2.md (*thumb2_addsi3_compare0_scratch): Fix operand
number in type attribute expression.

gcc/testsuite/
2015-04-29  Yvan Roux  <yvan.roux@linaro.org>

PR target/65924
* gcc.target/arm/pr65924.c: New test.

From-SVN: r222572

gcc/ChangeLog
gcc/config/arm/thumb2.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/pr65924.c [new file with mode: 0644]

index baa558ba31763a1b22bd5b8ac90d7bde52a77a83..870fd1b1e4c8dab8098e2ad7245e7e5c71f7ef7d 100644 (file)
@@ -1,3 +1,9 @@
+2015-04-29  Yvan Roux  <yvan.roux@linaro.org>
+
+       PR target/65924
+       * config/arm/thumb2.md (*thumb2_addsi3_compare0_scratch): Fix operand
+       number in type attribute expression.
+
 2015-04-29  Richard Sandiford  <richard.sandiford@arm.com>
 
        * loop-iv.c (canon_condition): Generalize to all types of integer
index 4f9faac56a0f64a45186e39602e801392cfecfad..2c91542efa302283fd30ed3b352537be1395e710 100644 (file)
   "
   [(set_attr "conds" "set")
    (set_attr "length" "2,4")
-   (set (attr "type") (if_then_else (match_operand 2 "const_int_operand" "")
+   (set (attr "type") (if_then_else (match_operand 1 "const_int_operand" "")
                                     (const_string "alus_imm")
                                     (const_string "alus_sreg")))]
 )
index ffc4c2dce179446b2cdc7c49a39eeebbd5fadca7..25e80343ca81c2c693ff3bf05baaf3c679ab7375 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-29  Yvan Roux  <yvan.roux@linaro.org>
+
+       PR target/65924
+       * gcc.target/arm/pr65924.c: New test.
+
 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
 
        * g++.dg/gomp/tpl-target-update.C: New file.
diff --git a/gcc/testsuite/gcc.target/arm/pr65924.c b/gcc/testsuite/gcc.target/arm/pr65924.c
new file mode 100644 (file)
index 0000000..746749f
--- /dev/null
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mthumb" } */
+
+int a, b, c;
+int fn1() {
+  if (b + a < 0)
+    c = 0;
+}