Bug 17399 – [REG2.071] core.checkedint.addu cannot inline function

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-05-15T19:21:00Z
Last change time
2017-08-07T13:16:33Z
Keywords
rejects-valid
Assigned to
nobody
Creator
thomas.bockman
See also
https://issues.dlang.org/show_bug.cgi?id=16652

Comments

Comment #0 by thomas.bockman — 2017-05-15T19:21:46Z
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
Comment #1 by dlang-bugzilla — 2017-05-16T06:08:16Z
(In reply to thomas.bockman from comment #0) > The above program fails to compile in release mode: (here "in release mode" means with -inline)
Comment #2 by dlang-bugzilla — 2017-05-16T06:14:24Z
Comment #3 by bugzilla — 2017-05-19T18:13:50Z
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); } ---
Comment #4 by bugzilla — 2017-05-19T19:00:38Z
Comment #5 by safety0ff.bugz — 2017-05-23T20:37:01Z
Possible duplicate: #16350
Comment #6 by github-bugzilla — 2017-06-08T18:09:40Z
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
Comment #7 by github-bugzilla — 2017-08-07T13:16:33Z
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