Repository navigation
[REG2.065] Issue 13321 - Wrong goto skips declaration error - #3885
3 commits merged into
Conversation
Do you have some examples to explain what this is about? |
|
Untested example: struct S { int[64] data; this(int) {}}
void main() { S s = S(1); }I just copied the part from |
|
Hmm, ok. I thought this would mean that the default struct init would be the backing memory for the constructor call, and therefore could be corrupted by modifications inside the constructor, but the code at e2ir.c:3394 ( visit(CallExp*) ) clears it: struct S { int[64] data = [0, 1, 2, 3, 4, 5, 6, 7]; this(int x) { data[0] = x; }}
void func(S s, S s2) { assert(s.data[0] == 1); assert(s2.data[0] == 2); }
void main() { func(S(1), S(2)); } |
|
This fix strikes me as fixing something else, not the root problem. I suggest the fix should be to not issue the error message if the variable is a compiler generated temporary, i.e. is STCtemp. |
|
I thought same idea, but some |
|
Hmm, you're right, but such a patch would at least get us past the 2.066 regression. |
ea8e134 to
8354442
Compare
|
I'm not sure why |
25a1705 to
7eeffe7
Compare
|
@9rnsr Could these changes have exposed a bug in the codegen? It's failing with |
|
Maybe. But it does not reproduce in Windows platform, and I don't have OSX environment. So fixing it is very difficult to me... |
998b0d5 to
0121c52
Compare
|
Since some days (weeks?) ago, this PR passes in all platforms. |
Do you know if the |
|
@yebblies In |
|
Rebased, and ready to merge. |
|
Ping. |
|
Auto-merge toggled on |
|
BSD failure was unrelated, automerging. |
[REG2.065] Issue 13321 - Wrong goto skips declaration error
|
This seems to have introduced a regression. |
|
Can we revert the problematic commit 91e6e87 until the regression get's fixed? |
|
@9rnsr, can you please check whether we changed anything about the initialization before calling the ctor. The struct in Higgs had a union that was only partially initialized. |
|
@MartinNowak Maybe it's a glue layer issue, or we might need to add more information about that into front-end layer. But, I don't have enough time to find actual issue without repro case. Could you please post it in bugzilla? |
I added a comment here https://issues.dlang.org/show_bug.cgi?id=13952#c4 @9rnsr. |
|
This pull request introduced a regression: |
* [spec/expression] Add array literal heap allocation section Also tweak `@nogc` items. * Add 3 more cases
https://issues.dlang.org/show_bug.cgi?id=13321
Requires Phobos bug fix: dlang/phobos#2454