Bug 11728 – compile error in std.bigint and -profile

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-12T03:43:33Z
Last change time
2020-03-21T03:56:38Z
Assigned to
No Owner
Creator
Musashi Tamura

Comments

Comment #0 by yuri.musashi.miwa.tamura — 2013-12-12T03:43:33Z
// aaa.d import std.bigint; void main() { BigInt a = "0"; } > dmd -profile aaa Error: 'std.internal.math.biguintcore.BigUint.__invariant' is not nothrow This error is new in v2.064. (does not occur in v2.063) Issue 10295 seems similar, but occurs in v2.063.
Comment #1 by yuri.musashi.miwa.tamura — 2013-12-12T03:47:46Z
Issue 10295 occurs in v2.063 and v2.064.
Comment #2 by yebblies — 2013-12-12T06:52:53Z
Same sort of thing as issue 11375 - the nothrow inference/checking in FuncDeclaration::semantic is a mess. The general problem is the compiler checks/infers nothrowness, then adds more stuff to the function body. The error occurs because later the compiler uses blockExit(tf->isnothrow) to decide if the profiling exit code needs to be wrapped in a try-finally or not.
Comment #3 by b2.temp — 2017-11-15T19:08:35Z
fixed at some point.