Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: coillol at yandex dot ru
Target Milestone: ---
g++ miscompiles the following code starting from version 12.1 (-std=c++20, any
optimization mode).
```
#include
struct X {
short x0 : 7;
short x1 : 8;
X
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: coillol at yandex dot ru
Target Milestone: ---
Minimized example:
---
struct B { int x = 1; };
struct D1 : B {};
struct Data {
int val = 666;
};
struct D2 : Data, B
Assignee: unassigned at gcc dot gnu.org
Reporter: coillol at yandex dot ru
Target Milestone: ---
The following text triggers ICE in gcc (at least on 9.2.0 and trunk --
https://godbolt.org/z/WHnZCJ):
int foo();
int main() {
using X = int[foo()];
struct S { S() { X x
Assignee: unassigned at gcc dot gnu.org
Reporter: coillol at yandex dot ru
Target Milestone: ---
Piece of program that causes the problem:
#include
#include
using ValType = std::complex;
void getValue(std::vector &V) {
static auto Fn = [](ValType Pt) ->