aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-switch-conversion.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2012-12-19 13:53:18 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-12-19 13:53:18 +0000
commitd1f985421fff69c6956206f9606c4a9e35b32a70 (patch)
tree16f545224cd8116189b4ccd1992329c439c78de9 /gcc/tree-switch-conversion.c
parentc354951b7ef67f8bbbca3db79734db73880d17a2 (diff)
downloadgcc-d1f985421fff69c6956206f9606c4a9e35b32a70.zip
gcc-d1f985421fff69c6956206f9606c4a9e35b32a70.tar.gz
gcc-d1f985421fff69c6956206f9606c4a9e35b32a70.tar.bz2
re PR lto/55736 (lto ICE: tree code ''junl is not supported in LTO streams)
2012-12-19 Richard Biener <rguenther@suse.de> PR tree-optimization/55736 PR tree-optimization/55703 * gimplify.c (prune_expr_location): New function. (unshare_expr_without_location): Likewise. * tree.h (unshare_expr_without_location): Declare. * ipa-prop.c (prune_expression_for_jf): Remove. (prune_expression_for_jf_1): Likewise. (ipa_set_jf_constant): Use unshare_expr_without_location. (ipa_set_jf_arith_pass_through): Likewise. (determine_known_aggregate_parts): Likewise. * tree-switch-conversion.c (build_constructors): Use unshare_expr_without_location on all constructor elements. * gcc.dg/lto/pr55703_0.c: New testcase. From-SVN: r194609
Diffstat (limited to 'gcc/tree-switch-conversion.c')
-rw-r--r--gcc/tree-switch-conversion.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index 9eed5e0..d250a94 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -873,7 +873,8 @@ build_constructors (gimple swtch, struct switch_conv_info *info)
constructor_elt elt;
elt.index = int_const_binop (MINUS_EXPR, pos, info->range_min);
- elt.value = info->default_values[k];
+ elt.value
+ = unshare_expr_without_location (info->default_values[k]);
info->constructors[k]->quick_push (elt);
}
@@ -899,7 +900,7 @@ build_constructors (gimple swtch, struct switch_conv_info *info)
constructor_elt elt;
elt.index = int_const_binop (MINUS_EXPR, pos, info->range_min);
- elt.value = val;
+ elt.value = unshare_expr_without_location (val);
info->constructors[j]->quick_push (elt);
pos = int_const_binop (PLUS_EXPR, pos, integer_one_node);