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

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #8)
> (In reply to Richard Biener from comment #7)
> > (In reply to Iain Sandoe from comment #5)
> > > =========  pr78651 is:
> > > 
> > > $ /XC/9.4/usr/bin/lldb --
> > > /scratch/10-12-sie/gcc-trunk-unpatched/gcc/testsuite/g++2/../../lto1 -fPIC
> > > -feliminate-unused-debug-symbols -quiet -dumpdir ./ -dumpbase pr78651.exe
> > > -mmacosx-version-min=10.12.0 -mtune=core2 -m32 
> > > -mmacosx-version-min=10.12.0
> > > -mtune=core2 -auxbase-strip pr78651.exe.lto.o -g -O2 -O2 -version
> > > -fdiagnostics-color=never -fno-openmp -fno-openacc -fsanitize=address
> > > -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
> > > -fmessage-length=0 -flto-partition=none -fpic
> > > @/var/folders/tj/17r7407j14d324dzf67cnvxm000114/T//ccUkv7Up -o pr78651.s
> > > (lldb) target create
> > > "/scratch/10-12-sie/gcc-trunk-unpatched/gcc/testsuite/g++2/../../lto1"
> > > Current executable set to
> > > '/scratch/10-12-sie/gcc-trunk-unpatched/gcc/testsuite/g++2/../../lto1'
> > > (x86_64).
> > > (lldb) settings set -- target.run-args  "-fPIC"
> > > "-feliminate-unused-debug-symbols" "-quiet" "-dumpdir" "./" "-dumpbase"
> > > "pr78651.exe" "-mmacosx-version-min=10.12.0" "-mtune=core2" "-m32"
> > > "-mmacosx-version-min=10.12.0" "-mtune=core2" "-auxbase-strip"
> > > "pr78651.exe.lto.o" "-g" "-O2" "-O2" "-version" 
> > > "-fdiagnostics-color=never"
> > > "-fno-openmp" "-fno-openacc" "-fsanitize=address"
> > > "-fno-diagnostics-show-caret" "-fno-diagnostics-show-line-numbers"
> > > "-fmessage-length=0" "-flto-partition=none" "-fpic"
> > > "@/var/folders/tj/17r7407j14d324dzf67cnvxm000114/T//ccUkv7Up" "-o"
> > > "pr78651.s"
> > > (lldb) b internal_error
> > > r
> > > Breakpoint 1: where = lto1`internal_error(char const*, ...) + 121 
> > > [inlined]
> > > _ZN21auto_diagnostic_groupC4Ev, address = 0x00000001010abcb9
> > > (lldb) r
> > > Process 22101 launched:
> > > '/scratch/10-12-sie/gcc-trunk-unpatched/gcc/testsuite/g++2/../../lto1'
> > > (x86_64)
> > > GNU GIMPLE (GCC) version 9.0.0 20190114 (experimental) [trunk revision
> > > 267925] (x86_64-apple-darwin16)
> > >   compiled by GNU C version 9.0.0 20190114 (experimental) [trunk revision
> > > 267925], GMP version 6.1.2, MPFR version 3.1.6, MPC version 1.1.0, isl
> > > version isl-0.20-GMP
> > > 
> > > GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
> > > GNU GIMPLE (GCC) version 9.0.0 20190114 (experimental) [trunk revision
> > > 267925] (x86_64-apple-darwin16)
> > >   compiled by GNU C version 9.0.0 20190114 (experimental) [trunk revision
> > > 267925], GMP version 6.1.2, MPFR version 3.1.6, MPC version 1.1.0, isl
> > > version isl-0.20-GMP
> > > 
> > > GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
> > > Process 22101 stopped
> > > * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
> > >     frame #0: 0x00000001010abcb9 lto1`internal_error(char const*, ...)
> > > [inlined] _ZN21auto_diagnostic_groupC4Ev(this=<unavailable>) at
> > > diagnostic.c:1616
> > >    1613   
> > >    1614   auto_diagnostic_group::auto_diagnostic_group ()
> > >    1615   {
> > > -> 1616     global_dc->diagnostic_group_nesting_depth++;
> > >    1617   }
> > >    1618   
> > >    1619   /* Destructor: "pop" this group from global_dc.  */
> > > Target 0: (lto1) stopped.
> > > (lldb) bt
> > > * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
> > >   * frame #0: 0x00000001010abcb9 lto1`internal_error(char const*, ...)
> > > [inlined] _ZN21auto_diagnostic_groupC4Ev(this=<unavailable>) at
> > > diagnostic.c:1616
> > >     frame #1: 0x00000001010abcb9 lto1`internal_error(gmsgid="in %s, at
> > > %s:%d")
> > >     frame #2: 0x000000010170bf9c lto1`fancy_abort(file=<unavailable>,
> > > line=<unavailable>, function=<unavailable>) at diagnostic.c:1607
> > >     frame #3: 0x00000001015991fc lto1`lhd_decl_printable_name(tree_node*,
> > > int) at langhooks.c:222
> > >     frame #4: 0x00000001007b4288 
> > > lto1`::add_pubtype(decl=0x0000000143e25f18,
> > > die=0x0000000143e27f50) at dwarf2out.c:11333
> > >     frame #5: 0x00000001007e70f1
> > > lto1`::gen_struct_or_union_type_die(type=0x0000000143e25f18,
> > > context_die=<unavailable>, usage=<unavailable>) at dwarf2out.c:25256
> 
> <snip>
> > 
> > That I can't reproduce even when backing out all dwarf2out.c changes.
> 
> pubnames are on by default on Darwin, and not for Linux?

True.  But -g[gnu-]pubnames doesn't change things :/  So we run into

const char *
lhd_decl_printable_name (tree decl, int ARG_UNUSED (verbosity))
{
  gcc_assert (decl && DECL_NAME (decl));
  return IDENTIFIER_POINTER (DECL_NAME (decl));

with a decl without a name?

Reply via email to