Bug 11717 – CTFE: non-constant value with array and vector ops.

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-10T04:47:10Z
Last change time
2021-01-02T07:58:51Z
Keywords
CTFE, pull, rejects-valid, SIMD
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2013-12-10T04:47:10Z
Currently, trying to do array/vector operations in CTFE causes an ICE. Tests: --- enum int[4] A = [1,2,3,4]; enum int[4] B = [1,2,3,4]; // Internal Compiler Error: non-constant value [1, 2, 3, 4] enum int[4] C = A[] + B[]; import core.simd; enum int4 D = [1,2,3,4]; enum int4 E = [1,2,3,4]; // Internal Compiler Error: non-constant value [1, 2, 3, 4] enum int4 F = D + E;
Comment #1 by john.loughran.colvin — 2014-12-18T22:56:42Z
*** Issue 12401 has been marked as a duplicate of this issue. ***
Comment #2 by bugzilla — 2016-04-25T09:17:46Z
Add a proper error message at least: https://github.com/dlang/dmd/pull/5706 until a fix can be devised.
Comment #3 by github-bugzilla — 2016-04-25T18:51:12Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/f571e8a3ee9d460152e43a08dabf96d5ed5d72d9 add error message for Issue 11717 - CTFE: [ICE] non-constant value with array and vector ops https://github.com/dlang/dmd/commit/0a9712f66c2658756f2d69b463e1879c24b3a80c Merge pull request #5706 from WalterBright/address11717 add error message for Issue 11717 - CTFE: [ICE] non-constant value wi…
Comment #4 by github-bugzilla — 2016-10-01T11:46:32Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/f571e8a3ee9d460152e43a08dabf96d5ed5d72d9 add error message for Issue 11717 - CTFE: [ICE] non-constant value with array and vector ops https://github.com/dlang/dmd/commit/0a9712f66c2658756f2d69b463e1879c24b3a80c Merge pull request #5706 from WalterBright/address11717
Comment #5 by github-bugzilla — 2017-08-02T08:07:24Z
Comment #6 by b2.temp — 2019-07-11T00:31:31Z
ICE are gone since 2.072
Comment #7 by ibuclaw — 2019-07-11T04:51:00Z
Replacing an ICE with an error is not a fix. Updating tags from ice to rejects-valid.
Comment #8 by b2.temp — 2019-07-11T07:05:35Z
You should change the title as well. (this is why I closed : the issue was about the ICE. Change the title and it's a complete different thing)
Comment #9 by dlang-bot — 2020-12-31T10:24:10Z
@WalterBright created dlang/dmd pull request #12083 "fix Issue 11717 - CTFE: non-constant value with array and vector ops" fixing this issue: - fix Issue 11717 - CTFE: non-constant value with array and vector ops https://github.com/dlang/dmd/pull/12083
Comment #10 by dlang-bot — 2021-01-02T07:58:51Z
dlang/dmd pull request #12083 "fix Issue 11717 - CTFE: non-constant value with array and vector ops" was merged into master: - 6a958967ccc8261d2095625492e27f22e1078b0b by Walter Bright: fix Issue 11717 - CTFE: non-constant value with array and vector ops https://github.com/dlang/dmd/pull/12083