annotate gcc/testsuite/gcc.dg/attr-alias-2.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR 19031 */
kono
parents:
diff changeset
2 /* { dg-do link } */
kono
parents:
diff changeset
3 /* { dg-require-alias "" } */
kono
parents:
diff changeset
4 /* { dg-options "-funit-at-a-time" } */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 static int f1 (void) { return 0; }
kono
parents:
diff changeset
7 extern int g1 (void) __attribute__((__alias__("f1")));
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 #define STR(x) STR1(__USER_LABEL_PREFIX__, x)
kono
parents:
diff changeset
10 #define STR1(x,y) STR2(x, y)
kono
parents:
diff changeset
11 #define STR2(x,y) #x #y
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 static int f2 (void) __asm__(STR(a2));
kono
parents:
diff changeset
14 static int f2 (void) { return 0; }
kono
parents:
diff changeset
15 extern int g2 (void) __attribute__((__alias__("a2")));
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 int main ()
kono
parents:
diff changeset
18 {
kono
parents:
diff changeset
19 return g1() + g2();
kono
parents:
diff changeset
20 }