struct S
{
int field;
}
void main()
{
int a = 1;
S struct_with_long_name;
switch( a )
{
case 0:
struct_with_long_name.field = 444; // ok
break;
with( struct_with_long_name )
{
case 1:
field = 555; // segfault
break;
}
default:
break;
}
}
Comment #1 by yebblies — 2013-07-14T06:40:39Z
This appears to work with 2.064 alpha on win32. Can anybody reproduce?
Comment #2 by bearophile_hugs — 2013-07-14T07:12:04Z
(In reply to comment #1)
> This appears to work with 2.064 alpha on win32. Can anybody reproduce?
I can reproduce the segfault at the annotated line:
struct S {
int field;
}
void main() {
int a = 1;
S s;
switch (a) with (s) {
case 0:
s.field = 444; // ok
break;
case 1:
field = 555; // segfault
break;
default:
break;
}
}
Comment #3 by yebblies — 2013-11-20T22:54:17Z
Ah, this is basically issue 602 with switch instead of goto.