public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102963] New: [modules] ICE failed static_assert of concept
@ 2021-10-27 16:05 johelegp at gmail dot com
2021-10-27 16:10 ` [Bug c++/102963] " johelegp at gmail dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: johelegp at gmail dot com @ 2021-10-27 16:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102963
Bug ID: 102963
Summary: [modules] ICE failed static_assert of concept
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: johelegp at gmail dot com
CC: johelegp at gmail dot com
Target Milestone: ---
See https://godbolt.org/z/7h1MPqe1h.
mod.cpp:
```C++
export module mod;
export template<class T>
concept C = false;
```
test.cpp:
```C++
import mod;
static_assert(C<int>);
```
Output:
```
test.cpp:2:15: error: static assertion failed
2 | static_assert(C<int>);
| ^~~~~~
test.cpp:2:15: note: constraints not satisfied
'
In module mod, imported at /app/test.cpp:1:
mod.cpp:3:9: in import_entity_index, at cp/module.cc:3953
3 | concept C = false;
| ^~~~~
0x20037b9 internal_error(char const*, ...)
???:0
0x7d6c17 fancy_abort(char const*, int, char const*)
???:0
0x966d5c get_importing_module(tree_node*, bool)
???:0
0x201fcb1 pp_format(pretty_printer*, text_info*)
???:0
0x2020330 pp_format_verbatim(pretty_printer*, text_info*)
???:0
0x2020411 pp_verbatim(pretty_printer*, char const*, ...)
???:0
0x9046d7 maybe_print_single_constraint_context(diagnostic_context*, tree_node*)
???:0
0x20023f1 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
???:0
0x2002d4d inform(unsigned int, char const*, ...)
???:0
0x86008f diagnose_constraints(unsigned int, tree_node*, tree_node*)
???:0
0xab8483 finish_static_assert(tree_node*, tree_node*, unsigned int, bool, bool)
???:0
0xa0bea5 c_parse_file()
???:0
0xb92e22 c_common_parse_file()
???:0
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.
```
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/102963] [modules] ICE failed static_assert of concept
2021-10-27 16:05 [Bug c++/102963] New: [modules] ICE failed static_assert of concept johelegp at gmail dot com
@ 2021-10-27 16:10 ` johelegp at gmail dot com
2022-10-20 15:34 ` cvs-commit at gcc dot gnu.org
2022-10-20 15:35 ` ppalka at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: johelegp at gmail dot com @ 2021-10-27 16:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102963
--- Comment #1 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> ---
As per the logic in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99631#c1, this
isn't marked with any of the ice-* keywords.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/102963] [modules] ICE failed static_assert of concept
2021-10-27 16:05 [Bug c++/102963] New: [modules] ICE failed static_assert of concept johelegp at gmail dot com
2021-10-27 16:10 ` [Bug c++/102963] " johelegp at gmail dot com
@ 2022-10-20 15:34 ` cvs-commit at gcc dot gnu.org
2022-10-20 15:35 ` ppalka at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-20 15:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102963
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:9a8b37f5476ba1f92fd9a85add035ace89535e79
commit r13-3414-g9a8b37f5476ba1f92fd9a85add035ace89535e79
Author: Patrick Palka <ppalka@redhat.com>
Date: Thu Oct 20 11:33:39 2022 -0400
c++ modules: handle CONCEPT_DECL in node_template_info [PR102963]
Here node_template_info is overlooking that CONCEPT_DECL has TEMPLATE_INFO
too, which causes get_originating_module_decl for the CONCEPT_DECL to not
return the corresponding TEMPLATE_DECL, which leads to an ICE from
import_entity_index while pretty printing the CONCEPT_DECL's module
suffix as part of the static assert failure elaboration.
PR c++/102963
gcc/cp/ChangeLog:
* module.cc (node_template_info): Handle CONCEPT_DECL.
gcc/testsuite/ChangeLog:
* g++.dg/modules/concept-7_a.C: New test.
* g++.dg/modules/concept-7_b.C: New test.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/102963] [modules] ICE failed static_assert of concept
2021-10-27 16:05 [Bug c++/102963] New: [modules] ICE failed static_assert of concept johelegp at gmail dot com
2021-10-27 16:10 ` [Bug c++/102963] " johelegp at gmail dot com
2022-10-20 15:34 ` cvs-commit at gcc dot gnu.org
@ 2022-10-20 15:35 ` ppalka at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-10-20 15:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102963
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
Resolution|--- |FIXED
CC| |ppalka at gcc dot gnu.org
Status|UNCONFIRMED |RESOLVED
--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed on trunk
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-20 15:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 16:05 [Bug c++/102963] New: [modules] ICE failed static_assert of concept johelegp at gmail dot com
2021-10-27 16:10 ` [Bug c++/102963] " johelegp at gmail dot com
2022-10-20 15:34 ` cvs-commit at gcc dot gnu.org
2022-10-20 15:35 ` ppalka 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).