public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* debug/10004: gcc -g does not always include labels in concrete inlined instance tree
@ 2003-03-08 14:36 werner
  0 siblings, 0 replies; only message in thread
From: werner @ 2003-03-08 14:36 UTC (permalink / raw)
  To: gcc-gnats


>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 <<EOF >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:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-08 14:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-08 14:36 debug/10004: gcc -g does not always include labels in concrete inlined instance tree werner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).