Summary: | internal compiler error: Segmentation fault | ||
---|---|---|---|
Product: | GDC | Reporter: | zorael <zorael> |
Component: | gdc | Assignee: | Iain Buclaw <ibuclaw> |
Status: | ASSIGNED --- | ||
Severity: | normal | ||
Priority: | --- | ||
Version: | development | ||
Hardware: | All | ||
OS: | Linux |
Description
zorael
2018-09-04 21:35:59 CEST
Reproducible on stable/2.076 also. Reduced and pasted here (gists may have a habit of disappearing). --- void crash() { applyConfiguration(42); } void applyConfiguration(Things...)(Things things) { thingloop: foreach (i; things) { switch (i) { continue thingloop; default: } } } --- Problem is triggered by unrolled loop statements. More complete test that covers three combinations of problems: 1. Continue label in unrolled loop 2. Break label in unrolled loop 3. Loop body unrolled more than once. I have something for 1 and 2, but not 3 currently. --- void test307() { apply307(1, 2, 3); } void apply307(T...)(T ts) { tloop: foreach (t; ts) { switch (t) { continue tloop; default: } } tloop2: foreach (t; ts) { switch (t) { break tloop; default: } } } Actually, there's more. --- void test307() { apply307(1, 2, 3); } void apply307(T...)(T ts) { tloop: foreach (t; ts) { switch (t) { continue tloop; default: } } tloop2: foreach (t; ts) { switch (t) { break tloop; default: } } tloop3: foreach (t; ts) { switch (t) { continue; default: } } tloop4: foreach (t; ts) { switch (t) { break; default: } } } --- I think I have a fix, though will try it out later... |