(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
attr-may-alias-2.c
       1  /* We used to reject this because types differentiating only in
       2     TYPE_REF_CAN_ALIAS_ALL were deemed incompatible.  */
       3  /* { dg-do compile } */
       4  
       5  struct sockaddr;
       6  struct sockaddr *f (void);
       7  
       8  struct __attribute__((may_alias)) sockaddr { int j; };
       9  struct sockaddr *
      10  f (void)
      11  {
      12    return
      13  #ifndef __cplusplus
      14      (void *)
      15  #endif
      16      0;
      17  }