diff options
author | Richard Guenther <rguenther@suse.de> | 2009-12-17 14:36:43 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-12-17 14:36:43 +0000 |
commit | e100f3957c29bce0641f05864f5378ba4e041ced (patch) | |
tree | 6530b30bab4859c15f595db20fdb4d4295ef1b94 /gcc/builtins.c | |
parent | 3c35a1a77f619060f8d71e85ec2470c5b47099d0 (diff) | |
download | gcc-e100f3957c29bce0641f05864f5378ba4e041ced.zip gcc-e100f3957c29bce0641f05864f5378ba4e041ced.tar.gz gcc-e100f3957c29bce0641f05864f5378ba4e041ced.tar.bz2 |
re PR middle-end/42397 (FAIL: gfortran.dg/lto/20091028-2 f_lto_20091028-2_0.o-f_lto_20091028-2_1.o link, internal compiler error)
2009-12-17 Richard Guenther <rguenther@suse.de>
PR middle-end/42397
* builtins.c (get_object_alignment): Properly deal with
a CONST_DECL base.
* expr.c (emit_block_move_hints): Assert the alignment makes
sense.
From-SVN: r155316
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 75a7e10..53d74a2 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -323,6 +323,8 @@ get_object_alignment (tree exp, unsigned int align, unsigned int max_align) offset = next_offset; } } + if (TREE_CODE (exp) == CONST_DECL) + exp = DECL_INITIAL (exp); if (DECL_P (exp)) align = MIN (inner, DECL_ALIGN (exp)); #ifdef CONSTANT_ALIGNMENT |