[Bug c++/107550] incorrect templated lambda mangling
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107550 Nathan Sidwell changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #1 from Nathan Sidwell --- sigh, compiler version confusion
[Bug c++/107550] New: incorrect templated lambda mangling
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107550 Bug ID: 107550 Summary: incorrect templated lambda mangling Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- I got something wrong in template lambda manglings, discovered when working on the demangler (uncommitted). Confirmed with clang. We get the wrong mangling, somehow losing the template-head of the lambda. template class X; inline void f () { auto l3 = [](X *, X *) {}; l3 ((X *)nullptr, nullptr); // _ZZ1fvENKUlTyP1XIT_EPS_IiEE _clIcEEDaS2_S4_ Correct // _ZZ1fvENKUl P1XIT_EPS_IiEE0_clIcEEDaS2_S4_ Wrong } void a () { f (); }
[Bug c++/107442] New: Concept and Template Var mangling
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107442 Bug ID: 107442 Summary: Concept and Template Var mangling Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- >From a discussion re clang's mangling (https://github.com/llvm/llvm-project/issues/58197), I find some GCC cases namespace Concept { template concept True = true; } namespace Struct_ { template struct True {}; } namespace Var { template constexpr bool True = true; } namespace Functio { template void True (); } template struct ImplExpr { template using Type = T; }; template struct ImplType { template using Type = T; }; template struct ImplFunc { template using Type = T; }; template using IfExpr = typename ImplExpr::template Type; template using IfType = typename ImplType::template Type; template using IfFunc = typename ImplFunc::template Type; template using TypeConcept = IfExpr, T>; template using TypeStruct_ = IfType, T>; template using TypeVar = IfExpr, T>; template using TypeFunctio = IfFunc, T>; template TypeConcept fConcept () {return {};} template TypeStruct_ fStruct_ () {return {};} template TypeVar fVar () {return {};} template TypeFunctio fFunctio () {return {};} int main () { fConcept (); fStruct_ (); fVar (); fFunctio (); } neroon:270>./cc1plus -quiet -std=c++20 conc2.cc -o - | grep '^_Z' _Z8fConceptIiEN8ImplExprIX4TrueIT_EEE4TypeIS1_EEv: _Z8fStruct_IiEN8ImplTypeIN7Struct_4TrueIT_EEE4TypeIS3_EEv: _Z8fVarIiEN8ImplExprIX4TrueIT_EEE4TypeIS1_EEv: _Z8fFunctioIiEN8ImplFuncIX4TrueIT_EEE4TypeIS1_EEv: _ZN7Var4TrueIiEE: neroon:270>clang++ -S -std=c++20 conc2.cc -o - | grep '^_Z' _Z8fConceptIiEN8ImplExprIL_ZN7Concept4TrueIT_4TypeIS3_EEv: # @_Z8fConceptIiEN8ImplExprIL_ZN7Concept4TrueIT_4TypeIS3_EEv _Z8fStruct_IiEN8ImplTypeIN7Struct_4TrueIT_EEE4TypeIS3_EEv: # @_Z8fStruct_IiEN8ImplTypeIN7Struct_4TrueIT_EEE4TypeIS3_EEv _Z8fVarIiEN8ImplExprIXsr7VarE4TrueIT_EEE4TypeIS1_EEv: # @_Z8fVarIiEN8ImplExprIXsr7VarE4TrueIT_EEE4TypeIS1_EEv _Z8fFunctioIiEN8ImplFuncIXsr7FunctioE4TrueIT_EEE4TypeIS1_EEv: # @_Z8fFunctioIiEN8ImplFuncIXsr7FunctioE4TrueIT_EEE4TypeIS1_EEv We're dropping the scoping off Concept::True and Var::True & Functio::True (we're representing these as TEMPLATE_ID_EXPRs, and the mangler only expects an unqualified function there). Should we represent these using ScopeRef, like clang does for the variable case (the clang issue is what should it do for the concept case). Or should we mangle both concept and var as a template instantiation like the class case?
[Bug c++/101243] Coroutine lambda capture is destroyed twice
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101243 Nathan Sidwell changed: What|Removed |Added CC||nathan at gcc dot gnu.org --- Comment #3 from Nathan Sidwell --- Created attachment 51358 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51358&action=edit move-only type Modified to make the capture a move-only type devvm1702:323>./cc1plus -std=c++20 pr.ii -quiet pr.cc: In function 'task f()': pr.cc:73:1: warning: 'f()::_Z1fv.Frame' has a field 'f()::_Z1fv.Frame::D.48642_2_3' whose type has no linkage [-Wsubobject-linkage] In file included from /data/users/nathans/tools/include/c++/10.1.1/functional:59, from pr.cc:2: /data/users/nathans/tools/include/c++/10.1.1/bits/std_function.h: In instantiation of 'static void std::_Function_base::_Base_manager<_Functor>::_M_clone(std::_Any_data&, const std::_Any_data&, std::false_type) [with _Functor = f(f()::_Z1fv.Frame*)::; std::false_type = std::integral_constant]': /data/users/nathans/tools/include/c++/10.1.1/bits/std_function.h:196:16: required from 'static bool std::_Function_base::_Base_manager<_Functor>::_M_manager(std::_Any_data&, const std::_Any_data&, std::_Manager_operation) [with _Functor = f(f()::_Z1fv.Frame*)::]' /data/users/nathans/tools/include/c++/10.1.1/bits/std_function.h:283:23: required from 'static bool std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_manager(std::_Any_data&, const std::_Any_data&, std::_Manager_operation) [with _Res = void; _Functor = f(f()::_Z1fv.Frame*)::; _ArgTypes = {}]' /data/users/nathans/tools/include/c++/10.1.1/bits/std_function.h:611:19: required from 'std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = f(f()::_Z1fv.Frame*)::; = void; = void; _Res = void; _ArgTypes = {}]' pr.cc:71:13: required from here /data/users/nathans/tools/include/c++/10.1.1/bits/std_function.h:161:13: error: use of deleted function 'f(f()::_Z1fv.Frame*)(const f(f()::_Z1fv.Frame*)::&)' 161 | new _Functor(*__source._M_access()); | ^~~~ pr.cc:71:22: note: 'f(f()::_Z1fv.Frame*)(const f(f()::_Z1fv.Frame*)::&)' is implicitly deleted because the default definition would be ill-formed: pr.cc:71:22: error: use of deleted function 'FOO::FOO(const FOO&)' pr.cc:59:3: note: declared here
[Bug preprocessor/99446] [11 Regression] ICE in linemap_position_for_loc_and_offset, at libcpp/line-map.c:1005 since r11-6325
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99446 Nathan Sidwell changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #12 from Nathan Sidwell --- * 8318ccc9e87 2021-04-13 | preprocessor: Fix column adjustment [PR 99446]
[Bug preprocessor/99446] [11 Regression] ICE in linemap_position_for_loc_and_offset, at libcpp/line-map.c:1005 since r11-6325
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99446 Nathan Sidwell changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |nathan at gcc dot gnu.org --- Comment #10 from Nathan Sidwell --- I see the problem. it's the logic in the earlier while loop. testing a fix
[Bug preprocessor/99446] [11 Regression] ICE in linemap_position_for_loc_and_offset, at libcpp/line-map.c:1005 since r11-6325
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99446 --- Comment #8 from Nathan Sidwell --- Well it would be nice if it could show the token in the included file, but if that's difficult your solution is perfectly fine. thanks
[Bug testsuite/99605] [11 regression] new test case g++.dg/modules/builtin-3_a.C fails for 32 bits
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99605 --- Comment #3 from Nathan Sidwell --- I removed the scans, they're too brittle, didn't realize this report was a thing * 671f9f5c0f0 2021-04-06 | c++: Simplify va_arg test
[Bug c++/99380] [modules] Unexpected MODULE-EXPORT request when partially preprocessing header unit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99380 Nathan Sidwell changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #2 from Nathan Sidwell --- * dd6f588a7b8 2021-04-05 | c++: Unneeded export query [PR 99380]
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99283, which changed state. Bug 99283 Summary: [modules] ICE in assert_definition, at cp/module.cc:4608 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283 What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |FIXED
[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283 Nathan Sidwell changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |FIXED --- Comment #23 from Nathan Sidwell --- * f4e05eebd6a 2021-04-02 | c++: header unit purview [PR 99283] I think if there are other cases with other test patterns, they should be separate bugs, otherwise this has just turned into a meta bug of its own.
[Bug libstdc++/99871] New: #includes inside push visibility scope
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99871 Bug ID: 99871 Summary: #includes inside push visibility scope Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- I ran into this working on module bugs (99823). While it is not affecting that debugging, it has code smell. We have the following: #pragma GCC visibility push(default) .. some decls #include ... more decls #pragma GCC visibility pop The case I ran into is # 33 "../x86_64-pc-linux-gnu/libstdc++-v3/include/bits/nested_exception.h" 3 #pragma GCC visibility push(default) ... #include "type_traits" ... #pragma GCC visibility pop That visibility pragma will not affect the visibility of decls in type_traits, when that is translated to an include. Fortunately, you asked for default visibility.
[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283 --- Comment #21 from Nathan Sidwell --- Pants
[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283 --- Comment #19 from Nathan Sidwell --- Yes! that seems to have done it!
[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283 --- Comment #18 from Nathan Sidwell --- * 584731ecedf 2021-04-01 | c++: inter-cluster import order [PR 99283]
[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283 --- Comment #15 from Nathan Sidwell --- another one encountered on the way ... * 5f3c6027257 2021-03-30 | c++: duplicate const static members [PR 99283]
[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283 --- Comment #11 from Nathan Sidwell --- more fixes * d82797420c2 2021-03-26 | c++: imported templates and alias-template changes [PR 99283
[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283 --- Comment #7 from Nathan Sidwell --- found while reducing testcase * bd71889b901 2021-03-23 | c++: Note duplicates in symbol table [PR 99283]
[Bug testsuite/99731] g++.dg/modules/alias-1_a.H: error: failed to read compiled module: No such file or directory
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99731 Nathan Sidwell changed: What|Removed |Added CC||nathan at gcc dot gnu.org --- Comment #1 from Nathan Sidwell --- How repeatable is this?
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99239, which changed state. Bug 99239 Summary: [modules] internal compiler error: in duplicate_decls https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99239 What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
[Bug c++/99239] [modules] internal compiler error: in duplicate_decls
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99239 Nathan Sidwell changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #4 from Nathan Sidwell --- * 6acd6692f1a 2021-03-23 | c++: Over-zealous assert [PR 99239]
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99484, which changed state. Bug 99484 Summary: [modules] ICE same canonical type node for different types ‘void’ and ‘std::__void_t<_Op<_Args ...> >’ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99484 What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |FIXED
[Bug c++/99484] [modules] ICE same canonical type node for different types ‘void’ and ‘std::__void_t<_Op<_Args ...> >’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99484 Nathan Sidwell changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |FIXED --- Comment #5 from Nathan Sidwell --- great, closing
[Bug c++/99424] [modules] ICE tree check: expected tree_vec, have error_mark in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99424 --- Comment #2 from Nathan Sidwell --- no longer reproduces
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99480, which changed state. Bug 99480 Summary: [modules] ICE in import_entity_index, at cp/module.cc:3952 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99480 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug c++/99480] [modules] ICE in import_entity_index, at cp/module.cc:3952
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99480 Nathan Sidwell changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #3 from Nathan Sidwell --- * 2bfd081f1bc 2021-03-22 | c++: Cross-module partial specialiations [PR 99480]
[Bug c++/99480] [modules] ICE in import_entity_index, at cp/module.cc:3952
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99480 Nathan Sidwell changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed||2021-03-22 Status|UNCONFIRMED |ASSIGNED --- Comment #1 from Nathan Sidwell --- // bug_a.ii template struct atomic; template struct atomic<_Tp*>; // bug_b.ii import "bug_a.ii"; template struct atomic<_Tp*> { }; ./cc1plus -std=c++20 -quiet -fmodule-header bug_a.ii && ./cc1plus -std=c++20 -quiet -fmodule-header bug_b.ii bug_b.ii:5:1: internal compiler error: in import_entity_index, at cp/module.cc:3943 5 | { | ^ 0xc8affe import_entity_index ../../../src/gcc/cp/module.cc:3943 0xcc4350 module_may_redeclare(tree_node*) ../../../src/gcc/cp/module.cc:18440 0xe23fda begin_class_definition(tree_node*) ../../../src/gcc/cp/semantics.c:3334
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99425, which changed state. Bug 99425 Summary: [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99425 What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
[Bug c++/99425] [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99425 Nathan Sidwell changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #4 from Nathan Sidwell --- * 87e3c2ef682 2021-03-18 | c++: duplicate alias templates with decltype [PR 99425]
[Bug c++/99604] GC related ICE in 23_containers/vector/modifiers/insert_vs_emplace.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99604 --- Comment #6 from Nathan Sidwell --- Myth Plausible
[Bug c++/99604] GC related ICE in 23_containers/vector/modifiers/insert_vs_emplace.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99604 --- Comment #4 from Nathan Sidwell --- I wonder if this was an instance of 99423?
[Bug other/99496] [11 regression] g++.dg/modules/xtreme-header-3_c.C ICEs after r11-7557
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99496 --- Comment #15 from Nathan Sidwell --- oops, I was juggling too many computers yesterday * 7b900dca607 2021-03-15 | c++: Incorrect type equivalence [PR 99496]
[Bug c++/99601] [11 regression] g++.dg/modules/iostream-1_b.C on x86_64 with -m32
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99601 --- Comment #2 from Nathan Sidwell --- fix the builtin fails: 770d3487ef1 2021-03-15 | c++: Fix 2 testcases [PR 99601] I'm not seeing the iostream fail thought
[Bug other/99496] [11 regression] g++.dg/modules/xtreme-header-3_c.C ICEs after r11-7557
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99496 Nathan Sidwell changed: What|Removed |Added Status|ASSIGNED|WAITING --- Comment #12 from Nathan Sidwell --- afc986aa003 2021-03-15 | c++: Incorrect type equivalence [PR 99496] Please confirm when you are able to.
[Bug c++/99603] New: [11 regression] ICE in libstdc++ tests due to module
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99603 Bug ID: 99603 Summary: [11 regression] ICE in libstdc++ tests due to module Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- I also see 23_containers/vector/modifiers/insert_vs_emplace.cc ICE on x86_64 with -m32 during GC ...
[Bug c++/99601] New: [11 regression] g++.dg/modules/iostream-1_b.C on x86_64 with -m32
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99601 Bug ID: 99601 Summary: [11 regression] g++.dg/modules/iostream-1_b.C on x86_64 with -m32 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- , FAIL: g++.dg/modules/builtin-3_a.C and FAIL: g++.dg/modules/iostream-1_b.C on x86_64 with -m32 (perhaps similar to 99496?)
[Bug c++/99484] [modules] ICE same canonical type node for different types ‘void’ and ‘std::__void_t<_Op<_Args ...> >’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99484 Nathan Sidwell changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |WAITING Last reconfirmed||2021-03-15
[Bug c++/99424] [modules] ICE tree check: expected tree_vec, have error_mark in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99424 Nathan Sidwell changed: What|Removed |Added Last reconfirmed||2021-03-15 Ever confirmed|0 |1 Status|UNCONFIRMED |WAITING --- Comment #1 from Nathan Sidwell --- most likely dup of 99425
[Bug c++/99483] [modules] ICE tree check: expected tree_vec, have bind_expr in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99483 Nathan Sidwell changed: What|Removed |Added Last reconfirmed||2021-03-15 Ever confirmed|0 |1 Status|UNCONFIRMED |WAITING
[Bug c++/99482] [modules] ICE tree check: expected tree_vec, have addr_expr in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99482 Nathan Sidwell changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed||2021-03-15 Status|UNCONFIRMED |WAITING
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99238, which changed state. Bug 99238 Summary: [modules] internal compiler error: segmentation fault https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99238 What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED
[Bug c++/99238] [modules] internal compiler error: segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99238 Nathan Sidwell changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #8 from Nathan Sidwell --- please don;t reopen bugs with different ICEs
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99481, which changed state. Bug 99481 Summary: [modules] ICE tree check: expected template_decl, have function_decl in decl_value, at cp/module.cc:7938 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99481 What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE
[Bug c++/99528] [modules] ICE with iostream& vector
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99528 Nathan Sidwell changed: What|Removed |Added CC||alexander.lelyakin@googlema ||il.com --- Comment #4 from Nathan Sidwell --- *** Bug 99481 has been marked as a duplicate of this bug. ***
[Bug c++/99481] [modules] ICE tree check: expected template_decl, have function_decl in decl_value, at cp/module.cc:7938
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99481 Nathan Sidwell changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||nathan at gcc dot gnu.org Resolution|--- |DUPLICATE --- Comment #2 from Nathan Sidwell --- most likely 99528 *** This bug has been marked as a duplicate of bug 99528 ***
[Bug c++/99484] [modules] ICE same canonical type node for different types ‘void’ and ‘std::__void_t<_Op<_Args ...> >’
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99484 Nathan Sidwell changed: What|Removed |Added CC||nathan at gcc dot gnu.org --- Comment #3 from Nathan Sidwell --- most likely dup of 99496
[Bug c++/99483] [modules] ICE tree check: expected tree_vec, have bind_expr in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99483 Nathan Sidwell changed: What|Removed |Added CC||nathan at gcc dot gnu.org --- Comment #2 from Nathan Sidwell --- most likely dup of 99425
[Bug c++/99482] [modules] ICE tree check: expected tree_vec, have addr_expr in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99482 Nathan Sidwell changed: What|Removed |Added CC||nathan at gcc dot gnu.org --- Comment #2 from Nathan Sidwell --- most likely dup of 99425
[Bug other/99496] [11 regression] g++.dg/modules/xtreme-header-3_c.C ICEs after r11-7557
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99496 Nathan Sidwell changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2021-03-12 Ever confirmed|0 |1 --- Comment #11 from Nathan Sidwell --- With the spec hasher returning a constant zero: // pr99496_a.H template using __void_t = void; template struct __is_referenceable { }; template struct __is_referenceable<_Tp, __void_t<_Tp&>> { }; template::value> struct __is_copy_constructible_impl; // pr99496_b.C import "pr99496_a.H"; zathras:180>./cc1plus -quiet -fmodule-header pr99496_a.H && ./cc1plus -quiet -fmodules-ts pr99496_b.C -fno-module-lazy pr99496_b.C:3:22: internal compiler error: same canonical type node for different types 'void' and '__void_t<_Tp&>' 3 | import "pr99496_a.H"; | ^ 0xeb18c7 comptypes(tree_node*, tree_node*, int) ../../../src/gcc/cp/typeck.c:1554 0xdd03a8 template_args_equal(tree_node*, tree_node*, bool) ../../../src/gcc/cp/pt.c:9211 0xdd05ce comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**, bool) ../../../src/gcc/cp/pt.c:9258 0xdb023c spec_hasher::equal(spec_entry*, spec_entry*) ../../../src/gcc/cp/pt.c:1725 0xe37e23 hash_table::find_slot_with_hash(spec_entry* const&, unsigned int, insert_option) ../../../src/gcc/hash-table.h:981 0xe35749 add_mergeable_specialization(bool, spec_entry*, tree_node*, unsigned int) ../../../src/gcc/cp/pt.c:30022 0xcce825 trees_in::decl_value() ../../../src/gcc/cp/module.cc:8064 0xcd3f61 trees_in::tree_node(bool) ../../../src/gcc/cp/module.cc:9170
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99238, which changed state. Bug 99238 Summary: [modules] internal compiler error: segmentation fault https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99238 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug c++/99238] [modules] internal compiler error: segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99238 Nathan Sidwell changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Nathan Sidwell --- * 6e885ad3287 2021-03-12 | c++: ICE with using-decl [PR 99238]
[Bug other/99496] [11 regression] g++.dg/modules/xtreme-header-3_c.C ICEs after r11-7557
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99496 --- Comment #10 from Nathan Sidwell --- thanks, sadly even that's not triggering it for me on a ppc system. I think I'm going to have to make the specialization hasher really stupid
[Bug c++/99238] [modules] internal compiler error: segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99238 Nathan Sidwell changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2021-03-12 --- Comment #4 from Nathan Sidwell --- // pr99238.h struct tm; // pr99238_a.H #include "pr99238.h" // pr99238_b.H #include "pr99238.h" import "pr99238_a.H"; namespace std { using ::tm; } zathras:116>./cc1plus -quiet -fmodule-header pr99238_a.H && ./cc1plus -quiet -fmodule-header pr99238_b.H pr99238_b.H: internal compiler error: Segmentation fault 0x16c420a crash_signal ../../../src/gcc/toplev.c:327 0xcb70b2 trees_out::get_tag(tree_node*) ../../../src/gcc/cp/module.cc:4779 0xcc01d2 trees_out::ref_node(tree_node*) ../../../src/gcc/cp/module.cc:7086 0xcc93ab trees_out::tree_node(tree_node*) ../../../src/gcc/cp/module.cc:8974 0xcde8cf depset::hash::find_dependencies(module_state*) ../../../src/gcc/cp/module.cc:13114 0xceb673 module_state::write(elf_out*, cpp_reader*) ../../../src/gcc/cp/module.cc:17618
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99240, which changed state. Bug 99240 Summary: [modules] ICE in get_merge_kind, at cp/module.cc:10169 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99240 What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
[Bug c++/99240] [modules] ICE in get_merge_kind, at cp/module.cc:10169
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99240 Nathan Sidwell changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #3 from Nathan Sidwell --- thanks, closing as a duplicate.
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99248, which changed state. Bug 99248 Summary: [modules] ICE expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99248 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug c++/99248] [modules] ICE expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99248 Nathan Sidwell changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #5 from Nathan Sidwell --- 5f27a9f90d4 2021-03-11 | c++: Fix unhiding friend with imports [PR 99248]
[Bug c++/99248] [modules] ICE expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99248 Nathan Sidwell changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 Last reconfirmed||2021-03-11 --- Comment #3 from Nathan Sidwell --- thanks, that saved some time. // pr99248.h class locale { template friend struct __use_cache; }; // pr99248.a.H #include "pr99248.h" // pr99248_b.H #include "pr99248.h" import "pr99248_a.H"; template struct __use_cache; zathras:52>./cc1plus -quiet -fmodule-header pr99248_a.H && ./cc1plus -quiet -fmodule-header pr99248_b.H pr99248_b.H:7:8: internal compiler error: tree check: expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:7943 7 | struct __use_cache; |^~~ 0x1acec3b tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../../src/gcc/tree.c:9816 0xad785c tree_check(tree_node*, char const*, int, char const*, tree_code) ../../../src/gcc/tree.h:3353 0xd1f7d3 lookup_elaborated_type_1 ../../../src/gcc/cp/name-lookup.c:7943
[Bug other/99496] [11 regression] g++.dg/modules/xtreme-header-3_c.C ICEs after r11-7557
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99496 --- Comment #7 from Nathan Sidwell --- Cannot reproduce it on gcc135 either
[Bug c++/99528] [modules] ICE with iostream& vector
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99528 Nathan Sidwell changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #3 from Nathan Sidwell --- edc61d34eb4 2021-03-11 | c++: template partial instantiation mismatch [PR 99528]
[Bug other/99496] [11 regression] g++.dg/modules/xtreme-header-3_c.C ICEs after r11-7557
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99496 --- Comment #6 from Nathan Sidwell --- Oh, sorry. I guess it's not obvious. I need the preprocessed source from all of the xtreme-header-3 series. Test of the form ${BASENAME}_[a-z].[CHX] are a group compiled in ascending letter order. Scrape the .log for the 3 compiles of this particular test, adding -save-temps to each, in order. gcm.cache is created in the working directory of the compilation (gcc/testsuite/g++N), but they are removed after every test so as to not affect the next one. Hope that helps.
[Bug other/99496] [11 regression] g++.dg/modules/xtreme-header-3_c.C ICEs after r11-7557
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99496 --- Comment #4 from Nathan Sidwell --- -save-temps to the compile line scraped from .log should dtrt. but yeah, requires a bit more fidelity than before
[Bug c++/99528] [modules] ICE with iostream& vector
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99528 --- Comment #1 from Nathan Sidwell --- // bug.h template class new_allocator { public: template new_allocator(const new_allocator<_Tp1>&) noexcept { } }; extern template class new_allocator; // bug_a.H #include "bug.h" // bug_b.H #include "bug.h" // bug_c.C import "bug_a.H"; import "bug_b.H"; /cc1plus -quiet -fmodule-header bug_a.H && ./cc1plus -quiet -fmodule-header bug_b.H && ./cc1plus -quiet -fmodules-ts bug_c.C -fno-module-lazy bug_c.C:3:18: internal compiler error: tree check: expected template_decl, have function_decl in decl_value, at cp/module.cc:7938 3 | import "bug_b.H"; | ^ 0x1acdd53 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../../src/gcc/tree.c:9816 0xad685c tree_check(tree_node*, char const*, int, char const*, tree_code) ../../../src/gcc/tree.h:3353 0xcc2df7 trees_in::decl_value() ../../../src/gcc/cp/module.cc:7938 0xcc8e49 trees_in::tree_node(bool) ../../../src/gcc/cp/module.cc:9174 0xce2a7f module_state::read_cluster(unsigned int) ../../../src/gcc/cp/module.cc:14858 0xcebdc6 module_state::load_section(unsigned int, binding_slot*) ../../../src/gcc/cp/module.cc:18129 0xcebaf0 module_state::read_language(bool) ../../../src/gcc/cp/module.cc:18058 0xcee601 direct_import ../../../src/gcc/cp/module.cc:18920
[Bug c++/99528] [modules] ICE with iostream& vector
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99528 Nathan Sidwell changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Assignee|unassigned at gcc dot gnu.org |nathan at gcc dot gnu.org Ever confirmed|0 |1 Last reconfirmed||2021-03-10
[Bug c++/99528] New: [modules] ICE with iostream& vector
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99528 Bug ID: 99528 Summary: [modules] ICE with iostream& vector Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- I broke something. #include #include int main(){ std::cout << "Hello World!" << std::endl; std::vector v; v.push_back(0); std::cout << v[0] << std::endl; return 0; } build iostream & vector as header units, then build: n file included from ../x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ios_base.h:46, from ../x86_64-pc-linux-gnu/libstdc++-v3/include/ios:42, from ../x86_64-pc-linux-gnu/libstdc++-v3/include/ostream:38, from ../x86_64-pc-linux-gnu/libstdc++-v3/include/iostream:39, of module ./../x86_64-pc-linux-gnu/libstdc++-v3/include/iostream, imported at m.cc:1: ../x86_64-pc-linux-gnu/libstdc++-v3/include/system_error: In instantiation of 'struct std::is_error_code_enum': ../x86_64-pc-linux-gnu/libstdc++-v3/include/system_error:189:39: required by substitution of 'template std::error_code::error_code(_ErrorCodeEnum) [with _ErrorCodeEnum = const char*; = ]' m.cc:5:16: required from here ../x86_64-pc-linux-gnu/libstdc++-v3/include/system_error:60:51: internal compiler error: tree check: expected template_decl, have function_decl in decl_value, at cp/module.cc:7938 60 | struct is_error_code_enum : public false_type { }; | ^ 0x1acdd53 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../../src/gcc/tree.c:9816 0xad685c tree_check(tree_node*, char const*, int, char const*, tree_code) ../../../src/gcc/tree.h:3353 0xcc2df7 trees_in::decl_value() ../../../src/gcc/cp/module.cc:7938 0xcc8e49 trees_in::tree_node(bool) ../../../src/gcc/cp/module.cc:9174
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99423, which changed state. Bug 99423 Summary: [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug c++/99423] [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423 Nathan Sidwell changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #3 from Nathan Sidwell --- 1f428775acc 2021-03-10 | c++: ICE do to GC leakage [PR 99423]
[Bug c++/99423] [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423 --- Comment #1 from Nathan Sidwell --- // bug_a.ii template struct pair { pair() { } }; inline pair blob () { return {}; } // bug_b.ii import "bug_a.ii"; pair boom(); ./cc1plus -fmodule-header=system -std=c++20 bug_a.ii -fpreprocessed -quiet && ./cc1plus -fmodule-header=system -std=c++20 bug_b.ii -fpreprocessed -quiet --param ggc-min-expand=0 --param ggc-min-heapsize=0 bug_b.ii:4:10: internal compiler error: tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803 4 | pair boom(); | ^ 0x1acdc4b tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../../src/gcc/tree.c:9814 0xad685c tree_check(tree_node*, char const*, int, char const*, tree_code) ../../../src/gcc/tree.h:3353 0xdc6b60 lookup_template_class_1 ../../../src/gcc/cp/pt.c:9803
[Bug other/99496] [11 regression] g++.dg/modules/xtreme-header-3_c.C ICEs after r11-7557
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99496 --- Comment #1 from Nathan Sidwell --- I am not seeing this on the compile farm's 2 ppc systems I use (gcc1-power7 and gcc2-power8). Can you extract preprocessed source for that set of header tests?
[Bug c++/99508] [11 Regression] Asm labels declared inside a function are ignored
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99508 Nathan Sidwell changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #5 from Nathan Sidwell --- b97af562b57 2021-03-10 | c++: Propagate assembler name from local-externs [PR 99508]
[Bug c++/99508] [11 Regression] Asm labels declared inside a function are ignored
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99508 Nathan Sidwell changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |nathan at gcc dot gnu.org --- Comment #3 from Nathan Sidwell --- Apparently copy_decl doesn't copy_decl :)
[Bug c++/99423] [modules] ICE tree check: expected tree_vec, have ggc_freed in lookup_template_class_1, at cp/pt.c:9803
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99423 Nathan Sidwell changed: What|Removed |Added Last reconfirmed||2021-03-09 Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED
[Bug c++/99472] [modules] std=c++2b flag appears incompatible with C++20 module code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99472 Nathan Sidwell changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #4 from Nathan Sidwell --- 4b3d86a7768 2021-03-09 | c++: Clarify note about -fmodules-ts [PR 99472] it is intentional
[Bug c++/99436] ICE in get_cxx_dialect_name, at cp/name-lookup.c:6955 when using modules on C++23
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99436 Nathan Sidwell changed: What|Removed |Added CC||nathan at gcc dot gnu.org Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #2 from Nathan Sidwell --- bc56d27de97 2021-03-08 | C++: Enable c++2b module mode [PR 99436]
[Bug c++/99472] [modules] std=c++2b flag appears incompatible with C++20 module code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99472 --- Comment #2 from Nathan Sidwell --- indeed, also enabling modules test in 2b mode
[Bug c++/99468] [modules] awkward diagnostic for named-module inside header unit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99468 Nathan Sidwell changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #2 from Nathan Sidwell --- 504450c708c 2021-03-08 | c++: Poor diagnostic in header-unit [PR 99468]
[Bug c++/99468] [modules] awkward diagnostic for named-module inside header unit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99468 --- Comment #1 from Nathan Sidwell --- 504450c708c 2021-03-08 | c++: Poor diagnostic in header-unit [PR 99468]
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99285, which changed state. Bug 99285 Summary: [modules] ICE canonical types differ for identical types ‘std::common_type... https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99285 What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
[Bug c++/99285] [modules] ICE canonical types differ for identical types ‘std::common_type...
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99285 Nathan Sidwell changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #3 from Nathan Sidwell --- ded6a1953dd 2021-03-08 | c++: Incorrect specialization hash table [PR 99285]
[Bug c++/99468] New: [modules] awkward diagnostic for named-module inside header unit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99468 Bug ID: 99468 Summary: [modules] awkward diagnostic for named-module inside header unit Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- We correctly reject a module-declaration appearing in a header-unit compilation. But the diagnostic is ... poor ./cc1plus -std=c++20 -fmodule-header -quiet constrained-partial-1_a.C constrained-partial-1_a.C:3:8: error: module already declared 3 | export module M; |^~ constrained-partial-1_a.C:3:8: note: module 'M' declared here
[Bug c++/99456] [11 regression] ABI breakage with some static initialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99456 --- Comment #11 from Nathan Sidwell --- gcc11-pr99456.patch looks good, can we add a scan-not for the _ZGV guard variables too? If the optimizer's turned on, I think __static_init... gets inlined into the global constructor, might be good to make sure that's not there either.
[Bug c++/99456] [11 regression] ABI breakage with some static initialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99456 --- Comment #7 from Nathan Sidwell --- You're misreading this particular testcase. I don't believe it contains anything invalid -- the only constexpr is on: static constexpr unsigned &descRef = desc; (and I don't think it's necessary there, but that's unimportant) the inline vars are explicitly not constinit/constexpr, but one would expect static initialization for them as they all boil down to symbol refs. it is 99452 showing the inconsistent handling of constinit
[Bug c++/99456] [11 regression] ABI breakage with some static initialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99456 --- Comment #4 from Nathan Sidwell --- It's an ABI issue, because all compilers must agree on which parts of an inline object are dynamically initialized. (gcc-11 does not agree with gcc-10). consider: inline Type Var = Expr; That'll be emitted as comdat in every TU that needs it. Assume some of those TUs generate a static init and others generate a dynamic init. Let's say it's a dynamic one that gets into the executable, but one of the static TUs accesses Var before that dyn init has run. Boom, zero-initialized entity observed. Or, let's say a static one wins, but then a dynmic initializer runs concurrently to a (static TU's) access. Oops, we could observe (weird) partial writes. (this would require Var to be a function-scope static because global inits run in a single-thread environment, and it's less likelu to be a problem). In case it's not clear, this example shows both the above happening, and poor code generation with (a) unused inline vars emitting code and (b) guard variables for inline vars with no dynamic init. Hope that helps.
[Bug c++/99456] [11 regression] ABI breakage with some static initialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99456 --- Comment #2 from Nathan Sidwell --- Created attachment 50328 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50328&action=edit trunk output (unoptimized)
[Bug c++/99456] [11 regression] ABI breakage with some static initialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99456 --- Comment #1 from Nathan Sidwell --- Created attachment 50327 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50327&action=edit gcc-10 output (unoptimized)
[Bug c++/99456] New: [11 regression] ABI breakage with some static initialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99456 Bug ID: 99456 Summary: [11 regression] ABI breakage with some static initialization Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- Created attachment 50326 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50326&action=edit testcase I've noticed some poorer behaviour in trunk than gcc10 with emitting inline vars. The example when compiled with gcc-10 -std=c++17 emits only those vars that are reachable from the externally visible vars. I.e. Var1...Var4 are NOT present. Further all vars are statically initialized with no global initializer function. (This is regardless of optimization level). With trunk, all the inline vars are emitted, even when not referenced. Further, there is a gloabl initializer function emitted, that only tests and sets their respective guard variables, with two exceptions. Var3 and Var13 are dynamically initialized. This is an abi breakage. I attach the two assembly files generated (the source presumes LP32 or LP64 ABI)
[Bug c++/99452] Inconsistent constinit handling
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99452 --- Comment #1 from Nathan Sidwell --- Here's another: using value_t = unsigned long; unsigned obj; constinit value_t failed = reinterpret_cast (&obj) + (11 << 0); constinit value_t accepted = reinterpret_cast (&obj) + (11); bester:309>gcc-current/bin/g++ -c -std=gnu++20 r.ii r.ii:5:19: error: ‘constinit’ variable ‘failed’ does not have a constant initializer 5 | constinit value_t failed | ^~ r.ii:6:5: error: conversion from pointer type ‘unsigned int*’ to arithmetic type ‘value_t’ {aka ‘long unsigned int’} in a constant expression 6 | = reinterpret_cast (&obj) + (11 << 0);
[Bug c++/99452] New: Inconsistent constinit handling
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99452 Bug ID: 99452 Summary: Inconsistent constinit handling Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- constinit forces static initialization (or error). Sadly the std doesn't permit c++98-era address-constant expressions (symbol + addend). but we do accept that (probably a bug std=c++20 vs std=gnu++20 makes no difference) But we do so inconsistently. Both x & y are initializable in this manner -- and we do emit such an initialization if the constinit is removed, regardless of optimization level. But with constinit, the presence of the OR operator causes y's initialization to be rejected. Even though it's totally foldable. constinit long x = reinterpret_cast (&x) + 0; constinit long y = reinterpret_cast (&y) + (0|0); gcc-current/bin/g++ -c c.cc -std=c++20 c.cc:4:16: error: ‘constinit’ variable ‘y’ does not have a constant initializer 4 | constinit long y = reinterpret_cast (&y) + (0|0); |^ c.cc:4:20: error: conversion from pointer type ‘long int*’ to arithmetic type ‘long int’ in a constant expression 4 | constinit long y = reinterpret_cast (&y) + (0|0); Please note I plan an EWG paper to allow symbol+addend, as that seems a useful behaviour.
[Bug c++/99451] New: [plugin] cannot enable dumps for plugin passes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99451 Bug ID: 99451 Summary: [plugin] cannot enable dumps for plugin passes Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- Created attachment 50324 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50324&action=edit patch the -fdump-FOO-BAR options are parsed before plugins have been initialized, this means that one cannot name a pass created with a plugin. Here's a patch to defer the dump option processing until later (we cannot just swap the order, as the plugin options themselves need parsing before we initialize the plugins). -fdump-FOO-all will enable the dump, so we have a workaround I don't think this is a regression, so stage 1 I guess?
[Bug c++/99285] [modules] ICE canonical types differ for identical types ‘std::common_type...
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99285 --- Comment #1 from Nathan Sidwell --- //bug_a.ii template struct common_type; template<> struct common_type<> {}; template struct common_type<_Tp0> {}; template struct common_type<_Tp1, _Tp2> {}; //bug_b.ii import "bug_a.ii"; template::type> struct X; ./cc1plus -quiet -std=c++20 -fmodule-header bug_a.ii && ./cc1plus -quiet -std=c++20 -fmodule-header bug_b.ii bug_b.ii:4:60: internal compiler error: canonical types differ for identical types 'common_type<_Rep1, _Rep2>' and 'common_type<_Tp1, _Tp2>' 4 | typename _CRep = typename common_type<_Rep1, _Rep2>::type> |^ 0xea4ed7 comptypes(tree_node*, tree_node*, int) ../../../src/gcc/cp/typeck.c:1547 0xe4beea fixup_template_type ../../../src/gcc/cp/semantics.c:3477 0xe4c1f6 finish_template_type(tree_node*, tree_node*, int) ../../../src/gcc/cp/semantics.c:3510 0xd4aa7b cp_parser_template_id ../../../src/gcc/cp/parser.c:17444 0xd59426 cp_parser_class_name ../../../src/gcc/cp/parser.c:24671 0xd34ebf cp_parser_qualifying_entity ../../../src/gcc/cp/parser.c:6994
[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283 Nathan Sidwell changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed||2021-03-05 Status|UNCONFIRMED |WAITING --- Comment #1 from Nathan Sidwell --- Can (no longer?) reproduce. Is it working for you now?
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99245, which changed state. Bug 99245 Summary: [modules] ICE in write_cluster, at cp/module.cc:14600 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99245 What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED
[Bug c++/99245] [modules] ICE in write_cluster, at cp/module.cc:14600
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99245 Nathan Sidwell changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #4 from Nathan Sidwell --- 9e64dd6b3f6 2021-03-05 | c++: Duplicate namespace bindings [PR 99245]
[Bug c++/99377] [modules] undefined std::string_view::empty() if referenced in inline exported function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99377 Nathan Sidwell changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #3 from Nathan Sidwell --- 1e5cdb9f896 2021-03-05 | c++: Local instantiations of imported specializations [PR 99377]
[Bug c++/99245] [modules] ICE in write_cluster, at cp/module.cc:14600
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99245 Nathan Sidwell changed: What|Removed |Added Last reconfirmed||2021-03-05 Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED --- Comment #2 from Nathan Sidwell --- // bug_a.ii namespace std { class type_info {}; } // bug_b.ii namespace std { class type_info; } import "bug_a.ii"; namespace std { const type_info* __cxa_exception_type () noexcept; } evvm1702:160>./cc1plus -quiet -fmodule-header bug_a.ii && ./cc1plus -quiet -fmodule-header bug_b.ii bug_b.ii: internal compiler error: in write_cluster, at cp/module.cc:14506 0xcdfd72 module_state::write_cluster(elf_out*, depset**, unsigned int, depset::hash&, unsigned int*, unsigned int*) ../../../src/gcc/cp/module.cc:14506 0xce9486 module_state::write(elf_out*, cpp_reader*) ../../../src/gcc/cp/module.cc:17763 0xcef73a finish_module_processing(cpp_reader*) ../../../src/gcc/cp/module.cc:19870
[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Bug 99227 depends on bug 99247, which changed state. Bug 99247 Summary: [modules] ICE in write_macro_maps, at cp/module.cc:16154 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99247 What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE
[Bug c++/98718] [modules] use of partitions causes ICE in write_macro_maps
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98718 --- Comment #8 from Nathan Sidwell --- *** Bug 99247 has been marked as a duplicate of this bug. ***
[Bug c++/99247] [modules] ICE in write_macro_maps, at cp/module.cc:16154
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99247 Nathan Sidwell changed: What|Removed |Added Resolution|--- |DUPLICATE Status|UNCONFIRMED |RESOLVED --- Comment #1 from Nathan Sidwell --- Cannot reproduce, believe duplicate 98718 *** This bug has been marked as a duplicate of bug 98718 ***
[Bug c++/99377] [modules] undefined std::string_view::empty() if referenced in inline exported function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99377 --- Comment #1 from Nathan Sidwell --- // bug_a.ii template struct Widget { Widget (int) { } bool First() const { return true; } bool Second () const { return true;} }; inline void Frob (const Widget& w) noexcept { w.First (); } // bug_b.ii export module Foo; import "bug_a.ii"; export inline bool Check (const Widget& w) { return w.Second (); } // bug_c.ii import Foo; int main () { return Check (0) ? 0 : 1; } ./cc1plus -fmodule-header -quiet bug_a.ii && ./cc1plus -quiet -fmodules-ts bug_b.ii && ./cc1plus -quiet -fmodules-ts bug_c.ii && g++ bug_b.s bug_c.s /data/users/nathans/tools/lib/gcc/x86_64-pc-linux-gnu/10.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/cc6QqMLl.o: in function `Check(Widget const&)': bug_c.ii:(.text._Z5CheckRK6WidgetIiE[_Z5CheckRK6WidgetIiE]+0x14): undefined reference to `Widget::Second() const' collect2: error: ld returned 1 exit status
[Bug libstdc++/99413] internal library headers are not header-unit ready
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99413 --- Comment #2 from Nathan Sidwell --- Correct. We're only picking headers that are either (a) user-facing or (b) included from more than one place. Specifically we're partitioning the include graph into a set of multi-reached sub-graphs. And we're maintaining a bad-list, which are the case reported here. Hope that helps.