https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104800
--- Comment #4 from Martin Uecker <muecker at gwdg dot de> ---
Patch (by Martin Sebor)
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index ab24fa98a1f..8f437791d94 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -3971,6 +3971,13 @@ compute_avail (function *fun)
set_bb_may_notreturn = false;
}
+ if (is_gimple_assign (stmt))
+ {
+ tree lhs = gimple_assign_lhs (stmt);
+ if (TREE_THIS_VOLATILE (lhs))
+ set_bb_may_notreturn = true;
+ }
+
/* Cache whether the basic-block has any non-visible side-effect
or control flow.
If this isn't a call or it is the last stmt in the