[Issue 23126] wrong result of integer division in presence of assert within conditional operator expression

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 27 20:12:38 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23126

--- Comment #2 from kdevel <kdevel at vogtner.de> ---
(In reply to kdevel from comment #0)
> $ dmd div.d
> $ ./div 1 2
> 1 / 2 = 2

dmd 2.100.2: bad

$ ./div 1 2
1 / 2 = 2

dmd 2.101.1 and newer: good

$ ./div 1 2
1 / 2 = 0


(In reply to Paul Backus from comment #1)
> Reduced:
>
> As of DMD 2.100.0, with -checkaction=context, this produces the following
> output:

Works since dmd 2.101.1.

--


More information about the Digitalmars-d-bugs mailing list