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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
           Keywords|                            |ice-checking,
                   |                            |ice-on-valid-code
            Summary|ICE: in                     |[14/15 Regression] ICE: in
                   |sizeof_pointer_memaccess_wa |sizeof_pointer_memaccess_wa
                   |rning, at                   |rning, at
                   |c-family/c-warn.cc:987 with |c-family/c-warn.cc:987 with
                   |-Wsizeof-pointer-memaccess  |-Wsizeof-pointer-memaccess
   Last reconfirmed|                            |2024-10-19
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |14.3

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed here is a slightly better/portable testcase:
```
typedef int intv1 __attribute__((vector_size(sizeof(int))));

void f(intv1 *a, char *b) {
  __builtin_memcpy(b, a, sizeof(a));
}
```

Started with r14-2150-gfe48f2651334bc which adds the check for vector types for
TYPE_PRECISION BUT the bug was there before really just not showing up before.

Maybe there should be a check that type is an integral type before checking the
precision here will fix it too.
          else if ((TYPE_PRECISION (TREE_TYPE (type))
                    == TYPE_PRECISION (char_type_node))
                   || strop)

Reply via email to