Bug 12900 – REG 2.065: Wrong code in IfStatement condition Expression

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-06-12T17:10:00Z
Last change time
2014-06-25T20:53:52Z
Keywords
wrong-code
Assigned to
ibuclaw
Creator
ibuclaw
Depends on
8913
Blocks
7175

Comments

Comment #0 by ibuclaw — 2014-06-12T17:10:10Z
This was fixed once back in 2.062, and now it's back again in 2.065! See: https://issues.dlang.org/show_bug.cgi?id=8913 http://bugzilla.gdcproject.org/show_bug.cgi?id=24 This is blocking MinGW port for GDC 2.065 merge.
Comment #1 by ibuclaw — 2014-06-12T17:27:04Z
PR that fixed 8913: https://github.com/D-Programming-Language/dmd/pull/1382 PR that reverted changed and re-introduced this problem: https://github.com/D-Programming-Language/dmd/pull/2888 Now it's interesting that 7175 was raised before 8913 and the fix that went into 8913. Oh well, I'll set this as a blocks anyhow.
Comment #2 by ibuclaw — 2014-06-12T17:31:58Z
Infact, regardless of whether or not this blocks mingw builds, it is reproducible on all targets. This is a *serious* bug.
Comment #3 by yebblies — 2014-06-13T02:29:41Z
If it doesn't have a test case or assert in dmd it's probably not going to stay fixed.
Comment #4 by ibuclaw — 2014-06-13T07:25:26Z
If there's a way to distinguish between different kinds of type in dmd's backend, you could throw in some tree checking. Such as: Assignments, left and right types are compatible. Comparisons, left and right types are compatible. Returns, return value type and function return type are compatible. Conditions, condition is a scalar type. Of course, you don't need this sort of checking in dmd release builds. :)
Comment #5 by ibuclaw — 2014-06-13T09:48:36Z
Comment #6 by ibuclaw — 2014-06-13T09:49:36Z
This is also blocking the next binary release of gdc.
Comment #7 by ibuclaw — 2014-06-13T09:50:33Z
(In reply to yebblies from comment #3) > If it doesn't have a test case or assert in dmd it's probably not going to > stay fixed. It's going in the gdc testsuite. :)
Comment #8 by johannespfau — 2014-06-14T07:57:08Z
Comment #9 by github-bugzilla — 2014-06-25T20:53:52Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6dd50d5c296dea9b565a5f2754c249d4f6db5141 fix Issue 12900 - Wrong code in IfStatement condition Expression https://github.com/D-Programming-Language/dmd/commit/d664daebede34c6bf913af43f26c1d9673203414 Merge pull request #3685 from 9rnsr/fix12900 More conservative fix for issue 12900 - Wrong code in IfStatement condition Expression