core.checkedint is broken with dmd master (2.075): void main() { import core.checkedint; size_t a, b; bool over; addu(a, b, over); } The above program fails to compile in release mode: Error: function core.checkedint.addu cannot inline function
(In reply to thomas.bockman from comment #0) > The above program fails to compile in release mode: (here "in release mode" means with -inline)
Introduced in https://github.com/dlang/dmd/pull/5292
Self-contained test case: --- pragma(inline, true) uint addu(uint x, uint y, ref bool overflow) { uint r = x + y; if (r < x || r < y) overflow = true; return r; } void foo() { size_t a, b; bool over; addu(a, b, over); } ---
https://github.com/dlang/dmd/pull/6815
Possible duplicate: #16350
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/8ff0a0a185e0a7d0c04812cf916fbbe6615f792c fix Issue 17399 - core.checkedint.addu cannot inline function https://github.com/dlang/dmd/commit/c18a27f5a11912695f0b7a74177bde149427496b Merge pull request #6815 from WalterBright/fix17399 fix Issue 17399 - core.checkedint.addu cannot inline function merged-on-behalf-of: unknown
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/8ff0a0a185e0a7d0c04812cf916fbbe6615f792c fix Issue 17399 - core.checkedint.addu cannot inline function https://github.com/dlang/dmd/commit/c18a27f5a11912695f0b7a74177bde149427496b Merge pull request #6815 from WalterBright/fix17399