varasm.c (force_const_mem): Assert mode is not VOID or BLK.
authorAlan Modra <amodra@gmail.com>
Fri, 7 Jun 2013 11:15:45 +0000 (20:45 +0930)
committerAlan Modra <amodra@gcc.gnu.org>
Fri, 7 Jun 2013 11:15:45 +0000 (20:45 +0930)
* varasm.c (force_const_mem): Assert mode is not VOID or BLK.

From-SVN: r199804

gcc/ChangeLog
gcc/varasm.c

index 806d3be704ba94eb3d5dfab451d063ab7481928c..b27f22a033f1d5fa6d27180f8b95a78f483ce042 100644 (file)
@@ -1,3 +1,7 @@
+2013-06-07  Alan Modra  <amodra@gmail.com>
+
+       * varasm.c (force_const_mem): Assert mode is not VOID or BLK.
+
 2013-06-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * config/arm/constraints.md (Df): New constraint.
index c088ebf90080eb97182b6ca6c8d45c7623a5464c..bf3a0768f86ee8678efcdec296ffb1ea02da893f 100644 (file)
@@ -3567,7 +3567,8 @@ force_const_mem (enum machine_mode mode, rtx x)
   *slot = desc;
 
   /* Align the location counter as required by EXP's data type.  */
-  align = GET_MODE_ALIGNMENT (mode == VOIDmode ? word_mode : mode);
+  gcc_checking_assert (mode != VOIDmode && mode != BLKmode);
+  align = GET_MODE_ALIGNMENT (mode);
 #ifdef CONSTANT_ALIGNMENT
   {
     tree type = lang_hooks.types.type_for_mode (mode, 0);