From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25464 invoked by alias); 7 May 2002 15:16:10 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 25429 invoked by uid 71); 7 May 2002 15:16:06 -0000 Date: Tue, 07 May 2002 08:16:00 -0000 Message-ID: <20020507151605.25420.qmail@sources.redhat.com> To: jason@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Jason Merrill Subject: Re: c++/6381: [PATCH] Missing assembler label Reply-To: Jason Merrill X-SW-Source: 2002-05/txt/msg00192.txt.bz2 List-Id: The following reply was made to PR c++/6381; it has been noted by GNATS. From: Jason Merrill To: gcc-patches@gcc.gnu.org Cc: gcc-gnats@gcc.gnu.org Subject: Re: c++/6381: [PATCH] Missing assembler label Date: Tue, 07 May 2002 16:14:22 +0100 --=-=-= 6381 is a regression whereby compiling with -g -O causes us to end up with an undefined reference to a static local variable because we wrote out the initializer for another variable in dwarf2out. The simple fix is to disable the problematic code; it means that the debug info will be somewhat less useful for unexpanded constants, but is safe. Mark, can this go onto the branch? I'll work on a better fix for the trunk. 2002-05-07 Jason Merrill * dwarf2out.c (rtl_for_decl_location): Don't try to extract a constant value from DECL_INITIAL. --=-=-= Content-Type: text/x-patch Content-Disposition: inline *** dwarf2out.c.~1~ Sun May 5 22:06:08 2002 --- dwarf2out.c Tue May 7 16:08:53 2002 *************** rtl_for_decl_location (decl) *** 8942,8947 **** --- 8946,8955 ---- rtl = gen_rtx_CONST_STRING (VOIDmode, TREE_STRING_POINTER (init)); } + #if 0 + /* We mustn't actually emit anything here, as we might not get a + chance to emit any symbols we refer to. For the release, don't + try to get this right. */ if (rtl == NULL) { rtl = expand_expr (DECL_INITIAL (decl), NULL_RTX, VOIDmode, *************** rtl_for_decl_location (decl) *** 8951,8956 **** --- 8959,8965 ---- if (rtl && GET_CODE (rtl) == MEM) rtl = NULL; } + #endif } #ifdef ASM_SIMPLIFY_DWARF_ADDR --=-=-=--