Fix ICE in aarch64_float_const_representable_p
authorTom de Vries <tom@codesourcery.com>
Mon, 2 Jun 2014 13:13:43 +0000 (13:13 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Mon, 2 Jun 2014 13:13:43 +0000 (13:13 +0000)
2014-06-02  Tom de Vries  <tom@codesourcery.com>

* config/aarch64/aarch64.c (aarch64_float_const_representable_p): Handle
case that x has VOIDmode.

From-SVN: r211132

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index 07f3b0f..628c027 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-02  Tom de Vries  <tom@codesourcery.com>
+
+       * config/aarch64/aarch64.c (aarch64_float_const_representable_p): Handle
+       case that x has VOIDmode.
+
 2014-06-02  Bernd Schmidt  <bernds@codesourcery.com>
 
        * varasm.c (copy_constant): Delete function.
index f69457a..a1d8486 100644 (file)
@@ -8466,6 +8466,9 @@ aarch64_float_const_representable_p (rtx x)
   if (!CONST_DOUBLE_P (x))
     return false;
 
+  if (GET_MODE (x) == VOIDmode)
+    return false;
+
   REAL_VALUE_FROM_CONST_DOUBLE (r, x);
 
   /* We cannot represent infinities, NaNs or +/-zero.  We won't