This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/34732] New: Optimization flag trigger unexpected crash
- From: "ijeukens at yahoo dot com dot br" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jan 2008 19:21:52 -0000
- Subject: [Bug c/34732] New: Optimization flag trigger unexpected crash
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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