https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112642
Bug ID: 112642
Summary: ranges::fold_left tries to access inactive union
member of string in constant expression
Product: gcc
Version: 13.2.1
Status: UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112642
--- Comment #3 from Miro Palmu ---
Further reduced:
#include
using namespace std::literals;
consteval void bar() {
auto _ = [](auto s) { return s; }(""s);
}
int main() {
bar();
return 0;
}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112642
--- Comment #5 from Miro Palmu ---
I have been trying to figure out where exactly the bug is and these are my
findings.
> Or:
>
> #include
>
> consteval void bar() {
> auto _ = [](std::string s) { return s; }({});
> }
>
> int main() {
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112642
--- Comment #7 from Miro Palmu ---
(In reply to Jonathan Wakely from comment #6)
> The examples in comment 4 do compile using libstdc++ on clang, if you use
> libstdc++ headers from after sept 29 (for trunk) or oct 21 (for gcc-13).
I was testin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112642
--- Comment #9 from Miro Palmu ---
(In reply to Jonathan Wakely from comment #8)
> > Also tried it locally with clang 16.0.6 with
> > gcc-13.2.1 libstdc++
>
> Which gcc-13.2.1 though? That's a snapshot that could date from any time in
> the pas
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113021
Bug ID: 113021
Summary: [constexpr] gcc rejects initializing struct containing
vector during constant evaluation depending if the
struct also contains other member
Product:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113021
--- Comment #2 from Miro Palmu ---
(In reply to Andrew Pinski from comment #1)
> Confirmed. We should reduce this to remove the include file too ...
Here is somewhat reduced:
```
#include
auto alloc = std::allocator{};
constexpr auto n = 3;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113021
--- Comment #3 from Miro Palmu ---
Here is even more reduced. Notice that if the unused data member `pointer` is
removed from `vec` the problem goes away. Same with data member `a` in struct
`A`.
```
struct vec {
int data;
int* pointer;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113407
Bug ID: 113407
Summary: internal_error with const char* as non-type template
parameter with index parameter pack in fold expression
Product: gcc
Version: 14.0
Status: UN
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109642
Miro Palmu changed:
What|Removed |Added
CC||miro.palmu at helsinki dot fi
--- Comment
10 matches
Mail list logo