+++ /dev/null
-int test1(int a) __attribute__((noreturn));
-int test2(int a) __attribute__((const));
-/* empty args are allowed */
-int test3(int a) __attribute__((weak()));
-int test4(int a) __attribute__((unknown_error("bla", 3)));
-int test5(int a) __attribute__((alias("test2")));
-int test6(int a) __attribute__((section("extra")));
-int test7(int a, const char *fmt, ...) __attribute__((format(printf,2,3)));
-
-struct X {
- char y;
- int x __attribute__((aligned(4+4)));
-};
-
-int test2(int a) {
- return a;
-}
-
-int main(void) {
- return test5(0);
-}
int a;
int b;
};
-int glob = (int) &((struct foo*)0)->b;
+struct foo bar = { (int) &((struct foo*)0)->b, 0 };
int main(void) {
return 0;
--- /dev/null
+int test1(int a) __attribute__((noreturn));
+int test2(int a) __attribute__((const));
+/* empty args are allowed */
+int test3(int a) __attribute__((weak()));
+int test4(int a) __attribute__((unknown_error("bla", 3)));
+int test5(int a) __attribute__((alias("test2")));
+int test6(int a) __attribute__((section("extra")));
+int test7(int a, const char *fmt, ...) __attribute__((format(printf,2,3)));
+
+struct X {
+ char y;
+ int x __attribute__((aligned(4+4)));
+};
+
+int test2(int a) {
+ return a;
+}
+
+int main(void) {
+ return test5(0);
+}
--- /dev/null
+__attribute__((noreturn)) void d0(void), __attribute__((format(printf,1,2))) d1(const char*, ...), d2(void);
+
+int main(void) {
+ return 0;
+}
--- /dev/null
+struct sockaddr {
+ int bla;
+};
+
+struct sockaddr_at {
+ int blo, blup;
+};
+
+typedef union bla {
+ struct sockaddr *__restrict__ sockaddr_ptr;
+ struct sockaddr_at *__restrict__ sockaddr_at_ptr;
+} sockaddr_arg __attribute__((__transparent_union__));
+
+void *t_recvfrom(sockaddr_arg arg) {
+ return arg.sockaddr_at_ptr;
+}
+
+int main(void) {
+ struct sockaddr_at at;
+ int r = (t_recvfrom(&at) != &at);
+ return r;
+}
--- /dev/null
+struct sockaddr {
+ int bla;
+};
+
+struct sockaddr_at {
+ int blo, blup;
+};
+
+typedef union bla {
+ struct sockaddr *__restrict__ sockaddr_ptr;
+ struct sockaddr_at *__restrict__ sockaddr_at_ptr;
+} sockaddr_arg __attribute__((__transparent_union__));
+
+void *t_recvfrom(sockaddr_arg arg) {
+ return arg.sockaddr_at_ptr;
+}
+
+int main(void) {
+ struct sockaddr at;
+ union bla bla = { &at };
+ int r = (t_recvfrom(bla) != &at);
+ return r;
+}