diff options
author | Richard Biener <rguenther@suse.de> | 2018-11-19 11:36:51 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-11-19 11:36:51 +0000 |
commit | e48e04f598c89a71a5aff3f02cb38b7bf06b5b2b (patch) | |
tree | d80d2d0873b9663244b2f3aa91b56a922e497a2c /gcc/tree.c | |
parent | ddd6f407e8021812c6205bebc40098b87faa4239 (diff) | |
download | gcc-e48e04f598c89a71a5aff3f02cb38b7bf06b5b2b.zip gcc-e48e04f598c89a71a5aff3f02cb38b7bf06b5b2b.tar.gz gcc-e48e04f598c89a71a5aff3f02cb38b7bf06b5b2b.tar.bz2 |
re PR c++/87229 (ICE: tree code 'call_expr' is not supported in LTO streams)
2018-11-19 Richard Biener <rguenther@suse.de>
PR lto/87229
* tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
sizepos values.
* g++.dg/lto/pr87229_0.C: New testcase.
From-SVN: r266271
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -5254,6 +5254,13 @@ free_lang_data_in_one_sizepos (tree *expr_p) tree expr = *expr_p; if (CONTAINS_PLACEHOLDER_P (expr)) *expr_p = build0 (PLACEHOLDER_EXPR, TREE_TYPE (expr)); + /* ??? We have to reset all non-GIMPLE sizepos because those eventually + refer to trees we cannot stream. See for example PR87229 which + shows an example with non-gimplified abstract origins in C++. + Note this should only happen for abstract copies so setting sizes + to NULL is OK (but we cannot easily assert this). */ + else if (expr && !is_gimple_val (expr)) + *expr_p = NULL_TREE; } |