https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102428
Bug ID: 102428
Summary: d: Set TREE_NOTHROW for nothrow functions and library
calls
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: d
Assignee: ibuclaw at gdcproject dot org
Reporter: ibuclaw at gdcproject dot org
Target Milestone: ---
Related to pr94496. This in particular prevents us from using RAII when
-fno-exceptions is in effect.
i.e:
---
int test(int i) nothrow
{
int j = i ? S(3).i : 3; // generates __builtin_unwind_resume()
return j;
}
struct S
{
int i;
this(int i) nothrow { this.i += i; }
~this() nothrow { i = 0; }
}
---
Prevents the tests in the upstream D2 testsuite from being merged in, which are
expected to link without any D run-time.
gdc.test/runnable/bcraii.d
gdc.test/runnable/bcraii2.d
gdc.test/runnable/test20734.d