For the below test:
int main() {
volatile int foo = 4;
int read1 = foo;
int read2 = foo;
switch ((read1 == 4) ? 3 : 1) {
case 1:
read1 *= read2;
break;
case 3:
read1 /= read2;
break;
}
return read1;
}Debug location information for 'read1' is wrong with -O2.
When in the debugger, on the line "return read1;", the value of "read1"
is reported as '4', where it should be '1', as described by: