From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21560 invoked by alias); 21 Oct 2008 11:47:29 -0000 Received: (qmail 21361 invoked by uid 48); 21 Oct 2008 11:46:07 -0000 Date: Tue, 21 Oct 2008 11:47:00 -0000 Message-ID: <20081021114607.21360.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug debug/36668] [4.4 Regression] FAIL: g++.dg/other/PR23205.C scan-assembler .stabs.*foobar:c=i 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: 2008-10/txt/msg01325.txt.bz2 ------- Comment #3 from jakub at gcc dot gnu dot org 2008-10-21 11:46 ------- With -fno-toplevel-reorder this generated foobar variable in .rodata already in 4.3, maybe earlier. The interesting code is in decide_is_variable_needed: /* When not reordering top level variables, we have to assume that we are going to keep everything. */ if (flag_toplevel_reorder) return false; /* We want to emit COMDAT variables only when absolutely necessary. */ if (DECL_COMDAT (decl)) return false; return true; Is that true even with unit-at-a-time that we have to assume all vars are potentially used? After all, we should know all the variables, their initializers and functions at this point. If we can't change this, then I guess either the testcase should be passed -ftoplevel-reorder, or matching foobar:(c=i|S) . Honza? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36668