public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113710] New: [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff
@ 2024-02-01 20:52 ppalka at gcc dot gnu.org
2024-02-01 20:53 ` [Bug c++/113710] " ppalka at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-02-01 20:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113710
Bug ID: 113710
Summary: [14 Regression] g++.dg/modules/hello-1 ICE: canonical
types differ for identical types since
r14-8710-g65b4cba9d6a9ff
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ppalka at gcc dot gnu.org
Target Milestone: ---
On x86_64-linux:
gcc/testsuite/g++/g++.sum:UNRESOLVED: g++.dg/modules/hello-1 -std=c++17 link
gcc/testsuite/g++/g++.sum:UNRESOLVED: g++.dg/modules/hello-1 -std=c++17 execute
gcc/testsuite/g++/g++.sum:UNRESOLVED: g++.dg/modules/hello-1 -std=c++2a link
gcc/testsuite/g++/g++.sum:UNRESOLVED: g++.dg/modules/hello-1 -std=c++2a execute
gcc/testsuite/g++/g++.sum:UNRESOLVED: g++.dg/modules/hello-1 -std=c++2b link
gcc/testsuite/g++/g++.sum:UNRESOLVED: g++.dg/modules/hello-1 -std=c++2b execute
gcc/testsuite/g++/g++.sum:FAIL: g++.dg/modules/hello-1_b.C -std=c++17 (internal
compiler error: canonical types differ for identical types
'std::tuple_element<__i, std::tuple<_Elements ...> >' and 'std::tuple_e>
gcc/testsuite/g++/g++.sum:FAIL: g++.dg/modules/hello-1_b.C -std=c++17 (test for
excess errors)
gcc/testsuite/g++/g++.sum:FAIL: g++.dg/modules/hello-1_b.C -std=c++2a (internal
compiler error: canonical types differ for identical types
'std::tuple_element<__i, std::tuple<_Elements ...> >' and 'std::tuple_e>
gcc/testsuite/g++/g++.sum:FAIL: g++.dg/modules/hello-1_b.C -std=c++2a (test for
excess errors)
gcc/testsuite/g++/g++.sum:FAIL: g++.dg/modules/hello-1_b.C -std=c++2b (internal
compiler error: canonical types differ for identical types
'std::tuple_element<__i, std::tuple<_Elements ...> >' and 'std::tuple_e>
gcc/testsuite/g++/g++.sum:FAIL: g++.dg/modules/hello-1_b.C -std=c++2b (test for
excess errors)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/113710] [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff
2024-02-01 20:52 [Bug c++/113710] New: [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff ppalka at gcc dot gnu.org
@ 2024-02-01 20:53 ` ppalka at gcc dot gnu.org
2024-02-02 16:12 ` seurer at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-02-01 20:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113710
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |103524
Target Milestone|--- |14.0
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524
[Bug 103524] [meta-bug] modules issue
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/113710] [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff
2024-02-01 20:52 [Bug c++/113710] New: [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff ppalka at gcc dot gnu.org
2024-02-01 20:53 ` [Bug c++/113710] " ppalka at gcc dot gnu.org
@ 2024-02-02 16:12 ` seurer at gcc dot gnu.org
2024-02-02 19:23 ` ewlu at rivosinc dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: seurer at gcc dot gnu.org @ 2024-02-02 16:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113710
seurer at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |seurer at gcc dot gnu.org
--- Comment #1 from seurer at gcc dot gnu.org ---
Also on powerpc64le:
g:65b4cba9d6a9ffe9b4d4bdff90727a7064cc0e3b, r14-8710-g65b4cba9d6a9ff
make -k check-gcc-c++ RUNTESTFLAGS="modules.exp=hello*"
FAIL: g++.dg/modules/hello-1_b.C -std=c++17 (internal compiler error: canonical
types differ for identical types 'std::tuple_element<__i, std::tuple<_Elements
...> >' and 'std::tuple_element<__i, std::tuple<_Elements ...> >')
FAIL: g++.dg/modules/hello-1_b.C -std=c++17 (test for excess errors)
FAIL: g++.dg/modules/hello-1_b.C -std=c++2a (internal compiler error: canonical
types differ for identical types 'std::tuple_element<__i, std::tuple<_Elements
...> >' and 'std::tuple_element<__i, std::tuple<_Elements ...> >')
FAIL: g++.dg/modules/hello-1_b.C -std=c++2a (test for excess errors)
FAIL: g++.dg/modules/hello-1_b.C -std=c++2b (internal compiler error: canonical
types differ for identical types 'std::tuple_element<__i, std::tuple<_Elements
...> >' and 'std::tuple_element<__i, std::tuple<_Elements ...> >')
FAIL: g++.dg/modules/hello-1_b.C -std=c++2b (test for excess errors)
# of expected passes 6
# of unexpected failures 6
# of unresolved testcases 6
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/113710] [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff
2024-02-01 20:52 [Bug c++/113710] New: [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff ppalka at gcc dot gnu.org
2024-02-01 20:53 ` [Bug c++/113710] " ppalka at gcc dot gnu.org
2024-02-02 16:12 ` seurer at gcc dot gnu.org
@ 2024-02-02 19:23 ` ewlu at rivosinc dot com
2024-02-02 22:31 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ewlu at rivosinc dot com @ 2024-02-02 19:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113710
Edwin Lu <ewlu at rivosinc dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ewlu at rivosinc dot com,
| |patrick at rivosinc dot com
--- Comment #2 from Edwin Lu <ewlu at rivosinc dot com> ---
Also on rv32/64 linux/newlib
https://github.com/patrick-rivos/gcc-postcommit-ci/issues/477
/disk-1/github/patrick-postcommit-1/_work/gcc-postcommit-ci/gcc-postcommit-ci/riscv-gnu-toolchain/gcc/gcc/testsuite/g++.dg/modules/hello-1_b.C:
In function 'int main()':
/disk-1/github/patrick-postcommit-1/_work/gcc-postcommit-ci/gcc-postcommit-ci/riscv-gnu-toolchain/gcc/gcc/testsuite/g++.dg/modules/hello-1_b.C:7:3:
internal compiler error: canonical types differ for identical types
'std::tuple_element<__i, std::tuple<_Elements ...> >' and
'std::tuple_element<__i, std::tuple<_Elements ...> >'
0xd67da3 comptypes(tree_node*, tree_node*, int)
../../../gcc/gcc/cp/typeck.cc:1710
0xd672c7 structural_comptypes
../../../gcc/gcc/cp/typeck.cc:1590
0xbad023 trees_in::is_matching_decl(tree_node*, tree_node*, bool)
../../../gcc/gcc/cp/module.cc:11362
0xbcae0b trees_in::decl_value()
../../../gcc/gcc/cp/module.cc:8341
0xbccbf7 trees_in::tree_node(bool)
../../../gcc/gcc/cp/module.cc:9403
0xbd58d3 module_state::read_cluster(unsigned int)
../../../gcc/gcc/cp/module.cc:15114
0xbd5ea3 module_state::load_section(unsigned int, binding_slot*)
../../../gcc/gcc/cp/module.cc:18491
0xbd5f6f module_state::lazy_load(unsigned int, binding_slot*)
../../../gcc/gcc/cp/module.cc:19166
0xbcd417 trees_in::tree_node(bool)
../../../gcc/gcc/cp/module.cc:9951
0xbd55cb module_state::read_cluster(unsigned int)
../../../gcc/gcc/cp/module.cc:15020
0xbd5ea3 module_state::load_section(unsigned int, binding_slot*)
../../../gcc/gcc/cp/module.cc:18491
0xbd5f6f module_state::lazy_load(unsigned int, binding_slot*)
../../../gcc/gcc/cp/module.cc:19166
0xbcd417 trees_in::tree_node(bool)
../../../gcc/gcc/cp/module.cc:9951
0xbd55cb module_state::read_cluster(unsigned int)
../../../gcc/gcc/cp/module.cc:15020
0xbd5ea3 module_state::load_section(unsigned int, binding_slot*)
../../../gcc/gcc/cp/module.cc:18491
0xbd60d7 lazy_load_binding(unsigned int, tree_node*, tree_node*, binding_slot*)
../../../gcc/gcc/cp/module.cc:19203
0xbed89f name_lookup::search_namespace_only(tree_node*)
../../../gcc/gcc/cp/name-lookup.cc:920
0xbef63f name_lookup::search_unqualified(tree_node*, cp_binding_level*)
../../../gcc/gcc/cp/name-lookup.cc:1143
0xbf81c7 lookup_name(tree_node*, LOOK_where, LOOK_want)
../../../gcc/gcc/cp/name-lookup.cc:7892
0xc0b0cb lookup_name(tree_node*, LOOK_want)
../../../gcc/gcc/cp/name-lookup.h:407
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
compiler exited with status 1
FAIL: g++.dg/modules/hello-1_b.C -std=c++17 (internal compiler error: canonical
types differ for identical types 'std::tuple_element<__i, std::tuple<_Elements
...> >' and 'std::tuple_element<__i, std::tuple<_Elements ...> >')
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/113710] [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff
2024-02-01 20:52 [Bug c++/113710] New: [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff ppalka at gcc dot gnu.org
` (2 preceding siblings ...)
2024-02-02 19:23 ` ewlu at rivosinc dot com
@ 2024-02-02 22:31 ` pinskia at gcc dot gnu.org
2024-02-02 22:32 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02 22:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113710
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 113732 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/113710] [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff
2024-02-01 20:52 [Bug c++/113710] New: [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff ppalka at gcc dot gnu.org
` (3 preceding siblings ...)
2024-02-02 22:31 ` pinskia at gcc dot gnu.org
@ 2024-02-02 22:32 ` pinskia at gcc dot gnu.org
2024-02-03 19:32 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02 22:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113710
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2024-02-02
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/113710] [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff
2024-02-01 20:52 [Bug c++/113710] New: [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff ppalka at gcc dot gnu.org
` (4 preceding siblings ...)
2024-02-02 22:32 ` pinskia at gcc dot gnu.org
@ 2024-02-03 19:32 ` pinskia at gcc dot gnu.org
2024-02-07 19:16 ` [Bug testsuite/113710] " ppalka at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-03 19:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113710
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |danglin at gcc dot gnu.org
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 113743 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/113710] [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff
2024-02-01 20:52 [Bug c++/113710] New: [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff ppalka at gcc dot gnu.org
` (5 preceding siblings ...)
2024-02-03 19:32 ` pinskia at gcc dot gnu.org
@ 2024-02-07 19:16 ` ppalka at gcc dot gnu.org
2024-02-07 19:25 ` cvs-commit at gcc dot gnu.org
2024-02-07 19:27 ` ppalka at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-02-07 19:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113710
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=113814
Component|c++ |testsuite
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Changed component to testsuite, and created PR113814 to track the front end bug
specifically.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/113710] [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff
2024-02-01 20:52 [Bug c++/113710] New: [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff ppalka at gcc dot gnu.org
` (6 preceding siblings ...)
2024-02-07 19:16 ` [Bug testsuite/113710] " ppalka at gcc dot gnu.org
@ 2024-02-07 19:25 ` cvs-commit at gcc dot gnu.org
2024-02-07 19:27 ` ppalka at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-07 19:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113710
--- Comment #6 from GCC 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:ff41862357ca2ea56177209a2e3b7d9c64bcfa8c
commit r14-8870-gff41862357ca2ea56177209a2e3b7d9c64bcfa8c
Author: Patrick Palka <ppalka@redhat.com>
Date: Wed Feb 7 14:24:51 2024 -0500
libstdc++: Work around modules issue causing hello-1 ICE [PR113710]
The forward declarations of std::get in <bits/stl_pair.h> added in
r14-8710-g65b4cba9d6a9ff are causing an ICE in the test modules/hello-1
due to what seems to be a declaration merging issue in modules.
What's happening is that in hello-1_b.C we first include <string_view>,
which indirectly includes <bits/stl_pair.h> which forms the dependent
specialization tuple_element<__i, tuple<_Elements...>> (appearing in
the signatures of some of the std::get overloads) and adds it to the
specializations table.
We then import hello which indirectly includes <tuple> (in the GMF),
within which we define a partial specialization of tuple_element with
that same template-id. So importing hello in turn streams in this
partial specialization but we don't merge it with the previously created
dependent specialization, and we end up with two equivalent types for
this template-id with different TYPE_CANONICAL.
This patch works around this issue by adding a forward declaration of
the tuple_element partial specialization from <tuple> to <bits/stl_pair.h>
so that it appears alongside the dependent specialization of the same
template-id. So when including <bits/stl_pair.h> we immediately register
the template-id as a partial specialization, and if we later stream in the
partial specialization the MK_partial case of trees_in::key_mergeable will
match them up. (So perhaps a proper modules fix for this might be to make
key_mergeable try to match up a streamed in partial specialization with an
existing specialization from the table via match_mergeable_specialization.)
PR testsuite/113710
PR c++/113814
libstdc++-v3/ChangeLog:
* include/bits/stl_pair.h (tuple_element): Add forward
declaration of the partial specialization for tuple.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug testsuite/113710] [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff
2024-02-01 20:52 [Bug c++/113710] New: [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff ppalka at gcc dot gnu.org
` (7 preceding siblings ...)
2024-02-07 19:25 ` cvs-commit at gcc dot gnu.org
@ 2024-02-07 19:27 ` ppalka at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-02-07 19:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113710
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed via a library-side workaround.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-02-07 19:27 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-01 20:52 [Bug c++/113710] New: [14 Regression] g++.dg/modules/hello-1 ICE: canonical types differ for identical types since r14-8710-g65b4cba9d6a9ff ppalka at gcc dot gnu.org
2024-02-01 20:53 ` [Bug c++/113710] " ppalka at gcc dot gnu.org
2024-02-02 16:12 ` seurer at gcc dot gnu.org
2024-02-02 19:23 ` ewlu at rivosinc dot com
2024-02-02 22:31 ` pinskia at gcc dot gnu.org
2024-02-02 22:32 ` pinskia at gcc dot gnu.org
2024-02-03 19:32 ` pinskia at gcc dot gnu.org
2024-02-07 19:16 ` [Bug testsuite/113710] " ppalka at gcc dot gnu.org
2024-02-07 19:25 ` cvs-commit at gcc dot gnu.org
2024-02-07 19:27 ` 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).