[Bug c/14327] New: -O0 -fdefer-pop generates wrong code
jfran at clip dot dia dot fi dot upm dot es
gcc-bugzilla@gcc.gnu.org
Fri Feb 27 23:59:00 GMT 2004
The following program is not compiled correctly
and produces a segmentation fault if compiled with
-O0 -fderef-pop. The code is compiled correctly
with -fno-defer-pop, or using a version =<3.2
//
int code[]={0,0,0,0,1};
void foo(int x) {
volatile int b;
b = 0xffffffff;
}
void bar(int *pc) {
static const void *l[] = {&&lab0, &&end};
foo(0);
goto *l[*pc];
lab0:
foo(0);
pc++;
goto *l[*pc];
end:
return;
}
int main() {
bar(code);
return 0;
}
--
Summary: -O0 -fdefer-pop generates wrong code
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: critical
Priority: P1
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jfran at clip dot dia dot fi dot upm dot es
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14327
More information about the Gcc-bugs
mailing list