public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gprocida at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/112372] GCC omits function location in DWARF at higher optimisation levels
Date: Fri, 03 Nov 2023 18:48:54 +0000	[thread overview]
Message-ID: <bug-112372-4-X0inF0dIDy@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112372-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112372

--- Comment #2 from Giuliano Procida <gprocida at google dot com> ---
The symbols are not aliased (which is what I thought might have happened with
very aggressive optimisations). If they had been aliased, it would be much
harder to give the symbols types.

0000000000000000 T x
0000000000000010 T y
0000000000000020 T z

Also:

Disassembly of section .text:

0000000000000000 <x>:
   0:   c3                      ret
   1:   66 66 2e 0f 1f 84 00    data16 cs nopw 0x0(%rax,%rax,1)
   8:   00 00 00 00 
   c:   0f 1f 40 00             nopl   0x0(%rax)

0000000000000010 <y>:
  10:   c3                      ret
  11:   66 66 2e 0f 1f 84 00    data16 cs nopw 0x0(%rax,%rax,1)
  18:   00 00 00 00 
  1c:   0f 1f 40 00             nopl   0x0(%rax)

0000000000000020 <z>:
  20:   c3                      ret

So it should have been entirely possible to assign the correct byte ranges
(low/high PC) to the 3 functions.

  parent reply	other threads:[~2023-11-03 18:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 18:36 [Bug debug/112372] New: " gprocida at google dot com
2023-11-03 18:41 ` [Bug debug/112372] " pinskia at gcc dot gnu.org
2023-11-03 18:48 ` gprocida at google dot com [this message]
2023-11-03 18:52 ` pinskia at gcc dot gnu.org
2023-11-03 19:19 ` gprocida at google dot com
2023-11-06  8:06 ` [Bug ipa/112372] " rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-112372-4-X0inF0dIDy@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).