From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25974 invoked by alias); 22 Jun 2010 12:26:57 -0000 Received: (qmail 25776 invoked by uid 48); 22 Jun 2010 12:26:35 -0000 Date: Tue, 22 Jun 2010 12:26:00 -0000 Message-ID: <20100622122635.25774.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/44612] -flto -fwhole-program: Never read variable not optimized away In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" 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: 2010-06/txt/msg02181.txt.bz2 ------- Comment #4 from burnus at gcc dot gnu dot org 2010-06-22 12:26 ------- (In reply to comment #2) > Your testcase doesn't build: > REAL,contiguous :: a(:,:,:,:) > 1 > Error: Invalid character in name at (1) If you want to test it with other compilers than the latest trunk, you can simply take out the "contiguous" - though, as Jakub mentioned, it should build with the latest GCC trunk builds. * * * C test case: $ gcc -flto -fwhole-program -O3 -std=c99 test.c && time ./a.out Start Done real 0m0.699s user 0m0.676s sys 0m0.004s #include #define SIZE 40000 void s4 (float *restrict a) { (void) __builtin_memset ((void *) a, 0, sizeof(float)*SIZE); } int main () { static float a[SIZE]; int i; printf("Start\n"); for (i = 0; i < SIZE; i++) s4 (a); printf("Done\n"); return 0; } -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2010-06-22 12:26:35 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44612