aix: Redesign section encoding and selection
[official-gcc.git] / gcc / testsuite / gcc.dg / alias-7.c
blobe0c24bd63a279a384a0330000b80552a7f67053c
1 /* { dg-do run } */
2 /* { dg-require-alias "" } */
3 /* { dg-options "-O2" } */
4 /* { dg-skip-if "weak alias" { powerpc-ibm-aix* } } */
6 extern void abort (void);
8 #define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
9 #define ASMNAME2(prefix, cname) STRING (prefix) cname
10 #define STRING(x) #x
12 int foo __asm__ (ASMNAME ("foo")) __attribute__((nocommon));
13 extern __typeof (foo) bar __attribute__ ((weak, alias ("foo")));
15 int
16 main (void)
18 if (&foo != &bar || foo || bar)
19 abort ();
20 return bar;