public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g
@ 2020-11-20  1:00 jengelh at inai dot de
  2020-11-20  1:03 ` [Bug c++/97918] " mpolacek at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: jengelh at inai dot de @ 2020-11-20  1:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97918
           Summary: ICE near htab_hash_string when LTO, -O & -g
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jengelh at inai dot de
  Target Milestone: ---

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

An ICE is observed on firefox-83 with gcc-10.2.1, persisting in git master du
jour too (d3f293348768667c07770e433ff00af51fee73a2).
I distilled the original cpp output from 298k to about 80k lines so far (x3.ii
attachment). The last two functions in that file ultimately trigger it all.
Perhaps the template parameter packs are causing this…


Taking away any one of -flto, -O or -g makes the compile succeed.

» ./xg++ -B $PWD -std=gnu++17 -flto -O -g -c x3.ii
/home/jengelh/x3.ii: At global scope:
/home/jengelh/x3.ii:80113:1: internal compiler error: Segmentation fault
80113 | }
      | ^
0x103917f crash_signal
        ../.././gcc/toplev.c:330
0x7f09bf684d1f ???
       
/usr/src/debug/glibc-2.32-2.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x1c09464 htab_hash_string
        ../.././libiberty/hashtab.c:838
0xc71874 external_ref_hasher::hash(external_ref const*)
        ../.././gcc/dwarf2out.c:8963
0xc71874 hash_table<external_ref_hasher, false,
xcallocator>::find_slot(external_ref* const&, insert_option)
        ../.././gcc/hash-table.h:435
0xc71874 lookup_external_ref
        ../.././gcc/dwarf2out.c:8991
0xc71943 optimize_external_refs_1
        ../.././gcc/dwarf2out.c:9029
0xc7190f optimize_external_refs_1
        ../.././gcc/dwarf2out.c:9033
0xc71a08 optimize_external_refs
        ../.././gcc/dwarf2out.c:9082
0xc7aae9 output_comp_unit
        ../.././gcc/dwarf2out.c:11101
0xca95a3 dwarf2out_early_finish
        ../.././gcc/dwarf2out.c:32299
0xc066af symbol_table::finalize_compilation_unit()
        ../.././gcc/cgraphunit.c:2537
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

» ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: x86_64-pc-linux-gnu
Configured with: ./configure --enable-languages=c,c++ --disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.0 20201119 (experimental) (GCC)

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

* [Bug c++/97918] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
@ 2020-11-20  1:03 ` mpolacek at gcc dot gnu.org
  2020-11-20  7:25 ` rguenth at gcc dot gnu.org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-11-20  1:03 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=93951

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This is probably bug 93951.

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

* [Bug c++/97918] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
  2020-11-20  1:03 ` [Bug c++/97918] " mpolacek at gcc dot gnu.org
@ 2020-11-20  7:25 ` rguenth at gcc dot gnu.org
  2020-11-20  7:29 ` jakub at gcc dot gnu.org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-20  7:25 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
           Keywords|                            |lto, needs-reduction
                 CC|                            |rguenth at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-11-20
      Known to fail|                            |10.2.1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Yes, it looks very much related - the same "fix" works.  Confirmed.

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

* [Bug c++/97918] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
  2020-11-20  1:03 ` [Bug c++/97918] " mpolacek at gcc dot gnu.org
  2020-11-20  7:25 ` rguenth at gcc dot gnu.org
@ 2020-11-20  7:29 ` jakub at gcc dot gnu.org
  2020-11-20  7:31 ` marxin at gcc dot gnu.org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-11-20  7:29 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'm reducing what looks like the same ICE for 19 hours already and am at 3.5MB
so far.

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

* [Bug c++/97918] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
                   ` (2 preceding siblings ...)
  2020-11-20  7:29 ` jakub at gcc dot gnu.org
@ 2020-11-20  7:31 ` marxin at gcc dot gnu.org
  2020-11-20  7:35 ` jakub at gcc dot gnu.org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-20  7:31 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> I'm reducing what looks like the same ICE for 19 hours already and am at
> 3.5MB so far.

Btw. are you using C-Vise or C-Reduce?

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

* [Bug c++/97918] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
                   ` (3 preceding siblings ...)
  2020-11-20  7:31 ` marxin at gcc dot gnu.org
@ 2020-11-20  7:35 ` jakub at gcc dot gnu.org
  2020-11-20 11:52 ` jakub at gcc dot gnu.org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-11-20  7:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
cvise.

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

* [Bug c++/97918] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
                   ` (4 preceding siblings ...)
  2020-11-20  7:35 ` jakub at gcc dot gnu.org
@ 2020-11-20 11:52 ` jakub at gcc dot gnu.org
  2020-11-20 11:54 ` [Bug c++/97918] [8/9/10/11 Regression] " jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-11-20 11:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase (-g -std=c++17 -O1 -flto):
namespace N {
  template <typename, typename>
  bool c;
}
namespace {
class A {};
class B {};
using D = class C {};
class E {};
}
namespace O::P::Q {
struct F {};
}
namespace O::R {
template <typename>
struct G;
template <typename T>
struct H {
  using I = G<decltype (T::foo)>;
  constexpr static unsigned h = I::cr;
};
template <typename T>
A
bar ()
{
  if (N::c<T, P::Q::F>) {
    struct J {
      static void foo();
    };
    H<J>();
  }
  return A ();
}
template <typename T>
A
baz ()
{
  bar<T>;
  return A ();
}
}
namespace O::P {
template <typename T>
A
baz (B, D, C, E, T)
{
  R::baz<T>;
  return A ();
}
A
baz (B cx, D cy, C cz, E d)
{
  baz (cx, cy, cz, d, Q::F{});
  return A ();
}
}

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

* [Bug c++/97918] [8/9/10/11 Regression] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
                   ` (5 preceding siblings ...)
  2020-11-20 11:52 ` jakub at gcc dot gnu.org
@ 2020-11-20 11:54 ` jakub at gcc dot gnu.org
  2020-11-20 19:13 ` jason at gcc dot gnu.org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-11-20 11:54 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-reduction             |
   Target Milestone|---                         |8.5
            Summary|ICE near htab_hash_string   |[8/9/10/11 Regression] ICE
                   |when LTO, -O & -g           |near htab_hash_string when
                   |                            |LTO, -O & -g

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r8-2599-g1ea85365b430b5ade1d0b824e5406c006e6ffdb7 too.

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

* [Bug c++/97918] [8/9/10/11 Regression] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
                   ` (6 preceding siblings ...)
  2020-11-20 11:54 ` [Bug c++/97918] [8/9/10/11 Regression] " jakub at gcc dot gnu.org
@ 2020-11-20 19:13 ` jason at gcc dot gnu.org
  2020-11-20 21:44 ` cvs-commit at gcc dot gnu.org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jason at gcc dot gnu.org @ 2020-11-20 19:13 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org

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

* [Bug c++/97918] [8/9/10/11 Regression] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
                   ` (7 preceding siblings ...)
  2020-11-20 19:13 ` jason at gcc dot gnu.org
@ 2020-11-20 21:44 ` cvs-commit at gcc dot gnu.org
  2020-11-20 22:29 ` jengelh at inai dot de
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-20 21:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:89d9c634dc5c10b499c23297ef70133066946790

commit r11-5214-g89d9c634dc5c10b499c23297ef70133066946790
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Nov 20 15:20:45 2020 -0500

    dwarf2: ICE with local class in unused function [PR97918]

    Here, since we only mention bar<B>, we never emit debug information for it.
    But we do emit debug information for H<J>::h, so we need to refer to the
    debug info for bar<B>::J even though there is no bar<B>.  We deal with this
    sort of thing in dwarf2out with the limbo_die_list; parentless dies like J
    get attached to the CU at EOF.  But here, we were flushing the limbo list,
    then generating the template argument DIE for H<J> that refers to J, which
    adds J to the limbo list, too late to be flushed.  So let's flush a little
    later.

    gcc/ChangeLog:

            PR c++/97918
            * dwarf2out.c (dwarf2out_early_finish): flush_limbo_die_list
            after gen_scheduled_generic_parms_dies.

    gcc/testsuite/ChangeLog:

            PR c++/97918
            * g++.dg/debug/localclass2.C: New test.

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

* [Bug c++/97918] [8/9/10/11 Regression] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
                   ` (8 preceding siblings ...)
  2020-11-20 21:44 ` cvs-commit at gcc dot gnu.org
@ 2020-11-20 22:29 ` jengelh at inai dot de
  2020-11-20 22:37 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jengelh at inai dot de @ 2020-11-20 22:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jan Engelhardt <jengelh at inai dot de> ---
The new g++.dg/debug/localclass2.C test file you added is marked "target
c++11", but it seems I can only cause the crash with -std=c++17 or later
standards. Should the test file perhaps be amended?

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

* [Bug c++/97918] [8/9/10/11 Regression] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
                   ` (9 preceding siblings ...)
  2020-11-20 22:29 ` jengelh at inai dot de
@ 2020-11-20 22:37 ` jakub at gcc dot gnu.org
  2020-11-20 22:37 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-11-20 22:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
For debug/ tests I guess it isn't really used, just documents that the testcase
is valid C++11 or later, because debug/ tests iterate over various debug
options rather than C++ standard options.

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

* [Bug c++/97918] [8/9/10/11 Regression] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
                   ` (10 preceding siblings ...)
  2020-11-20 22:37 ` jakub at gcc dot gnu.org
@ 2020-11-20 22:37 ` jakub at gcc dot gnu.org
  2020-11-24 17:55 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-11-20 22:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
And the default is -std=gnu++17.

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

* [Bug c++/97918] [8/9/10/11 Regression] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
                   ` (11 preceding siblings ...)
  2020-11-20 22:37 ` jakub at gcc dot gnu.org
@ 2020-11-24 17:55 ` cvs-commit at gcc dot gnu.org
  2020-11-24 17:57 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-24 17:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:8157b74114f2ba8a6495244f3e171a818a86436a

commit r10-9071-g8157b74114f2ba8a6495244f3e171a818a86436a
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Nov 20 15:20:45 2020 -0500

    dwarf2: ICE with local class in unused function [PR97918]

    Here, since we only mention bar<B>, we never emit debug information for it.
    But we do emit debug information for H<J>::h, so we need to refer to the
    debug info for bar<B>::J even though there is no bar<B>.  We deal with this
    sort of thing in dwarf2out with the limbo_die_list; parentless dies like J
    get attached to the CU at EOF.  But here, we were flushing the limbo list,
    then generating the template argument DIE for H<J> that refers to J, which
    adds J to the limbo list, too late to be flushed.  So let's flush a little
    later.

    gcc/ChangeLog:

            PR c++/97918
            * dwarf2out.c (dwarf2out_early_finish): flush_limbo_die_list
            after gen_scheduled_generic_parms_dies.

    gcc/testsuite/ChangeLog:

            PR c++/97918
            * g++.dg/debug/localclass2.C: New test.

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

* [Bug c++/97918] [8/9/10/11 Regression] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
                   ` (12 preceding siblings ...)
  2020-11-24 17:55 ` cvs-commit at gcc dot gnu.org
@ 2020-11-24 17:57 ` cvs-commit at gcc dot gnu.org
  2020-11-24 17:58 ` cvs-commit at gcc dot gnu.org
  2020-11-25 21:43 ` jason at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-24 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:ca8325441a6bb06292db9f165607d4e395f46c4b

commit r8-10638-gca8325441a6bb06292db9f165607d4e395f46c4b
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Nov 20 15:20:45 2020 -0500

    dwarf2: ICE with local class in unused function [PR97918]

    Here, since we only mention bar<B>, we never emit debug information for it.
    But we do emit debug information for H<J>::h, so we need to refer to the
    debug info for bar<B>::J even though there is no bar<B>.  We deal with this
    sort of thing in dwarf2out with the limbo_die_list; parentless dies like J
    get attached to the CU at EOF.  But here, we were flushing the limbo list,
    then generating the template argument DIE for H<J> that refers to J, which
    adds J to the limbo list, too late to be flushed.  So let's flush a little
    later.

    gcc/ChangeLog:

            PR c++/97918
            * dwarf2out.c (dwarf2out_early_finish): flush_limbo_die_list
            after gen_scheduled_generic_parms_dies.

    gcc/testsuite/ChangeLog:

            PR c++/97918
            * g++.dg/debug/localclass2.C: New test.

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

* [Bug c++/97918] [8/9/10/11 Regression] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
                   ` (13 preceding siblings ...)
  2020-11-24 17:57 ` cvs-commit at gcc dot gnu.org
@ 2020-11-24 17:58 ` cvs-commit at gcc dot gnu.org
  2020-11-25 21:43 ` jason at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-24 17:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:196716c10bcd4074c404cc8f13bf8d9b31c76238

commit r9-9067-g196716c10bcd4074c404cc8f13bf8d9b31c76238
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Nov 20 15:20:45 2020 -0500

    dwarf2: ICE with local class in unused function [PR97918]

    Here, since we only mention bar<B>, we never emit debug information for it.
    But we do emit debug information for H<J>::h, so we need to refer to the
    debug info for bar<B>::J even though there is no bar<B>.  We deal with this
    sort of thing in dwarf2out with the limbo_die_list; parentless dies like J
    get attached to the CU at EOF.  But here, we were flushing the limbo list,
    then generating the template argument DIE for H<J> that refers to J, which
    adds J to the limbo list, too late to be flushed.  So let's flush a little
    later.

    gcc/ChangeLog:

            PR c++/97918
            * dwarf2out.c (dwarf2out_early_finish): flush_limbo_die_list
            after gen_scheduled_generic_parms_dies.

    gcc/testsuite/ChangeLog:

            PR c++/97918
            * g++.dg/debug/localclass2.C: New test.

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

* [Bug c++/97918] [8/9/10/11 Regression] ICE near htab_hash_string when LTO, -O & -g
  2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
                   ` (14 preceding siblings ...)
  2020-11-24 17:58 ` cvs-commit at gcc dot gnu.org
@ 2020-11-25 21:43 ` jason at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: jason at gcc dot gnu.org @ 2020-11-25 21:43 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #15 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 8.5/9.4/10.3/11.

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

end of thread, other threads:[~2020-11-25 21:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20  1:00 [Bug c++/97918] New: ICE near htab_hash_string when LTO, -O & -g jengelh at inai dot de
2020-11-20  1:03 ` [Bug c++/97918] " mpolacek at gcc dot gnu.org
2020-11-20  7:25 ` rguenth at gcc dot gnu.org
2020-11-20  7:29 ` jakub at gcc dot gnu.org
2020-11-20  7:31 ` marxin at gcc dot gnu.org
2020-11-20  7:35 ` jakub at gcc dot gnu.org
2020-11-20 11:52 ` jakub at gcc dot gnu.org
2020-11-20 11:54 ` [Bug c++/97918] [8/9/10/11 Regression] " jakub at gcc dot gnu.org
2020-11-20 19:13 ` jason at gcc dot gnu.org
2020-11-20 21:44 ` cvs-commit at gcc dot gnu.org
2020-11-20 22:29 ` jengelh at inai dot de
2020-11-20 22:37 ` jakub at gcc dot gnu.org
2020-11-20 22:37 ` jakub at gcc dot gnu.org
2020-11-24 17:55 ` cvs-commit at gcc dot gnu.org
2020-11-24 17:57 ` cvs-commit at gcc dot gnu.org
2020-11-24 17:58 ` cvs-commit at gcc dot gnu.org
2020-11-25 21:43 ` jason 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).