From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6018 invoked by alias); 8 Mar 2003 14:36:00 -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 5976 invoked by uid 71); 8 Mar 2003 14:36:00 -0000 Resent-Date: 8 Mar 2003 14:36:00 -0000 Resent-Message-ID: <20030308143600.5975.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, werner@almesberger.net Received: (qmail 2615 invoked from network); 8 Mar 2003 14:27:01 -0000 Received: from unknown (HELO host.almesberger.net) (63.105.73.239) by 172.16.49.205 with SMTP; 8 Mar 2003 14:27:01 -0000 Received: from almesberger.net (vpnwa-home [10.200.0.2]) by host.almesberger.net (8.11.6/8.9.3) with ESMTP id h28ER0c27601 for ; Sat, 8 Mar 2003 06:27:00 -0800 Received: (from werner@localhost) by almesberger.net (8.11.6/8.11.6) id h28EQvm26925; Sat, 8 Mar 2003 11:26:57 -0300 Message-Id: <200303081426.h28EQvm26925@almesberger.net> Date: Sat, 08 Mar 2003 14:36:00 -0000 From: werner@almesberger.net To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: 3.113 Subject: debug/10004: gcc -g does not always include labels in concrete inlined instance tree X-SW-Source: 2003-03/txt/msg00403.txt.bz2 List-Id: >Number: 10004 >Category: debug >Synopsis: gcc -g does not always include labels in concrete inlined instance tree >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sat Mar 08 14:36:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Werner Almesberger >Release: 3.3 20030303 (prerelease) >Organization: >Environment: System: Linux ar 2.4.18 #5 Mon Mar 18 09:25:24 ART 2002 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ./configure --prefix=/usr/local/gcc20030303/ --enable-languages=c >Description: gcc doesn't always generate information for the label in the concrete inlined instance tree (see example), even though the label location would exist in the generated code. If I change the inlined function a bit, it sometimes does. >How-To-Repeat: Example (with Red Hat's gcc 3.1 20011127 on ia32): $ cat <foo.c int xyz; static inline int foo(int bar) { label: xyz = bar; } void main(int argc) { foo(123); } EOF $ gcc -w -g foo.c # gcc 3.3: gcc -w -g -finline foo.c $ readelf -w a.out | grep label <2><84>: Abbrev Number: 9 (DW_TAG_label) DW_AT_name : (indirect string, offset: 0x55): label 9 DW_TAG_label [no children] 0x00000050 2f676363 006c6162 656c00 /gcc.label. $ objdump -d a.out ... 80483af: 8b 45 fc mov 0xfffffffc(%ebp),%eax 80483b2: a3 34 95 04 08 mov %eax,0x8049534 ... >Fix: Work-around: don't depend on labels :-( >Release-Note: >Audit-Trail: >Unformatted: