Thread overview
[Issue 17876] [REG 2.074] Internal error when comparing inout(Foo[][]) with Foo[][]
[Issue 17876] Internal error with red black tree of array of arrays
Oct 04, 2017
Christian Durán
Oct 04, 2017
ag0aep6g@gmail.com
Oct 08, 2017
Rainer Schuetze
October 04, 2017
https://issues.dlang.org/show_bug.cgi?id=17876

--- Comment #1 from Christian Durán <ovejacuantica@gmail.com> ---
Probably just needs a better error message because it seems to happen because there's no ordering for the type.

--
October 04, 2017
https://issues.dlang.org/show_bug.cgi?id=17876

ag0aep6g@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice
                 CC|                            |ag0aep6g@gmail.com
          Component|phobos                      |dmd
           Hardware|x86_64                      |All
            Summary|Internal error with red     |[REG 2.074] Internal error
                   |black tree of array of      |when comparing
                   |arrays                      |inout(Foo[][]) with Foo[][]
                 OS|Linux                       |All
           Severity|normal                      |regression

--- Comment #2 from ag0aep6g@gmail.com ---
Reduced (it's the result of using `binaryFun!"a < b"` in the `inout` method
`_firstGreaterEqual`):
----
bool _less(inout size_t[][] a, size_t[][] b) { return a < b; }
----

I don't know if this should compile or throw an error. Any way, it shouldn't ICE.

dmd2.073.0 accepts the code, making this a regression.

Changing component to dmd as that's where the bug manifests as an ICE. The actual bug might be in druntime.

--
October 05, 2017
https://issues.dlang.org/show_bug.cgi?id=17876

Steven Schveighoffer <schveiguy@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy@yahoo.com

--- Comment #3 from Steven Schveighoffer <schveiguy@yahoo.com> ---
this should compile, size_t[][] has a valid ordering.

If the ice is fixed, and this doesn't compile, please file another bug report.

--
October 08, 2017
https://issues.dlang.org/show_bug.cgi?id=17876

Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |r.sagitario@gmx.de

--- Comment #4 from Rainer Schuetze <r.sagitario@gmx.de> ---
https://github.com/dlang/druntime/pull/1934

--
October 09, 2017
https://issues.dlang.org/show_bug.cgi?id=17876

--- Comment #5 from github-bugzilla@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/druntime

https://github.com/dlang/druntime/commit/70d536eddf2bab82e428ea397dec8b4093c9f3c1
fix Issue 17876 - moved bad assertion that failed for arrays of arrays with
mixed modifiers to the memcmp version which should work on values anyway.
Also fixed bad comparison via memcmp only comparing first element.

https://github.com/dlang/druntime/commit/ec9a79e15d446863191308fd5e20febce2053546 Merge pull request #1934 from rainers/issue_17876

fix Issue 17876 - [REG 2.074] Internal error when comparing inout(Foo[][]) with
Foo[][]

--
October 09, 2017
https://issues.dlang.org/show_bug.cgi?id=17876

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
October 09, 2017
https://issues.dlang.org/show_bug.cgi?id=17876

--- Comment #6 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/druntime

https://github.com/dlang/druntime/commit/70d536eddf2bab82e428ea397dec8b4093c9f3c1 fix Issue 17876 - moved bad assertion that failed for arrays of arrays with mixed modifiers to the memcmp version which should work on values anyway.

https://github.com/dlang/druntime/commit/ec9a79e15d446863191308fd5e20febce2053546 Merge pull request #1934 from rainers/issue_17876

--