From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29528 invoked by alias); 28 May 2008 08:22:37 -0000 Received: (qmail 29381 invoked by uid 48); 28 May 2008 08:21:54 -0000 Date: Wed, 28 May 2008 08:22:00 -0000 Message-ID: <20080528082154.29380.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/36352] missed "inlining" of static untouched variable in linked once function In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pinskia 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: 2008-05/txt/msg02048.txt.bz2 ------- Comment #1 from pinskia at gcc dot gnu dot org 2008-05-28 08:21 ------- I think this is more of an issue of changing the variable to be readonly than an "inlining" the variable issue as the following source works as expected: template int f(int i) { static const int t = a; static const int t1 = a; return i?t:t1; } int g(void) { return f<1>(1); } -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|missed "inlining" of static |missed "inlining" of static |untouched variable in linked|untouched variable in linked |once function |once function http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36352