1 /* { dg-do run } */ 2 /* { dg-require-alias "" } */ 3 /* { dg-options "-O2" } */ 4 5 extern void abort (void); 6 7 #define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname) 8 #define ASMNAME2(prefix, cname) STRING (prefix) cname 9 #define STRING(x) #x 10 11 int foo __asm__ (ASMNAME ("foo")) __attribute__((nocommon)); 12 extern __typeof (foo) bar __attribute__ ((weak, alias ("foo"))); 13 14 int main(void)15main (void) 16 { 17 if (&foo != &bar || foo || bar) 18 abort (); 19 return bar; 20 } 21