diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2012-05-10 14:57:48 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-05-10 14:57:48 +0000 |
commit | d400d17ef00e6a24d69d6a36eff129f2c02ea806 (patch) | |
tree | babd3ce2e8db98e18c499ab64b86675774cc91df /gcc/gimplify.c | |
parent | b5ba5188a546443cf3a6ce3b1306c54265ddf675 (diff) | |
download | gcc-d400d17ef00e6a24d69d6a36eff129f2c02ea806.zip gcc-d400d17ef00e6a24d69d6a36eff129f2c02ea806.tar.gz gcc-d400d17ef00e6a24d69d6a36eff129f2c02ea806.tar.bz2 |
gimplify.c (gimplify_decl_expr): For a TYPE_DECL, also gimplify the DECL_ORIGINAL_TYPE if it is present.
* gimplify.c (gimplify_decl_expr): For a TYPE_DECL, also gimplify the
DECL_ORIGINAL_TYPE if it is present.
From-SVN: r187369
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 811fa22..ca38a0e 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); |