aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-07-04 13:47:18 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-07-04 13:47:18 +0000
commit23af816cc9efadb9f038a66c8757446e9ce4deeb (patch)
tree0ce4afbeb116600a4c2df713b15bce995a23eff8 /gcc/gimple-fold.c
parent2b2d7c53bb77d296530b792df31559ebca3cdb9b (diff)
downloadgcc-23af816cc9efadb9f038a66c8757446e9ce4deeb.zip
gcc-23af816cc9efadb9f038a66c8757446e9ce4deeb.tar.gz
gcc-23af816cc9efadb9f038a66c8757446e9ce4deeb.tar.bz2
re PR middle-end/53433 (ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap)
2012-07-04 Richard Guenther <rguenther@suse.de> PR middle-end/53433 * gimple-fold.c (get_base_constructor): Do not return an error_mark_node DECL_INITIAL. From-SVN: r189260
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r--gcc/gimple-fold.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 08e9603..5f8e0cd 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -2713,6 +2713,10 @@ get_base_constructor (tree base, HOST_WIDE_INT *bit_offset,
if (!DECL_INITIAL (base)
&& (TREE_STATIC (base) || DECL_EXTERNAL (base)))
return error_mark_node;
+ /* Do not return an error_mark_node DECL_INITIAL. LTO uses this
+ as special marker (_not_ zero ...) for its own purposes. */
+ if (DECL_INITIAL (base) == error_mark_node)
+ return NULL_TREE;
return DECL_INITIAL (base);
case ARRAY_REF: