← Back to index
|
Original Bugzilla link
Bug 17146 – Internal error: tk.c 266 with -O -inline
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-02-05T00:24:57Z
Last change time
2021-04-08T10:06:27Z
Keywords
backend, ice, ice-on-valid-code, pull
Assigned to
No Owner
Creator
Sönke Ludwig
Comments
Comment #0
by sludwig — 2017-02-05T00:24:57Z
--- final class C { void foo() { S[] s; if (s[$-1] == S.init) {} } } struct S { int[] a; int b; } void bar() { C.init.foo(); } --- compiling with "dmd -O -inline" yields "Internal error: tk.c 266" Original occurrence:
https://github.com/rejectedsoftware/diet-ng/issues/15
Comment #1
by sludwig — 2017-02-05T00:26:01Z
Appears on at least DMD 2.070.0 up to DMD 2.073.0.
Comment #2
by b2.temp — 2019-03-02T09:57:19Z
Nowadays it's dmd: dmd/backend/dvec.d:299: Assertion `v && (b < vec_numbits(v))' failed.
Comment #3
by sludwig — 2020-01-31T14:37:29Z
Appears to have been fixed in 2.084.0
Comment #4
by bugzilla — 2021-04-08T07:29:44Z
The bug is still there. It "disappeared" for a time because asserts were turned off in the backend, obviously that was a bad idea.
Comment #5
by bugzilla — 2021-04-08T07:36:12Z
Simpler test case: struct S { int[] a; int b; } void foo() { S[] s; if (s[$-1] == S.init) {} } void bar() { foo(); }
Comment #6
by dlang-bot — 2021-04-08T08:16:28Z
@WalterBright created dlang/dmd pull request #12403 "fix Issue 17146 - Internal error: tk.c 266 with -O -inline" fixing this issue: - fix Issue 17146 - Internal error: tk.c 266 with -O -inline
https://github.com/dlang/dmd/pull/12403
Comment #7
by dlang-bot — 2021-04-08T10:06:27Z
dlang/dmd pull request #12403 "fix Issue 17146 - Internal error: tk.c 266 with -O -inline" was merged into master: - 19c8234b8e3e81584824e50149729965e4eb4286 by Walter Bright: fix Issue 17146 - Internal error: tk.c 266 with -O -inline
https://github.com/dlang/dmd/pull/12403