https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121481

            Bug ID: 121481
           Summary: ICE in layout_type/stor-layout with array of svbool_t
                    on SVE-256 at O2
           Product: gcc
           Version: 15.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sadiinso at icloud dot com
  Target Milestone: ---

Hi,

The following code:
```
using b = __SVBool_t __attribute__((arm_sve_vector_bits(256)));

struct c {
  b d[2];
};

struct h {
  c e;
};

c f(auto) {}

void g(h i) {
  c a = i.e;
  f(a);
}
```

Causes the following ICE when using AARCH64 GCC 15:
```
<source>: In function 'c f(auto:1)':
<source>:11:12: warning: no return statement in function returning non-void
[-Wreturn-type]
   11 | c f(auto) {}
      |            ^
during RTL pass: jump
<source>: In function 'void g(h)':
<source>:16:1: internal compiler error: in layout_type, at stor-layout.cc:2614
   16 | }
      | ^
```
when using the following compiler options :
```
-std=c++20 -O2 -march=armv9-A -msve-vector-bits=256
```

The ICE doesn't happen on O1 or O0 optimization level, or when setting the SVE
vector bit length to lower than 256.

Reply via email to