summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-04 04:36:53 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-04 04:36:53 +0000
commit5e8603b7b6936d6b2dc38729a31bf077ad0c9268 (patch)
treea6b17ea7952c42607ca2b7ce9d26e2669093b42d /gcc/varasm.c
parentb878e26932f48c418b9976be9d722ea2c4d9dfed (diff)
downloadgcc-5e8603b7b6936d6b2dc38729a31bf077ad0c9268.tar.gz
* varasm.c (force_const_mem): Handle alignment of constants not
representable as a type in the front-end language. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67416 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index cf2722cf2e8..fec16d53196 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -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;