]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
varasm.c (force_const_mem): Handle alignment of constants not representable as a...
authorRoger Sayle <roger@eyesopen.com>
Wed, 4 Jun 2003 04:36:53 +0000 (04:36 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Wed, 4 Jun 2003 04:36:53 +0000 (04:36 +0000)
* varasm.c (force_const_mem): Handle alignment of constants not
representable as a type in the front-end language.

From-SVN: r67416

gcc/ChangeLog
gcc/varasm.c

index e84b39f54bacc7c65e05c9c96104ccef87ba81df..9b20061921ea96629bb088c1eabc55ce98382ab8 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-03  Roger Sayle  <roger@eyesopen.com>
+
+       * varasm.c (force_const_mem): Handle alignment of constants not
+       representable as a type in the front-end language.
+
 2003-06-03  Kazu Hirata  <kazu@cs.umass.edu>
 
        * flow.c (initialize_uninitialized_subregs): Use
index cf2722cf2e8ee510d4cc5f25f6784f132ff2c407..fec16d531964ff57ee597ef1f59647e1037708de 100644 (file)
@@ -3061,8 +3061,11 @@ force_const_mem (mode, x)
   /* Align the location counter as required by EXP's data type.  */
   align = GET_MODE_ALIGNMENT (mode == VOIDmode ? word_mode : mode);
 #ifdef CONSTANT_ALIGNMENT
-  align = CONSTANT_ALIGNMENT (make_tree ((*lang_hooks.types.type_for_mode)
-                                        (mode, 0), x), align);
+  {
+    tree type = (*lang_hooks.types.type_for_mode) (mode, 0);
+    if (type != NULL_TREE)
+      align = CONSTANT_ALIGNMENT (make_tree (type, x), align);
+  }
 #endif
 
   pool_offset += (align / BITS_PER_UNIT) - 1;