]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR bootstrap/59934 (Bootstrap fail since r206941: expmed.h:252:33: error: array...
authorJakub Jelinek <jakub@redhat.com>
Mon, 27 Jan 2014 16:33:39 +0000 (17:33 +0100)
committerJeff Law <law@gcc.gnu.org>
Mon, 27 Jan 2014 16:33:39 +0000 (09:33 -0700)
       PR bootstrap/59934
        * expmed.h (expmed_mode_index): Rework so that analysis and optimziers
        know when the MODE_PARTIAL_INT and MODE_VECTOR_INT cases can never be
        reached.

From-SVN: r207137

gcc/ChangeLog
gcc/expmed.h

index 8405b2e25a263e7a4bec0cf661f4b34510fd0ed0..95a324cebcacfd66e0dfc20fa2ffbfc0577fc4f0 100644 (file)
@@ -1,3 +1,10 @@
+2014-01-27  Jakub Jelinek  <jakub@redhat.com>
+
+       PR bootstrap/59934
+       * expmed.h (expmed_mode_index): Rework so that analysis and optimziers
+       know when the MODE_PARTIAL_INT and MODE_VECTOR_INT cases can never be
+       reached.
+
 2014-01-27  James Greenhalgh  <james.greenhalgh@arm.com>
 
        * common/config/arm/arm-common.c
index 9681e41fbde599e4d7b1cee35ac5043188c4a508..4d01d1f0ec8b8c30fc4a6c23db8d42af0734f0c5 100644 (file)
@@ -221,12 +221,21 @@ expmed_mode_index (enum machine_mode mode)
     case MODE_INT:
       return mode - MIN_MODE_INT;
     case MODE_PARTIAL_INT:
-      return mode - MIN_MODE_PARTIAL_INT + NUM_MODE_INT;
+      /* If there are no partial integer modes, help the compiler
+        to figure out this will never happen.  See PR59934.  */
+      if (MIN_MODE_PARTIAL_INT != VOIDmode)
+       return mode - MIN_MODE_PARTIAL_INT + NUM_MODE_INT;
+      break;
     case MODE_VECTOR_INT:
-      return mode - MIN_MODE_VECTOR_INT + NUM_MODE_IP_INT;
+      /* If there are no vector integer modes, help the compiler
+        to figure out this will never happen.  See PR59934.  */
+      if (MIN_MODE_VECTOR_INT != VOIDmode)
+       return mode - MIN_MODE_VECTOR_INT + NUM_MODE_IP_INT;
+      break;
     default:
-      gcc_unreachable ();
+      break;
     }
+  gcc_unreachable ();
 }
 
 /* Return a pointer to a boolean contained in EOC indicating whether