aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto/lto.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-12-09 23:37:02 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-12-09 22:37:02 +0000
commitda20571a7c2a7e44ccd5999356b1131f9aa6b2de (patch)
tree7ae5f4e79f8d1151e586b20aae84f97cc9d7fc61 /gcc/lto/lto.c
parent985f6c7969f7dd815c84f012486f17de978813b9 (diff)
downloadgcc-da20571a7c2a7e44ccd5999356b1131f9aa6b2de.zip
gcc-da20571a7c2a7e44ccd5999356b1131f9aa6b2de.tar.gz
gcc-da20571a7c2a7e44ccd5999356b1131f9aa6b2de.tar.bz2
re PR lto/68811 (ICE: in get, at cgraph.h:1218)
PR lto/68811 * lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of DECL. (LTO_NO_PREVAIL): Use gcc_checking_assert. From-SVN: r231477
Diffstat (limited to 'gcc/lto/lto.c')
-rw-r--r--gcc/lto/lto.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 90712b4..1b11439 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -2517,7 +2517,7 @@ lto_wpa_write_files (void)
/* Ensure that TT isn't a replacable var of function decl. */
#define LTO_NO_PREVAIL(tt) \
- gcc_assert (!(tt) || !VAR_OR_FUNCTION_DECL_P (tt))
+ gcc_checking_assert (!(tt) || !VAR_OR_FUNCTION_DECL_P (tt))
/* Given a tree T replace all fields referring to variables or functions
with their prevailing variant. */
@@ -2529,7 +2529,10 @@ lto_fixup_prevailing_decls (tree t)
gcc_checking_assert (code != TREE_BINFO);
LTO_NO_PREVAIL (TREE_TYPE (t));
- if (CODE_CONTAINS_STRUCT (code, TS_COMMON))
+ if (CODE_CONTAINS_STRUCT (code, TS_COMMON)
+ /* lto_symtab_prevail_decl use TREE_CHAIN to link to the prevailing decl.
+ in the case T is a prevailed declaration we would ICE here. */
+ && !VAR_OR_FUNCTION_DECL_P (t))
LTO_NO_PREVAIL (TREE_CHAIN (t));
if (DECL_P (t))
{