* [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