diff options
author | Richard Biener <rguenther@suse.de> | 2015-09-16 14:27:52 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-09-16 14:27:52 +0000 |
commit | ae2ffe2a03f4de06e16addce7a62669d7c6eda5e (patch) | |
tree | 5db6a17c851f347374645b43a83fa7130ae8108a /gcc/cfgexpand.c | |
parent | 486bc8471fd5de49262f2b36a17b1be5915436e1 (diff) | |
download | gcc-ae2ffe2a03f4de06e16addce7a62669d7c6eda5e.zip gcc-ae2ffe2a03f4de06e16addce7a62669d7c6eda5e.tar.gz gcc-ae2ffe2a03f4de06e16addce7a62669d7c6eda5e.tar.bz2 |
re PR tree-optimization/67253 (ICE at -O3 on x86_64-linux-gnu (verify_gimple failed))
2015-09-16 Richard Biener <rguenther@suse.de>
PR middle-end/67253
* cfgexpand.c (expand_gimple_stmt_1): Do not clobber
location of possibly shared trees.
* gcc.dg/torture/pr67253.c: New testcase.
From-SVN: r227826
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index d567a87..3036e67 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -3587,7 +3587,9 @@ expand_gimple_stmt_1 (gimple stmt) tree rhs = gimple_assign_rhs1 (assign_stmt); gcc_assert (get_gimple_rhs_class (gimple_expr_code (stmt)) == GIMPLE_SINGLE_RHS); - if (gimple_has_location (stmt) && CAN_HAVE_LOCATION_P (rhs)) + if (gimple_has_location (stmt) && CAN_HAVE_LOCATION_P (rhs) + /* Do not put locations on possibly shared trees. */ + && !is_gimple_min_invariant (rhs)) SET_EXPR_LOCATION (rhs, gimple_location (stmt)); if (TREE_CLOBBER_P (rhs)) /* This is a clobber to mark the going out of scope for |