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

            Bug ID: 116484
           Summary: Allow constexpr expression in riscv_rvv_vector_bits
                    attribute
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sergesanspaille at free dot fr
  Target Milestone: ---

The following code:

```
#include <riscv_vector.h>
constexpr unsigned size = 1024;
using type = vint8m8_t __attribute__((riscv_rvv_vector_bits(size)));
```

compiles fine with clang but fails with gcc (see
https://godbolt.org/z/jvn6E4oPe), as gcc expect an integer constant as
riscv_rvv_vector_bits parameter. It would be nice to have gcc support this too.

Reply via email to