annotate gcc/testsuite/c-c++-common/attr-may-alias-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* We used to reject this because types differentiating only in
kono
parents:
diff changeset
2 TYPE_REF_CAN_ALIAS_ALL were deemed incompatible. */
kono
parents:
diff changeset
3 /* { dg-do compile } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 struct sockaddr;
kono
parents:
diff changeset
6 struct sockaddr *f (void);
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 struct __attribute__((may_alias)) sockaddr { int j; };
kono
parents:
diff changeset
9 struct sockaddr *
kono
parents:
diff changeset
10 f (void)
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 return
kono
parents:
diff changeset
13 #ifndef __cplusplus
kono
parents:
diff changeset
14 (void *)
kono
parents:
diff changeset
15 #endif
kono
parents:
diff changeset
16 0;
kono
parents:
diff changeset
17 }