From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6337 invoked by alias); 31 Dec 2009 15:57:31 -0000 Received: (qmail 6250 invoked by uid 48); 31 Dec 2009 15:57:12 -0000 Date: Thu, 31 Dec 2009 15:57:00 -0000 Message-ID: <20091231155712.6249.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/42462] [4.5 Regression] wrong-code with computed-goto In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth 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: 2009-12/txt/msg02904.txt.bz2 ------- Comment #3 from rguenth at gcc dot gnu dot org 2009-12-31 15:57 ------- -O1 -fipa-sra shows the problem as well. We can see wrong (or rather missing) cloning of static initializers: ;; Function void Foo< >::exec2() [with = int] (_ZN3FooIiE5exec2Ev) void Foo< >::exec2() [with = int] (struct FooD.1756 * const thisD.1781) { voidD.35 * gotovar.1D.1832; boolD.1631 D.1831; static voidD.35 * tableD.1795[2] = {&beginL.0, &endL.4}; : gotovar.1D.1832_1 = tableD.1795[0]; goto gotovar.1D.1832_1; beginL.0: endL.4: return; } ;; Function void Foo< >::execute() [with = int] (_ZN3FooIiE7executeEv) void Foo< >::execute() [with = int] (struct FooD.1756 * const thisD.1783) { static voidD.35 * tableD.1795[2] = {&beginL.0, &endL.4}; voidD.35 * gotovar.1D.1845; static voidD.35 * tableD.1795[2] = {&beginL.0, &endL.4}; : gotovar.1D.1845_5 = tableD.1795[0]; goto gotovar.1D.1845_5; beginL.1: endL.2: goto ; } Hm. Honza? This looks like an issue with non-localized vars? -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jamborm at gcc dot gnu dot | |org, hubicka at gcc dot gnu | |dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |wrong-code Last reconfirmed|0000-00-00 00:00:00 |2009-12-31 15:57:11 date| | Summary|wrong-code with computed- |[4.5 Regression] wrong-code |goto |with computed-goto Target Milestone|--- |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42462