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

            Bug ID: 97132
           Summary: assume_aligned is not constexpr
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fsb4000 at yandex dot ru
  Target Milestone: ---

failed test example: https://gcc.godbolt.org/z/KK6W8G

see your implementation:

```
return static_cast<_Tp*>(__builtin_assume_aligned(__ptr, _Align));
```

cast from void * to _Ty* is not allowed in a constant expression.

Reply via email to