From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 924 invoked by alias); 27 Jul 2010 12:42:33 -0000 Received: (qmail 528 invoked by uid 48); 27 Jul 2010 12:42:07 -0000 Date: Tue, 27 Jul 2010 12:42:00 -0000 Message-ID: <20100727124207.527.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/45085] incorrect -Wuninitialized warning In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub 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-07/txt/msg02965.txt.bz2 ------- Comment #2 from jakub at gcc dot gnu dot org 2010-07-27 12:42 ------- Simplified testcase for -m32 -O2 -Wuninitialized: struct S { char *s1; long s2; }; struct T { int t1; long t2; long t3; }; extern int fn2 (void); extern int fn3 (struct T); extern struct T fn4 (); extern int fn5 (char **, long *, int); extern void fn6 (void); extern void fn7 (void *); struct S *fn10 (); static int p; static void *q; extern struct T r; static struct T fn8 (struct T x, int y) { struct S *u = fn10 (); int v = fn5 (&u->s1, &u->s2, 0); while (1) { if (p) fn6 (); if (fn3 (x)) return fn4 (); if (y & 1) return r; v = fn5 (&u->s1, &u->s2, 1); } } struct T fn9 (struct T x, int y) { struct T t = fn8 (x, y); if (fn2 ()) fn7 (q); return t; } void * fn1 (void) { return fn9; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45085