aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-05-10 14:57:48 +0000
committerEric Botcazou <ebotcazou@adacore.com>2012-05-10 14:57:48 +0000
commit97dd582a0a29ad1d87b823381dc931835873122c (patch)
treebabd3ce2e8db98e18c499ab64b86675774cc91df /gcc/gimplify.c
parent9cd35b4fe0f9890b6d01d573e76a94d05af4d02a (diff)
* gimplify.c (gimplify_decl_expr): For a TYPE_DECL, also gimplify the
DECL_ORIGINAL_TYPE if it is present. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@187369 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 811fa221fec..ca38a0e2675 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -1441,6 +1441,13 @@ gimplify_decl_expr (tree *stmt_p, gimple_seq *seq_p)
&& !TYPE_SIZES_GIMPLIFIED (TREE_TYPE (decl)))
gimplify_type_sizes (TREE_TYPE (decl), seq_p);
+ /* ??? DECL_ORIGINAL_TYPE is streamed for LTO so it needs to be gimplified
+ in case its size expressions contain problematic nodes like CALL_EXPR. */
+ if (TREE_CODE (decl) == TYPE_DECL
+ && DECL_ORIGINAL_TYPE (decl)
+ && !TYPE_SIZES_GIMPLIFIED (DECL_ORIGINAL_TYPE (decl)))
+ gimplify_type_sizes (DECL_ORIGINAL_TYPE (decl), seq_p);
+
if (TREE_CODE (decl) == VAR_DECL && !DECL_EXTERNAL (decl))
{
tree init = DECL_INITIAL (decl);