[Bug c++/103118] [modules] ICE tree check in get_merge_kind at cp/module.cc

2021-11-16 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103118 --- Comment #4 from Johel Ernesto Guerrero Peña --- With the setup in Comment 3, now I can also include `` in the GMF of a module. I don't think this worked last week. Though all I'm doing in the module is specializing a my-library type trait on

[Bug c++/103339] New: [modules] ICE in exporting module on use of outside specialization

2021-11-19 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103339 Bug ID: 103339 Summary: [modules] ICE in exporting module on use of outside specialization Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[Bug c++/103341] New: ICE type of variable instantiation constrained on template parameter

2021-11-20 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103341 Bug ID: 103341 Summary: ICE type of variable instantiation constrained on template parameter Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal

[Bug c++/103339] [modules] ICE in exporting module on use of outside specialization

2021-11-23 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103339 --- Comment #1 from Johel Ernesto Guerrero Peña --- In non-reduced code, I got the error from Bug 99861 which I solved with the workaround above: ``` hash table checking failed: equal operator returns true for a pair of values with a different

[Bug c++/103339] [modules] ICE in exporting module on use of outside specialization

2021-11-23 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103339 --- Comment #2 from Johel Ernesto Guerrero Peña --- Or not really. Removing a comment breaks it again, so I guess the compiler is already in a bugged state that seems to work fine.

[Bug c++/103339] [modules] ICE in exporting module on use of outside specialization

2021-11-23 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103339 --- Comment #3 from Johel Ernesto Guerrero Peña --- Turns out that the error from Bug 99861 just happens occasionally when compiling.

[Bug c++/100687] [modules, concepts] imported concept gives different result

2021-11-24 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100687 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/103468] New: [modules] ICE Segmentation fault during GIMPLE pass walloca

2021-11-29 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103468 Bug ID: 103468 Summary: [modules] ICE Segmentation fault during GIMPLE pass walloca Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code

[Bug c++/99377] [modules] undefined std::string_view::empty() if referenced in inline exported function

2021-11-29 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99377 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/99377] [modules] undefined std::string_view::empty() if referenced in inline exported function

2021-11-29 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99377 --- Comment #6 from Johel Ernesto Guerrero Peña --- A workaround for static member functions: ```C++ template [[nodiscard]] consteval I max() { return std::numeric_limits::max(); } if (v == std::numeric_limits::max()) break; if (v == max(

[Bug c++/103564] New: type-requirement that names a constructor should fail

2021-12-05 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103564 Bug ID: 103564 Summary: type-requirement that names a constructor should fail Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal

[Bug c++/99377] [modules] undefined std::string_view::empty() if referenced in inline exported function

2021-12-20 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99377 --- Comment #7 from Johel Ernesto Guerrero Peña --- if (v == [] consteval { return std::numeric_limits::max() }()) break; works too. More generally, you can avoid the linker error if you don't require the symbol at link time.

[Bug c++/86105] Conversion to ambiguous/inaccessible rvalue base is valid in unevaluated context

2021-08-28 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86105 --- Comment #1 from Johel Ernesto Guerrero Peña --- Denoised: https://godbolt.org/z/87fbMG6f5. ```C++ template concept is_static_castable = requires(From && (*from)()) { static_cast(from()); }; struct B { }; struct D : B { }; struct D2 : D, B {

[Bug c++/99507] Can't return static address from immediate function

2021-08-28 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99507 Johel Ernesto Guerrero Peña changed: What|Removed |Added Status|ASSIGNED|RESOLVED Known to wor

[Bug c++/99141] Name of deduced type unchecked in deduction guide

2021-08-28 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99141 Johel Ernesto Guerrero Peña changed: What|Removed |Added Known to fail||11.0, 12.0 --- Comment #1

[Bug c++/95977] No deallocation of temporary in return-statement during constant evaluation

2021-08-28 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95977 Johel Ernesto Guerrero Peña changed: What|Removed |Added Status|NEW |RESOLVED Known to wor

[Bug c++/96090] noexcept operator of potentially-throwing defaulted function gives the wrong result

2021-08-28 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96090 Johel Ernesto Guerrero Peña changed: What|Removed |Added Known to fail||10.3.0, 11.2.0, 12.0

[Bug c++/95797] Can std::allocator.deallocate newed pointer during constant evaluation

2021-08-28 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95797 Johel Ernesto Guerrero Peña changed: What|Removed |Added Resolution|--- |FIXED Known to work|

[Bug c++/102137] New: class template argument deduction with template template parameter allows explicit deduction guide

2021-08-30 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102137 Bug ID: 102137 Summary: class template argument deduction with template template parameter allows explicit deduction guide Product: gcc Version: 12.0 Status: UNCONFIRMED

[Bug c++/102174] New: Unused result of undefined behavior arithmetic is accepted during constant evaluation

2021-09-02 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102174 Bug ID: 102174 Summary: Unused result of undefined behavior arithmetic is accepted during constant evaluation Product: gcc Version: 12.0 Status: UNCONFIRMED Ke

[Bug c++/102191] New: Can't return prvalue with potentially-throwing destructor during constant evaluation

2021-09-03 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102191 Bug ID: 102191 Summary: Can't return prvalue with potentially-throwing destructor during constant evaluation Product: gcc Version: 12.0 Status: UNCONFIRMED Key

[Bug c++/102220] New: Conversion from cv void* to object-type* not rejected during constant evaluation

2021-09-06 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102220 Bug ID: 102220 Summary: Conversion from cv void* to object-type* not rejected during constant evaluation Product: gcc Version: 12.0 Status: UNCONFIRMED Keyword

[Bug c++/102249] New: Can't compare pointer to functions during constant evaluation

2021-09-08 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102249 Bug ID: 102249 Summary: Can't compare pointer to functions during constant evaluation Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: rejects-valid

[Bug c++/102258] New: dynamic_cast to derived type fails during constant evaluation

2021-09-09 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102258 Bug ID: 102258 Summary: dynamic_cast to derived type fails during constant evaluation Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: rejects-valid

[Bug c++/102258] dynamic_cast to derived type fails during constant evaluation

2021-09-09 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102258 --- Comment #1 from Johel Ernesto Guerrero Peña --- Workaround for my use-case: https://godbolt.org/z/5Woe8dvan. ```C++ #include #include #include #include #include struct B { virtual ~B() = default; }; struct D : B { int x{1}; constexpr ~D

[Bug c++/102258] dynamic_cast to derived type fails during constant evaluation

2021-09-09 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102258 --- Comment #2 from Johel Ernesto Guerrero Peña --- That still doesn't work because you can't compare (the addresses of) different `std::type_info` objects.

[Bug c++/102267] New: Can't compare pointers to instantiated variables during constant evaluation

2021-09-09 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102267 Bug ID: 102267 Summary: Can't compare pointers to instantiated variables during constant evaluation Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: re

[Bug c++/102267] Can't compare pointers to non-specialization instantiated variables during constant evaluation

2021-09-09 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102267 Johel Ernesto Guerrero Peña changed: What|Removed |Added Summary|Can't compare pointers to |Can't compare pointers to

[Bug c++/102284] New: Can access object outside of its lifetime during constant evaluation

2021-09-10 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102284 Bug ID: 102284 Summary: Can access object outside of its lifetime during constant evaluation Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: accepts-i

[Bug c++/102284] Can access object outside of its lifetime during constant evaluation

2021-09-10 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102284 --- Comment #1 from Johel Ernesto Guerrero Peña --- There's also https://eel.is/c++draft/basic.life#9.sentence-1 to consider. See https://godbolt.org/z/P97Kaqhv8. ```C++ struct X { int x; }; int main() { []() consteval { X x{}; x.~X();

[Bug c++/102284] Can access object outside of its lifetime during constant evaluation

2021-09-10 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102284 --- Comment #2 from Johel Ernesto Guerrero Peña --- Fixed that: https://godbolt.org/z/YGf4GTP5P. ```C++ struct X { constexpr ~X() { } }; int main() { []() consteval { X x{}; x.~X(); }(); } ```

[Bug c++/102267] Can't compare pointers to non-specialization instantiated variables during constant evaluation

2021-09-10 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102267 Johel Ernesto Guerrero Peña changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resoluti

[Bug c++/94716] comparison of address of template variables should be constexpr

2021-09-10 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94716 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/102284] Can access object outside of its lifetime during constant evaluation

2021-09-10 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102284 --- Comment #4 from Johel Ernesto Guerrero Peña --- If there is, I confirmed it's not in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004.

[Bug c++/82877] negative array index accepted in a pointer difference expression in constexpr context

2021-09-12 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82877 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/102420] New: null pointer dereference constant

2021-09-20 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102420 Bug ID: 102420 Summary: null pointer dereference constant Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P

[Bug c++/102420] null pointer dereference during constant evaluation not rejected

2021-09-20 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102420 Johel Ernesto Guerrero Peña changed: What|Removed |Added Summary|null pointer dereference|null pointer dereference

[Bug c++/100583] [modules] ICE when importing

2021-09-26 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100583 --- Comment #1 from Johel Ernesto Guerrero Peña --- Please, add Bug 99227 to **Blocks:** for visibility.

[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files

2021-09-28 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/102524] New: [modules] Missing diagnostic when an exported namespace is empty

2021-09-28 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102524 Bug ID: 102524 Summary: [modules] Missing diagnostic when an exported namespace is empty Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: diagnostic

[Bug c++/102536] New: [modules] ICE Error reporting routines re-entered

2021-09-29 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102536 Bug ID: 102536 Summary: [modules] ICE Error reporting routines re-entered Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal

[Bug c++/102576] New: [modules] Importing doesn't permit implicit uses

2021-10-03 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102576 Bug ID: 102576 Summary: [modules] Importing doesn't permit implicit uses Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: rejects-valid Seve

[Bug c++/102576] [modules] Importing doesn't permit implicit uses

2021-10-03 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102576 --- Comment #1 from Johel Ernesto Guerrero Peña --- `` is specified as including ``. It doesn't with with that either: ```C++ import; namespace { constexpr void test() { for (const int i : {0, 1, -1}) { } ``` ``` error: deducing from brace

[Bug c++/100583] [modules] ICE when importing

2021-10-03 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100583 --- Comment #3 from Johel Ernesto Guerrero Peña --- Thank you. > The solution is to use the include and remove the gcm file altogether. Is this still the case? I still get an ICE.

[Bug c++/102598] New: [modules] ICE in pp_string, at pretty-print.c

2021-10-04 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102598 Bug ID: 102598 Summary: [modules] ICE in pp_string, at pretty-print.c Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal

[Bug c++/102598] [modules] ICE in pp_string, at pretty-print.c

2021-10-04 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102598 --- Comment #1 from Johel Ernesto Guerrero Peña --- Attempts to reduce another wrong-code bug lead to this.

[Bug c++/102600] New: [modules] ICE Segmentation fault during GIMPLE pass evrp

2021-10-04 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102600 Bug ID: 102600 Summary: [modules] ICE Segmentation fault during GIMPLE pass evrp Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code

[Bug c++/102607] New: [modules] option -g results in undefined reference to `typeinfo for type`

2021-10-05 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102607 Bug ID: 102607 Summary: [modules] option -g results in undefined reference to `typeinfo for type` Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: link

[Bug c++/102607] [modules] option -g results in undefined reference to `typeinfo for type`

2021-10-05 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102607 --- Comment #1 from Johel Ernesto Guerrero Peña --- A workaround is to define `B`'s destructor as `constexpr virtual ~B() { }`.

[Bug c++/102600] [modules] ICE Segmentation fault during GIMPLE pass evrp

2021-10-06 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102600 --- Comment #2 from Johel Ernesto Guerrero Peña --- A workaround: ```C++ export using byte = // Workaround GCC bug 102600. #if not defined(NDEBUG) or (defined(__clang__) or not defined(__GNUC__)) std::byte; #else unsigned char; #endif ```

[Bug c++/102931] New: ICE explicit lambda call operator without template keyword

2021-10-25 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102931 Bug ID: 102931 Summary: ICE explicit lambda call operator without template keyword Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code

[Bug c++/102933] New: Can't use CTAD in template argument

2021-10-25 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102933 Bug ID: 102933 Summary: Can't use CTAD in template argument Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P

[Bug c++/102963] New: [modules] ICE failed static_assert of concept

2021-10-27 Thread johelegp at gmail dot com via 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+

[Bug c++/102963] [modules] ICE failed static_assert of concept

2021-10-27 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102963 --- Comment #1 from Johel Ernesto Guerrero Peña --- 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.

[Bug c++/102975] New: Local alias diagnosed as unused when used in failing constraint

2021-10-27 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102975 Bug ID: 102975 Summary: Local alias diagnosed as unused when used in failing constraint Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: diagnostic

[Bug c++/102975] Local alias diagnosed as unused when used in failing constraint

2021-10-31 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102975 --- Comment #4 from Johel Ernesto Guerrero Peña --- I'm fine with closing this as RESOLVED INVALID or something along those lines.

[Bug libstdc++/107378] New: `get_if` implementation "is not a constant expression"

2022-10-24 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107378 Bug ID: 107378 Summary: `get_if` implementation "is not a constant expression" Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal

[Bug c++/107378] `get_if` implementation "is not a constant expression"

2022-10-24 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107378 --- Comment #3 from Johel Ernesto Guerrero Peña --- MSVC accepts https://godbolt.org/z/nheYz9aez. ```C++ static_assert([i = 0] { return &i != nullptr; }()); ``` ``` : In lambda function: :1:35: warning: the address of 'i' will never be NULL [-

[Bug c++/106363] [13 Regression] [modules] Can't selectively reexport imported declaration in same namespace

2022-10-24 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106363 Johel Ernesto Guerrero Peña changed: What|Removed |Added Summary|[modules] Can't selectively |[13 Regression] [modules]

[Bug c++/106363] [13 Regression] [modules] ICE using-declaration of imported name in the same namespace

2022-10-24 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106363 Johel Ernesto Guerrero Peña changed: What|Removed |Added Known to work||12.2.0 Known to fail

[Bug c++/107378] `get_if` implementation "is not a constant expression"

2022-10-24 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107378 --- Comment #5 from Johel Ernesto Guerrero Peña --- I think so. My actual use case looks like `constexpr auto v = E;` at global scope, where `E` creates a temporary with a subobject of `std::variant`. Wrapping `E` in an IILE is a workaround for

[Bug c++/107938] New: ICE directly returning `this` of `extern` variable in template

2022-11-30 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107938 Bug ID: 107938 Summary: ICE directly returning `this` of `extern` variable in template Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-co

[Bug c++/107939] New: Rejects use of `extern const` variable in a template

2022-11-30 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107939 Bug ID: 107939 Summary: Rejects use of `extern const` variable in a template Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal

[Bug c++/107939] [11/12/13 Regression] Rejects use of `extern const` variable in a template

2022-11-30 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107939 --- Comment #2 from Johel Ernesto Guerrero Peña --- Making the expression using the `extern const` variable more complex or indirect makes it work. With an IILE, for example: https://compiler-explorer.com/z/EjYYvPvqT.

[Bug c++/108169] class type template parameters are const in GCC (differs from other compilers)

2022-12-26 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108169 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/105743] New: Bogus unused but set lambda warning

2022-05-26 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105743 Bug ID: 105743 Summary: Bogus unused but set lambda warning Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3

[Bug c++/105743] Bogus unused but set lambda warning

2022-05-26 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105743 Johel Ernesto Guerrero Peña changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resoluti

[Bug c++/105571] Spurious "set but not used" on static constexpr local, used in lambda

2022-05-26 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105571 Johel Ernesto Guerrero Peña changed: What|Removed |Added CC||johelegp at gmail dot com

[Bug c++/105571] Spurious "set but not used" on static constexpr local, used in lambda

2022-05-26 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105571 --- Comment #2 from Johel Ernesto Guerrero Peña --- Simplified reproducer from Bug 105743: See https://godbolt.org/z/xq16xac15. ```C++ void f(auto x) { x(0); } void g() { static constexpr auto h = [](...) { }; f([](auto x) { h(x); }); } ``

[Bug c++/105761] New: ICE on hidden friend definition defined in base type

2022-05-28 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105761 Bug ID: 105761 Summary: ICE on hidden friend definition defined in base type Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal

[Bug c++/105761] ICE on hidden friend definition defined in base type

2022-05-28 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105761 --- Comment #1 from Johel Ernesto Guerrero Peña --- Simplified: https://godbolt.org/z/66Gd84dos. ```C++ template class X { friend auto f(X); }; struct Y : X { friend auto f(X) { return 0L; } }; ```

[Bug c++/105044] [modules] ICE in comptypes, at cp/typeck.c:1529

2022-07-03 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105044 --- Comment #1 from Johel Ernesto Guerrero Peña --- Another simpler reproducer from another use-case: https://godbolt.org/z/jroqv6Kzq. `mod.cpp`: ```C++ export module mod; export template struct constant { }; export template struct is_constant

[Bug c++/105044] [modules] ICE in comptypes, at cp/typeck.cc:1531

2022-07-03 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105044 Johel Ernesto Guerrero Peña changed: What|Removed |Added Summary|[modules] ICE in comptypes, |[modules] ICE in comptypes

[Bug c++/105044] [modules] ICE in comptypes, at cp/typeck.cc:1531

2022-07-03 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105044 --- Comment #3 from Johel Ernesto Guerrero Peña --- Enough recompilations from the actual use-case show this error: ``` /home/johel/Documents/C++/Repos/Waarudo/tests/unit/test.waarudo.quantities.cpp: In substitution of ‘template struct waarudo::

[Bug c++/106287] New: Implicit virtual destructor needs to be explicitly defaulted for constant evaluation

2022-07-13 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106287 Bug ID: 106287 Summary: Implicit virtual destructor needs to be explicitly defaulted for constant evaluation Product: gcc Version: 13.0 Status: UNCONFIRMED Key

[Bug c++/106289] New: Value of polymorphic type as template argument

2022-07-13 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106289 Bug ID: 106289 Summary: Value of polymorphic type as template argument Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal

[Bug c++/106304] New: [modules] ICE compiling dynamic_cast in constexpr function (in tree_node, at cp/module.cc:9183)

2022-07-14 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106304 Bug ID: 106304 Summary: [modules] ICE compiling dynamic_cast in constexpr function (in tree_node, at cp/module.cc:9183) Product: gcc Version: 13.0 Status: UNCONFIRMED

[Bug c++/99377] [modules] undefined std::string_view::empty() if referenced in inline exported function

2022-07-16 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99377 --- Comment #8 from Johel Ernesto Guerrero Peña --- Created attachment 53309 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53309&action=edit Debug GCM

[Bug c++/99377] [modules] undefined std::string_view::empty() if referenced in inline exported function

2022-07-16 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99377 --- Comment #9 from Johel Ernesto Guerrero Peña --- Created attachment 53310 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53310&action=edit Debug object file

[Bug c++/99377] [modules] undefined std::string_view::empty() if referenced in inline exported function

2022-07-16 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99377 --- Comment #10 from Johel Ernesto Guerrero Peña --- Created attachment 53311 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53311&action=edit Release GCM

[Bug c++/99377] [modules] undefined std::string_view::empty() if referenced in inline exported function

2022-07-16 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99377 --- Comment #11 from Johel Ernesto Guerrero Peña --- Created attachment 53312 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53312&action=edit Release object file

[Bug c++/99377] [modules] undefined std::string_view::empty() if referenced in inline exported function

2022-07-16 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99377 --- Comment #12 from Johel Ernesto Guerrero Peña --- The workaround of Comment 5 stopped working for my actual use-case some time ago. Now I do this: ```C++ export constexpr void expects(bool truth) noexcept { if (not truth) std::terminate();

[Bug c++/99377] [modules] undefined std::string_view::empty() if referenced in inline exported function

2022-07-17 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99377 --- Comment #13 from Johel Ernesto Guerrero Peña --- > The workaround of Comment 5 stopped working for my actual use-case some time > ago. The `using` declaration works if I move it earlier in the TU.

[Bug c++/95454] type-level nodiscard not applied to constructors

2022-07-19 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95454 --- Comment #3 from Johel Ernesto Guerrero Peña --- > A workaround would be to declare the constructor(s) [[nodiscard]]: That's generally a [better recommendation](https://github.com/mpusz/units/issues/136). Though I think you'd have to `= defau

[Bug c++/106363] New: [modules] Can't selectively reexport imported declaration in same namespace

2022-07-19 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106363 Bug ID: 106363 Summary: [modules] Can't selectively reexport imported declaration in same namespace Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ic

[Bug c++/101717] New: ICE capturing static member by ref within stateless lambda

2021-08-01 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101717 Bug ID: 101717 Summary: ICE capturing static member by ref within stateless lambda Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: ice-on-valid-code

[Bug c++/101717] ICE capturing static member within stateless generic lambda

2021-08-01 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101717 Johel Ernesto Guerrero Peña changed: What|Removed |Added Summary|ICE capturing static member |ICE capturing static membe

[Bug c++/101725] New: simple requirement of parameter in defaulted non-type template parameter considered non-dependent

2021-08-02 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101725 Bug ID: 101725 Summary: simple requirement of parameter in defaulted non-type template parameter considered non-dependent Product: gcc Version: 11.0 Status: UNCONFIRMED

[Bug c++/101733] New: simple-requirement prefixed with typename interpreted as type-requirement

2021-08-02 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101733 Bug ID: 101733 Summary: simple-requirement prefixed with typename interpreted as type-requirement Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: reje

[Bug c++/101764] New: ICE for constexpr if within fold expression within lambda expression within a template

2021-08-03 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101764 Bug ID: 101764 Summary: ICE for constexpr if within fold expression within lambda expression within a template Product: gcc Version: 12.0 Status: UNCONFIRMED K

[Bug c++/101884] New: Generic lambda with auto in template parameter list rejected

2021-08-12 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101884 Bug ID: 101884 Summary: Generic lambda with auto in template parameter list rejected Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: rejects-valid

[Bug c++/102000] New: Defaulted consteval default constructor that performs no initialization is not rejected

2021-08-20 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102000 Bug ID: 102000 Summary: Defaulted consteval default constructor that performs no initialization is not rejected Product: gcc Version: 12.0 Status: UNCONFIRMED

[Bug c++/102000] Defaulted consteval default constructor that performs no initialization is not rejected

2021-08-20 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102000 --- Comment #1 from Johel Ernesto Guerrero Peña --- Can https://bugs.llvm.org/show_bug.cgi?id=51560 be fixed as part of this?

[Bug c++/102000] Defaulted consteval default constructor that performs no initialization is not rejected

2021-08-23 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102000 --- Comment #3 from Johel Ernesto Guerrero Peña --- https://bugs.llvm.org/show_bug.cgi?id=51560#c1 points out > I'm not sure what you think the problem is here. The constructor isn't > getting called; see http://eel.is/c++draft/dcl.init.genera

[Bug c++/102050] New: Nonempty list-initialization rejects constructor with defaulted std::initializer_list

2021-08-24 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102050 Bug ID: 102050 Summary: Nonempty list-initialization rejects constructor with defaulted std::initializer_list Product: gcc Version: 12.0 Status: UNCONFIRMED Ke

[Bug c++/110893] New: [modules] ICE Segmentation fault during GIMPLE pass modref

2023-08-03 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110893 Bug ID: 110893 Summary: [modules] ICE Segmentation fault during GIMPLE pass modref Product: gcc Version: 14.0 URL: https://cpp2.godbolt.org/z/8q9c3P6vY St

[Bug c++/110894] New: [modules] Program terminates with signal SIGSEGV

2023-08-03 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110894 Bug ID: 110894 Summary: [modules] Program terminates with signal SIGSEGV Product: gcc Version: 14.0 URL: https://cpp2.godbolt.org/z/7YrvenrzT Status: UNCONFIRMED Ke

[Bug c++/110894] [modules] Program terminates with signal SIGSEGV

2023-08-03 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110894 --- Comment #1 from Johel Ernesto Guerrero Peña --- If instead I use `std::string_view` in `-O3` (`-O0` works), it also diagnoses (): ``` In file included from /app/module.cpp:2, of module hello, imported a

[Bug c++/110894] [modules] Program terminates with signal SIGSEGV

2023-08-03 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110894 --- Comment #3 from Johel Ernesto Guerrero Peña --- Reduced: . If you comment out the use of `.data()` at the end of `my_string_view.hpp` it works. It originally comes from ``'s specialization of `hash`, `

[Bug c++/110978] New: [14 Regression] ICE lambda constrained with to-be-deduced object

2023-08-10 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110978 Bug ID: 110978 Summary: [14 Regression] ICE lambda constrained with to-be-deduced object Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-invali

<    1   2   3   >