aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/lto/20081222_1.c
blob: 755eb9918e9a9300229a00a5a647a171a78b9ff1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "20081222_0.h"

#define ASMNAME(cname)  ASMNAME2 (__USER_LABEL_PREFIX__, cname)
#define ASMNAME2(prefix, cname) STRING (prefix) cname
#define STRING(x)    #x

/* Actually, call "x" "INT_X", and make it hidden.  */
extern __typeof (x) x
	__asm__ (ASMNAME ("INT_x"))
	__attribute__ ((__visibility__ ("hidden")));

int x ()
{
  return 7;
}

/* Make an externally-visible symbol "X" that's an alias for INT_x.  */
extern __typeof (x) EXT_x
	__asm__ (ASMNAME ("x"))
	__attribute__ ((__alias__ ("INT_x")));