public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/63581] New: undefined references in debug_info
@ 2014-10-17 21:21 xur at google dot com
  2014-10-17 21:57 ` [Bug debug/63581] " xur at google dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: xur at google dot com @ 2014-10-17 21:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63581
           Summary: undefined references in debug_info
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xur at google dot com

Created attachment 33752
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33752&action=edit
reproducer

I got the following error when compiling a file with FDO.

/tmp/cc6azLyK.o:(.debug_info+0x228): undefined reference to `.L29'

The error is triggered by function splitting. Adding
-fno-reorder-blocks-and-partition will make the build pass.

Here is the diagnosis: 
We generate a label die and assume the label instruction will be generated in
final pass. This label is marked as deleted, but because it's a user
defined label, we should output it in the final pass. 

This label instruction is removed from insn stream in
record_effective_endpoints() and put the header of one bb and later
merged to the footer of another. The bb footer got overwritten in
emit_barrier_after_bb() (from add_labels_and_missing_jumps()). Since it's
overwritten, it never gets to put back to inst stream in cfg_layout_finalize.

I think the overwritten in emit_barrier_after_bb() is wrong. We should append
to the bb footer if the footer contains non-barrier instruction.

Once I do the appending, the label is emitted.

Reproducer attached. Build instructions are in the head of the file.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-18  7:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-17 21:21 [Bug debug/63581] New: undefined references in debug_info xur at google dot com
2014-10-17 21:57 ` [Bug debug/63581] " xur at google dot com
2014-11-14  0:31 ` xur at gcc dot gnu.org
2021-09-18  7:48 ` pinskia at gcc dot gnu.org

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).