[Bug c/34732] New: Optimization flag trigger unexpected crash
ijeukens at yahoo dot com dot br
gcc-bugzilla@gcc.gnu.org
Thu Jan 10 19:27:00 GMT 2008
This is the core of the problem (at comp_0.c):
...
for(j = 0;j < 3;j++) {
comp_0_fptr[j][1]();
}
...
comp_0_fptr holds pointers to void functions. When compiling with -g,
everything works ok. Compiling with -O2, or any other, the effect that I get
is:
comp_0_fptr[0][1]();
comp_0_fptr[1][1]();
comp_0_fptr[1][1]();
and not comp_0_fptr[2][1](); at the last statement.
--
Summary: Optimization flag trigger unexpected crash
Product: gcc
Version: 4.1.3
Status: UNCONFIRMED
Severity: blocker
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ijeukens at yahoo dot com dot br
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34732
More information about the Gcc-bugs
mailing list