[Bug c++/99631] decltype of non-type template-parameter shouldn't be const

2023-09-24 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99631 --- Comment #14 from danakj at orodu dot net --- Thank you =)

[Bug c++/110158] Cannot use union with std::string inside in constant expression

2023-09-06 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110158 --- Comment #6 from danakj at orodu dot net --- In case it is of help, here's an even smaller repro that clang reports the error in libstdc++. For whatever reason gcc does not notice the libstdc++ bug here. https://gcc.godbolt.org/z/Phndafeoe

[Bug c++/110158] Cannot use union with std::string inside in constant expression

2023-09-06 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110158 --- Comment #5 from danakj at orodu dot net --- As a means to work around #4 in static asserts, making your string long enough that it avoids the SSO will allow the compiler to accept it.

[Bug c++/110999] New: GCC rejects static variable with constexpr storage from inline method definition

2023-08-11 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110999 Bug ID: 110999 Summary: GCC rejects static variable with constexpr storage from inline method definition Product: gcc Version: 14.0 Status: UNCONFIRMED

[Bug c++/110927] New: GCC fails to parse dependent type in concept through partial specialization

2023-08-06 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110927 Bug ID: 110927 Summary: GCC fails to parse dependent type in concept through partial specialization Product: gcc Version: 14.0 Status: UNCONFIRMED Severity:

[Bug c++/110905] GCC rejects constexpr code that may re-initialize union member

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110905 --- Comment #4 from danakj at orodu dot net --- Ok it only happens if the VecIntoIter class has a base class, even when it's empty the bug reproduces. But when I remove the IteratorBase base class, then GCC compiles it correctly. It's getting

[Bug c++/110905] GCC rejects constexpr code that may re-initialize union member

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110905 --- Comment #3 from danakj at orodu dot net --- Repro down from 37k to under 1000 lines now: https://godbolt.org/z/enMxaqjb6

[Bug c++/110905] GCC rejects constexpr code that may re-initialize union member

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110905 --- Comment #2 from danakj at orodu dot net --- Ah ok. Here's a big reproduction: https://godbolt.org/z/Kj7Tcd6P4 /opt/compiler-explorer/gcc-trunk-20230804/include/c++/14.0.0/bits/stl_construct.h:97:14: in 'constexpr' expansion of

[Bug c++/110905] New: GCC rejects constexpr code that may re-initialize union member

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110905 Bug ID: 110905 Summary: GCC rejects constexpr code that may re-initialize union member Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal

[Bug libstdc++/110900] std::string initializes SSO object subfield without making the SSO object active in the union

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110900 --- Comment #6 from danakj at orodu dot net --- Thanks for the link, I used the godbolt from that bug to set up the right environment and that let me minimize it. I posted it into the dupe bug.

[Bug c++/110158] Cannot use union with std::string inside in constant expression

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110158 --- Comment #4 from danakj at orodu dot net --- Here's a repro without the std::string inside a union. It is the SSO union inside the string that causes the error. https://gcc.godbolt.org/z/T8oM8vYnq ``` #include template constexpr T fold(T

[Bug libstdc++/110900] std::string initializes SSO object subfield without making the SSO object active in the union

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110900 --- Comment #5 from danakj at orodu dot net --- > Can you please read https://gcc.gnu.org/bugs/ on what we need? Yeah, sorry I can't reproduce this locally on my Mac or Windows machine. It reproduces on github Linux CI bots, and I have

[Bug libstdc++/110900] std::string initializes SSO object subfield without making the SSO object active in the union

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110900 --- Comment #4 from danakj at orodu dot net --- The error message is the same as 110158 but to be clear the std::string is not in a union. The error message is about the union _inside_ std::string.

[Bug c++/110900] std::string initializes SSO object subfield without making the SSO object active in the union

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110900 --- Comment #1 from danakj at orodu dot net --- I am going to try work around this by not using std::string in constant expressions.. So in the meantime I pushed a branch where this bug will continue to reproduce. With gcc-13: git clone

[Bug c++/110900] New: std::string initializes SSO object subfield without making the SSO object active in the union

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110900 Bug ID: 110900 Summary: std::string initializes SSO object subfield without making the SSO object active in the union Product: gcc Version: 11.2.0 Status: UNCONFIRMED

[Bug c++/110245] constant evaluation fails with uninitialized union and default constructor

2023-06-13 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110245 --- Comment #1 from danakj at orodu dot net --- Note that GCC has no problem with doing this constexpr construction if the object is not stored as an lvalue. ``` struct Store { constexpr Store() {} union { int i; }; bool

[Bug c++/110245] New: constant evaluation fails with uninitialized union and default constructor

2023-06-13 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110245 Bug ID: 110245 Summary: constant evaluation fails with uninitialized union and default constructor Product: gcc Version: 14.0 Status: UNCONFIRMED Severity:

[Bug c++/103760] Invalid expression inside lambda inside compound requirement causes an error instead of concept satisfaction failure

2023-06-12 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103760 danakj at orodu dot net changed: What|Removed |Added CC||danakj at orodu dot net ---

[Bug c++/99599] [11/12/13/14 Regression] Concepts requirement falsely reporting cyclic dependency, breaks tag_invoke pattern

2023-06-07 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99599 --- Comment #16 from danakj at orodu dot net --- Well for anyone who hits the same issue, it appears that GCC _does_ follow Clang and MSVC in not considering the overload and chasing through the concept resolution if the non-concept types are

[Bug c++/99599] [11/12/13/14 Regression] Concepts requirement falsely reporting cyclic dependency, breaks tag_invoke pattern

2023-06-07 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99599 --- Comment #15 from danakj at orodu dot net --- The workaround listed in Comment #6 does not work for templated types, unfortunately, making Clang and MSVC more expressive here than GCC. https://godbolt.org/z/obhsqhrbx ``` #include #include

[Bug c++/110160] g++ rejects concept as cyclical with non-matching function signature

2023-06-07 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110160 danakj at orodu dot net changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug c++/99599] [11/12/13/14 Regression] Concepts requirement falsely reporting cyclic dependency, breaks tag_invoke pattern

2023-06-07 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99599 danakj at orodu dot net changed: What|Removed |Added CC||danakj at orodu dot net ---

[Bug c++/110160] g++ rejects concept as cyclical with non-matching function signature

2023-06-07 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110160 --- Comment #2 from danakj at orodu dot net --- Ugh, yeah, I guess it is. It means you can't redirect through a template function that uses concepts with G++.

[Bug c++/110160] New: g++ rejects concept as cyclical with non-matching function signature

2023-06-07 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110160 Bug ID: 110160 Summary: g++ rejects concept as cyclical with non-matching function signature Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal

[Bug c++/108897] Comparing pointer to field in rvalue class is not considered constant expression

2023-02-22 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108897 --- Comment #2 from danakj at orodu dot net --- Thank you for the workaround!

[Bug c++/108897] New: Comparing pointer to field in rvalue class is not considered constant expression

2023-02-22 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108897 Bug ID: 108897 Summary: Comparing pointer to field in rvalue class is not considered constant expression Product: gcc Version: 13.0 Status: UNCONFIRMED

[Bug c++/108775] Move construction clobbers data through [[no_unique_address]]

2023-02-13 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108775 --- Comment #1 from danakj at orodu dot net --- This occurs on 12.2.0 Linux, as well as GCC trunk on Godbolt in C++20 mode.

[Bug c++/108775] New: Move construction clobbers data through [[no_unique_address]]

2023-02-13 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108775 Bug ID: 108775 Summary: Move construction clobbers data through [[no_unique_address]] Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal

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

2022-12-19 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108169 --- Comment #1 from danakj at orodu dot net --- Sorry I inverted my logic. In Clang and MSVC an `auto` class-type template parameter is not const. In GCC it is.

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

2022-12-19 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108169 Bug ID: 108169 Summary: class type template parameters are non-const in GCC (differs from other compilers) Product: gcc Version: 13.0 Status: UNCONFIRMED

[Bug c++/108067] Miscompilation with friend function with parameter pack: mismatched argument pack lengths

2022-12-11 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108067 --- Comment #1 from danakj at orodu dot net --- Notably, this occurs with friend operator== or operator<=>.

[Bug c++/108067] New: Miscompilation with friend function with parameter pack: mismatched argument pack lengths

2022-12-11 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108067 Bug ID: 108067 Summary: Miscompilation with friend function with parameter pack: mismatched argument pack lengths Product: gcc Version: 12.2.1 Status: UNCONFIRMED

[Bug c++/108066] ICE in use_pack_expansion_extra_args_p, at cp/pt.cc:12661

2022-12-11 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108066 danakj at orodu dot net changed: What|Removed |Added Version|12.2.0 |13.0 --- Comment #1 from

[Bug c++/108066] New: ICE in use_pack_expansion_extra_args_p, at cp/pt.cc:12661

2022-12-11 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108066 Bug ID: 108066 Summary: ICE in use_pack_expansion_extra_args_p, at cp/pt.cc:12661 Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal

[Bug c++/107544] Friended struct with concept gives different output in clang/gcc/MSVC

2022-11-06 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107544 --- Comment #4 from danakj at orodu dot net --- It looks related but I am not sure it is a duplicate. In this case, the concept is being used from a non-friend context first and still accessing the private data. In that bug, they demonstrate

[Bug c++/107544] Friended struct with concept gives different output in clang/gcc/MSVC

2022-11-06 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107544 --- Comment #1 from danakj at orodu dot net --- Clang report: https://github.com/llvm/llvm-project/issues/58833

[Bug c++/107544] New: Friended struct with concept gives different output in clang/gcc/MSVC

2022-11-06 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107544 Bug ID: 107544 Summary: Friended struct with concept gives different output in clang/gcc/MSVC Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity:

[Bug c++/107542] ICE in spaceship_comp_cat, at cp/method.cc:1055

2022-11-06 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107542 --- Comment #3 from danakj at orodu dot net --- > Note please next time also attach the testcase (or put it inline) and not > just link against godbolt. Will do, thanks for attaching it for me.

[Bug c++/107542] ICE in spaceship_comp_cat, at cp/method.cc:1055

2022-11-06 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107542 --- Comment #2 from danakj at orodu dot net --- The same thing works okay with operator== instead of operator<=> https://godbolt.org/z/qnPx3bYT4 ``` #include #include template concept Ord = requires(const Lhs& lhs, const Rhs& rhs) { {

[Bug c++/107542] New: ICE in spaceship_comp_cat, at cp/method.cc:1055

2022-11-06 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107542 Bug ID: 107542 Summary: ICE in spaceship_comp_cat, at cp/method.cc:1055 Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal Priority: P3