Bug 23499 – inliner crashes/asserts when building for 32-bit
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2022-11-20T22:58:32Z
Last change time
2023-01-01T06:25:12Z
Keywords
backend, pull
Assigned to
No Owner
Creator
Rainer Schuetze
Comments
Comment #0 by r.sagitario — 2022-11-20T22:58:32Z
Building visuald with dmd 2.101 causes the compiler to crash. Using a dmd build with assertions enabled shows
core.exception.AssertError@..\dmd\backend\inliner.d(404): Assertion failure
Reducing both visuald and phobos results in this test case:
///---- file.d
struct TempCStringBuffer(To )
{
~this()
{
}
To* _ptr;
}
auto tempCString(To, From)(From)
{
return TempCStringBuffer!To();
}
bool exists(R)(R name)
{
return name.tempCString!wchar._ptr != null;
}
///---- automation.d
import file;
///--- build.d
import file;
bool do_build()
{
string outdir ;
return (exists(outdir));
}
///
executing "dmd -m32mscoff -O -inline -c automation.d build.d"
yields the assertion. The same for -m32omf. It doesn't crash if you omit automation.d or add file.d to the command line.
Comment #1 by dlang-bot — 2022-12-20T07:08:03Z
@WalterBright created dlang/dmd pull request #14721 "fix Issue 23499 - inliner crashes/asserts when building for 32-bit" fixing this issue:
- fix Issue 23499 - inliner crashes/asserts when building for 32-bit
https://github.com/dlang/dmd/pull/14721
Comment #2 by dlang-bot — 2022-12-21T12:32:17Z
@RazvanN7 created dlang/dmd pull request #14730 "fix Issue 23499 - inliner crashes/asserts when building for 32-bit" fixing this issue:
- fix Issue 23499 - inliner crashes/asserts when building for 32-bit
https://github.com/dlang/dmd/pull/14730
Comment #3 by dlang-bot — 2022-12-21T13:30:11Z
dlang/dmd pull request #14730 "fix Issue 23499 - inliner crashes/asserts when building for 32-bit" was merged into stable:
- 09add6e05e3be860bd5afec0ac5935be9d12f86b by Walter Bright:
fix Issue 23499 - inliner crashes/asserts when building for 32-bit
https://github.com/dlang/dmd/pull/14730
Comment #4 by ibuclaw — 2022-12-30T15:56:53Z
*** Issue 23585 has been marked as a duplicate of this issue. ***
Comment #5 by dlang-bot — 2023-01-01T06:25:12Z
dlang/dmd pull request #14765 "merge stable" was merged into master:
- a5d68293ce8611b7d06e10300b904339e69aa5ac by Razvan Nitu:
fix Issue 23499 - inliner crashes/asserts when building for 32-bit (#14730)
Co-authored-by: Walter Bright <[email protected]>
https://github.com/dlang/dmd/pull/14765