diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-10 14:57:48 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-10 14:57:48 +0000 |
commit | 72e1426bbd5590cd2cc187755fee21bfb4c9c836 (patch) | |
tree | babd3ce2e8db98e18c499ab64b86675774cc91df /gcc/gimplify.c | |
parent | 568283425808b41a9081c23c3732b0f790f3c2ac (diff) | |
download | gcc-72e1426bbd5590cd2cc187755fee21bfb4c9c836.tar.gz |
* gimplify.c (gimplify_decl_expr): For a TYPE_DECL, also gimplify the
DECL_ORIGINAL_TYPE if it is present.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187369 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 7 |
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); |