public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105652] New: ICE: in is_base_type, at dwarf2out.cc:13400
@ 2022-05-19 5:35 hewillk at gmail dot com
2022-05-19 6:21 ` [Bug c++/105652] " rguenth at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: hewillk at gmail dot com @ 2022-05-19 5:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105652
Bug ID: 105652
Summary: ICE: in is_base_type, at dwarf2out.cc:13400
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
template<int>
struct I {};
template<class T>
concept C = []<int N>(I<N>) { return true; } (I<0>{});
template<class T>
struct S { };
template<C T>
struct S<T> { constexpr static bool value = true; };
static_assert(S<int>::value);
https://godbolt.org/z/T79svEnxj
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/105652] ICE: in is_base_type, at dwarf2out.cc:13400
2022-05-19 5:35 [Bug c++/105652] New: ICE: in is_base_type, at dwarf2out.cc:13400 hewillk at gmail dot com
@ 2022-05-19 6:21 ` rguenth at gcc dot gnu.org
2022-05-19 7:13 ` hewillk at gmail dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-19 6:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105652
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-05-19
CC| |jason at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
#1 0x00000000011f808e in is_base_type (type=
<template_type_parm 0x7ffff6689150 T>)
at /home/rguenther/src/gcc4/gcc/dwarf2out.cc:13400
13400 gcc_unreachable ();
(gdb) l
13395 return 0;
13396
13397 default:
13398 if (is_cxx_auto (type))
13399 return 0;
13400 gcc_unreachable ();
13401 }
(gdb) bt
#0 fancy_abort (file=0x3293a38 "/home/rguenther/src/gcc4/gcc/dwarf2out.cc",
line=13400,
function=0x329ec90 <is_base_type(tree_node*)::__FUNCTION__> "is_base_type")
at /home/rguenther/src/gcc4/gcc/diagnostic.cc:2022
#1 0x00000000011f808e in is_base_type (
type=<template_type_parm 0x7ffff6689150 T>)
at /home/rguenther/src/gcc4/gcc/dwarf2out.cc:13400
#2 0x00000000011fa255 in modified_type_die (
type=<template_type_parm 0x7ffff6689150 T>, cv_quals=0, reverse=false,
context_die=<dw_die_ref 0x7ffff65430a0 DW_TAG_structure_type
<parent=0x7ffff6543000 DW_TAG_compile_unit>>)
at /home/rguenther/src/gcc4/gcc/dwarf2out.cc:13884
#3 0x0000000001213da1 in add_type_attribute (
object_die=<dw_die_ref 0x7ffff6543370 DW_TAG_template_type_param
<parent=0x7ffff65430a0 DW_TAG_structure_type>>,
type=<template_type_parm 0x7ffff6689150 T>, cv_quals=0, reverse=false,
context_die=<dw_die_ref 0x7ffff65430a0 DW_TAG_structure_type
<parent=0x7ffff6543000 DW_TAG_compile_unit>>)
at /home/rguenther/src/gcc4/gcc/dwarf2out.cc:22298
#4 0x00000000011fb0e8 in generic_parameter_die (
parm=<type_decl 0x7ffff66871c8 T>,
arg=<template_type_parm 0x7ffff6689150 T>, emit_name_p=true,
parent_die=<dw_die_ref 0x7ffff65430a0 DW_TAG_structure_type
<parent=0x7ffff6543000 DW_TAG_compile_unit>>)
at /home/rguenther/src/gcc4/gcc/dwarf2out.cc:14143
#5 0x00000000011fae34 in gen_generic_params_dies (
t=<record_type 0x7ffff66891f8 S>)
at /home/rguenther/src/gcc4/gcc/dwarf2out.cc:14063
#6 0x0000000001223f27 in gen_scheduled_generic_parms_dies ()
at /home/rguenther/src/gcc4/gcc/dwarf2out.cc:27824
#7 0x000000000122f990 in dwarf2out_early_finish (filename=0x457ec70 "t.ii")
at /home/rguenther/src/gcc4/gcc/dwarf2out.cc:32943
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/105652] ICE: in is_base_type, at dwarf2out.cc:13400
2022-05-19 5:35 [Bug c++/105652] New: ICE: in is_base_type, at dwarf2out.cc:13400 hewillk at gmail dot com
2022-05-19 6:21 ` [Bug c++/105652] " rguenth at gcc dot gnu.org
@ 2022-05-19 7:13 ` hewillk at gmail dot com
2022-05-19 8:20 ` [Bug c++/105652] [12/13 Regression] ICE: in is_base_type, at dwarf2out.cc:13400 since r12-1937-gc28e1d288ab727de marxin at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: hewillk at gmail dot com @ 2022-05-19 7:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105652
--- Comment #2 from 康桓瑋 <hewillk at gmail dot com> ---
More reduced.
template<class>
concept C = [] { return true; } ();
template<class T> // <-- ok if not 'T'
struct S {};
template<class T>
requires C<T>
struct S<T> { constexpr static bool value = true; };
static_assert(S<int>::value);
https://godbolt.org/z/7WK8TTaMs
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/105652] [12/13 Regression] ICE: in is_base_type, at dwarf2out.cc:13400 since r12-1937-gc28e1d288ab727de
2022-05-19 5:35 [Bug c++/105652] New: ICE: in is_base_type, at dwarf2out.cc:13400 hewillk at gmail dot com
2022-05-19 6:21 ` [Bug c++/105652] " rguenth at gcc dot gnu.org
2022-05-19 7:13 ` hewillk at gmail dot com
@ 2022-05-19 8:20 ` marxin at gcc dot gnu.org
2022-05-20 7:02 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-05-19 8:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105652
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org,
| |ppalka at gcc dot gnu.org
Summary|ICE: in is_base_type, at |[12/13 Regression] ICE: in
|dwarf2out.cc:13400 |is_base_type, at
| |dwarf2out.cc:13400 since
| |r12-1937-gc28e1d288ab727de
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-1937-gc28e1d288ab727de.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/105652] [12/13 Regression] ICE: in is_base_type, at dwarf2out.cc:13400 since r12-1937-gc28e1d288ab727de
2022-05-19 5:35 [Bug c++/105652] New: ICE: in is_base_type, at dwarf2out.cc:13400 hewillk at gmail dot com
` (2 preceding siblings ...)
2022-05-19 8:20 ` [Bug c++/105652] [12/13 Regression] ICE: in is_base_type, at dwarf2out.cc:13400 since r12-1937-gc28e1d288ab727de marxin at gcc dot gnu.org
@ 2022-05-20 7:02 ` rguenth at gcc dot gnu.org
2022-05-27 2:39 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-20 7:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105652
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.2
Priority|P3 |P2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/105652] [12/13 Regression] ICE: in is_base_type, at dwarf2out.cc:13400 since r12-1937-gc28e1d288ab727de
2022-05-19 5:35 [Bug c++/105652] New: ICE: in is_base_type, at dwarf2out.cc:13400 hewillk at gmail dot com
` (3 preceding siblings ...)
2022-05-20 7:02 ` rguenth at gcc dot gnu.org
@ 2022-05-27 2:39 ` jason at gcc dot gnu.org
2022-05-28 3:44 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2022-05-27 2:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105652
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/105652] [12/13 Regression] ICE: in is_base_type, at dwarf2out.cc:13400 since r12-1937-gc28e1d288ab727de
2022-05-19 5:35 [Bug c++/105652] New: ICE: in is_base_type, at dwarf2out.cc:13400 hewillk at gmail dot com
` (4 preceding siblings ...)
2022-05-27 2:39 ` jason at gcc dot gnu.org
@ 2022-05-28 3:44 ` cvs-commit at gcc dot gnu.org
2022-05-31 19:32 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-28 3:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105652
--- Comment #4 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:221acd67ca50f8f069037e034a3250f13d75a9f5
commit r13-806-g221acd67ca50f8f069037e034a3250f13d75a9f5
Author: Jason Merrill <jason@redhat.com>
Date: Thu May 26 22:43:05 2022 -0400
c++: lambda in concept [PR105652]
We currently check satisfaction in the context of the constrained
declaration (which may be wrong, see PR104111). When checking C<int>
for S<int>, we currently substitute into the lambda in the context of
S<T> (rather than S<int>, which seems wrong if the above isn't wrong), so
the new closure type thinks its context is S<T>, which confuses debug
output. For the moment, let's work around all of this by overriding the
context of the closure.
PR c++/105652
gcc/cp/ChangeLog:
* pt.cc (tsubst_lambda_expr): Don't let a namespace-scope lambda
instantiate into a class-scope lambda.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-lambda20.C: New test.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/105652] [12/13 Regression] ICE: in is_base_type, at dwarf2out.cc:13400 since r12-1937-gc28e1d288ab727de
2022-05-19 5:35 [Bug c++/105652] New: ICE: in is_base_type, at dwarf2out.cc:13400 hewillk at gmail dot com
` (5 preceding siblings ...)
2022-05-28 3:44 ` cvs-commit at gcc dot gnu.org
@ 2022-05-31 19:32 ` cvs-commit at gcc dot gnu.org
2022-05-31 19:32 ` jason at gcc dot gnu.org
2024-04-13 8:03 ` pinskia at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-31 19:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105652
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:102a1472ab393c89bd74c06ff92bef55fa61812c
commit r12-8443-g102a1472ab393c89bd74c06ff92bef55fa61812c
Author: Jason Merrill <jason@redhat.com>
Date: Thu May 26 22:43:05 2022 -0400
c++: lambda in concept [PR105652]
We currently check satisfaction in the context of the constrained
declaration (which may be wrong, see PR104111). When checking C<int>
for S<int>, we currently substitute into the lambda in the context of
S<T> (rather than S<int>, which seems wrong if the above isn't wrong), so
the new closure type thinks its context is S<T>, which confuses debug
output. For the moment, let's work around all of this by overriding the
context of the closure.
PR c++/105652
gcc/cp/ChangeLog:
* pt.cc (tsubst_lambda_expr): Don't let a namespace-scope lambda
instantiate into a class-scope lambda.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-lambda20.C: New test.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/105652] [12/13 Regression] ICE: in is_base_type, at dwarf2out.cc:13400 since r12-1937-gc28e1d288ab727de
2022-05-19 5:35 [Bug c++/105652] New: ICE: in is_base_type, at dwarf2out.cc:13400 hewillk at gmail dot com
` (6 preceding siblings ...)
2022-05-31 19:32 ` cvs-commit at gcc dot gnu.org
@ 2022-05-31 19:32 ` jason at gcc dot gnu.org
2024-04-13 8:03 ` pinskia at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2022-05-31 19:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105652
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 12.2/13.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/105652] [12/13 Regression] ICE: in is_base_type, at dwarf2out.cc:13400 since r12-1937-gc28e1d288ab727de
2022-05-19 5:35 [Bug c++/105652] New: ICE: in is_base_type, at dwarf2out.cc:13400 hewillk at gmail dot com
` (7 preceding siblings ...)
2022-05-31 19:32 ` jason at gcc dot gnu.org
@ 2024-04-13 8:03 ` pinskia at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-13 8:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105652
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nickhuang99 at hotmail dot com
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 104138 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-04-13 8:03 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19 5:35 [Bug c++/105652] New: ICE: in is_base_type, at dwarf2out.cc:13400 hewillk at gmail dot com
2022-05-19 6:21 ` [Bug c++/105652] " rguenth at gcc dot gnu.org
2022-05-19 7:13 ` hewillk at gmail dot com
2022-05-19 8:20 ` [Bug c++/105652] [12/13 Regression] ICE: in is_base_type, at dwarf2out.cc:13400 since r12-1937-gc28e1d288ab727de marxin at gcc dot gnu.org
2022-05-20 7:02 ` rguenth at gcc dot gnu.org
2022-05-27 2:39 ` jason at gcc dot gnu.org
2022-05-28 3:44 ` cvs-commit at gcc dot gnu.org
2022-05-31 19:32 ` cvs-commit at gcc dot gnu.org
2022-05-31 19:32 ` jason at gcc dot gnu.org
2024-04-13 8:03 ` 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).