public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/99490] New: -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file
@ 2021-03-09 16:47 jan.kratochvil at redhat dot com
  2021-03-09 16:48 ` [Bug debug/99490] " jan.kratochvil at redhat dot com
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: jan.kratochvil at redhat dot com @ 2021-03-09 16:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99490
           Summary: -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main
                    file, not .dwo file
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jan.kratochvil at redhat dot com
  Target Milestone: ---

FAIL: gcc-11.0.0-0.19.fc35.x86_64
PASS: clang-12.0.0-0.1.rc1.fc35.x86_64

double p_ext=3.14,e_ext=2.71;
int main(void) {
  double q,f;
  { volatile double p=p_ext;
    q=p/1.1;
  }
  { volatile double e=e_ext;
    f=e/1.1;
  }
  return q+f;
}

clang -o range-clang range.c -Wall -O3 -gdwarf-5 -gsplit-dwarf;gcc -o
range-gcc.s range.c -Wall -O3 -gdwarf-5 -gsplit-dwarf
llvm-readelf -WS range-{clang,gcc}{,.dwo} | egrep '^File:|debug_rnglists'
File: range-clang
File: range-clang.dwo
  [ 6] .debug_rnglists.dwo PROGBITS      0000000000000000 0001d4 000017 00   E 
0   0  1
Actual:
File: range-gcc
  [33] .debug_rnglists   PROGBITS        0000000000000000 004c0a 000049 00     
0   0  1
File: range-gcc.dwo
Expected:
File: range-gcc
File: range-gcc.dwo
  [33] .debug_rnglists   PROGBITS        0000000000000000 004c0a 000049 00     
0   0  1

DWARF-5 spec:
"The .debug_rnglists.dwosection contains range lists referenced by any
DW_AT_ranges attributes in the split DWARF object."
"Range lists are contained in a separate object file section called
.debug_rnglists or .debug_rnglists.dwo (in split units)."

Reproducer from attached .s files:
: clang -S -o range-clang.s range.c -Wall -O3 -gdwarf-5 -gsplit-dwarf;clang -o
range-clang range-clang.s -Wall -gdwarf-5 -gsplit-dwarf;: gcc -S -o range-gcc.s
range.c -Wall -O3 -gdwarf-5 -gsplit-dwarf;gcc -o range-gcc range-gcc.s -Wall
-gdwarf-5 -gsplit-dwarf

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

end of thread, other threads:[~2021-03-31 19:39 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 16:47 [Bug debug/99490] New: -gdwarf-5 -gsplit-dwarf puts .debug_rnglists to main file, not .dwo file jan.kratochvil at redhat dot com
2021-03-09 16:48 ` [Bug debug/99490] " jan.kratochvil at redhat dot com
2021-03-09 16:48 ` jan.kratochvil at redhat dot com
2021-03-09 19:31 ` marxin at gcc dot gnu.org
2021-03-09 20:10 ` jan.kratochvil at redhat dot com
2021-03-10  9:53 ` jakub at gcc dot gnu.org
2021-03-10 10:17 ` mark at gcc dot gnu.org
2021-03-10 11:35 ` jakub at gcc dot gnu.org
2021-03-10 11:43 ` jan.kratochvil at redhat dot com
2021-03-10 12:03 ` jakub at gcc dot gnu.org
2021-03-10 12:06 ` jakub at gcc dot gnu.org
2021-03-10 12:29 ` jan.kratochvil at redhat dot com
2021-03-10 22:10 ` jakub at gcc dot gnu.org
2021-03-10 22:17 ` jan.kratochvil at redhat dot com
2021-03-10 22:21 ` jakub at gcc dot gnu.org
2021-03-10 23:18 ` jan.kratochvil at redhat dot com
2021-03-11 12:20 ` jakub at gcc dot gnu.org
2021-03-11 12:46 ` jakub at gcc dot gnu.org
2021-03-12  9:00 ` jan.kratochvil at redhat dot com
2021-03-12  9:22 ` [Bug debug/99490] [11 Regression] " jakub at gcc dot gnu.org
2021-03-31 19:27 ` cvs-commit at gcc dot gnu.org
2021-03-31 19:39 ` jakub 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).