aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-06-04 04:36:53 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-06-04 04:36:53 +0000
commit1063147cc08d7f22bad9ad3bc0bf758b070611ca (patch)
treea6b17ea7952c42607ca2b7ce9d26e2669093b42d /gcc
parent120c6dca562969858e482a8157e03a09a84d7a20 (diff)
downloadgcc-1063147cc08d7f22bad9ad3bc0bf758b070611ca.zip
gcc-1063147cc08d7f22bad9ad3bc0bf758b070611ca.tar.gz
gcc-1063147cc08d7f22bad9ad3bc0bf758b070611ca.tar.bz2
varasm.c (force_const_mem): Handle alignment of constants not representable as a type in the front-end language.
* varasm.c (force_const_mem): Handle alignment of constants not representable as a type in the front-end language. From-SVN: r67416
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/varasm.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e84b39f..9b20061 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/varasm.c b/gcc/varasm.c
index cf2722c..fec16d5 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;