aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/toir.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d/toir.cc')
-rw-r--r--gcc/d/toir.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/d/toir.cc b/gcc/d/toir.cc
index ee3e3d5..41d07a7 100644
--- a/gcc/d/toir.cc
+++ b/gcc/d/toir.cc
@@ -1068,6 +1068,13 @@ public:
add_stmt (return_expr (decl));
}
+ else if (tf->next->ty == Tnoreturn)
+ {
+ /* Returning an expression that has no value, but has a side effect
+ that should never return. */
+ add_stmt (build_expr_dtor (s->exp));
+ add_stmt (return_expr (NULL_TREE));
+ }
else
{
/* Convert for initializing the DECL_RESULT. */