From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30994 invoked by alias); 10 Jan 2008 19:22:34 -0000 Received: (qmail 27819 invoked by uid 48); 10 Jan 2008 19:21:52 -0000 Date: Thu, 10 Jan 2008 19:27:00 -0000 Subject: [Bug c/34732] New: Optimization flag trigger unexpected crash X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ijeukens at yahoo dot com dot br" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg00954.txt.bz2 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