aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2020-05-06 23:34:11 +0200
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 12:57:47 -0300
commit70e5be93f61f87056d591a0069f9ffabcdb7a778 (patch)
treedf70951ad00460851908ea8166de5c247d59cc32 /gcc/tree-inline.c
parent973ebd4d1319fce884ca9d890c0224298fd29496 (diff)
downloadgcc-70e5be93f61f87056d591a0069f9ffabcdb7a778.zip
gcc-70e5be93f61f87056d591a0069f9ffabcdb7a778.tar.gz
gcc-70e5be93f61f87056d591a0069f9ffabcdb7a778.tar.bz2
d: Fix ICE in verify_gimple_stmt, at tree-cfg.c:4959
Both array concat and array new expressions wrapped any temporaries created into a BIND_EXPR. This does not work if an expression used to construct the result requires scope destruction, which is represented by a TARGET_EXPR with a clean-up, and a CLEANUP_POINT_EXPR at the location where the temporaries logically go out of scope. The reason for this not working is because the lowering of cleanup point expressions does not traverse inside BIND_EXPRs to expand any gimple cleanup expressions within. The use of creating BIND_EXPR has been removed at both locations, and replaced with a normal temporary variable that has initialization delayed until its address is taken. gcc/d/ChangeLog: PR d/94970 * d-codegen.cc (force_target_expr): Move create_temporary_var implementation inline here. (create_temporary_var): Remove. (maybe_temporary_var): Remove. (bind_expr): Remove. * d-convert.cc (d_array_convert): Use build_local_temp to generate temporaries, and generate its assignment. * d-tree.h (create_temporary_var): Remove. (maybe_temporary_var): Remove. (d_array_convert): Remove vars argument. * expr.cc (ExprVisitor::visit (CatExp *)): Use build_local_temp to generate temporaries, don't wrap them in a BIND_EXPR. (ExprVisitor::visit (NewExp *)): Likewise. gcc/testsuite/ChangeLog: PR d/94970 * gdc.dg/pr94970.d: New test.
Diffstat (limited to 'gcc/tree-inline.c')
0 files changed, 0 insertions, 0 deletions