xref: /illumos-gate/usr/src/test/elf-tests/tests/tls/amd64/ie/orig/style1-main.c (revision 4db555a5389470c6f15aa8b50a38ca5d533d0641)
1*4db555a5SRichard Lowe /*
2*4db555a5SRichard Lowe  * This file and its contents are supplied under the terms of the
3*4db555a5SRichard Lowe  * Common Development and Distribution License ("CDDL"), version 1.0.
4*4db555a5SRichard Lowe  * You may only use this file in accordance with the terms of version
5*4db555a5SRichard Lowe  * 1.0 of the CDDL.
6*4db555a5SRichard Lowe  *
7*4db555a5SRichard Lowe  * A full copy of the text of the CDDL should have accompanied this
8*4db555a5SRichard Lowe  * source.  A copy of the CDDL is also available via the Internet at
9*4db555a5SRichard Lowe  * http://www.illumos.org/license/CDDL.
10*4db555a5SRichard Lowe  */
11*4db555a5SRichard Lowe 
12*4db555a5SRichard Lowe /*
13*4db555a5SRichard Lowe  * Copyright 2012, Richard Lowe.
14*4db555a5SRichard Lowe  */
15*4db555a5SRichard Lowe 
16*4db555a5SRichard Lowe #include <stdio.h>
17*4db555a5SRichard Lowe 
18*4db555a5SRichard Lowe extern void func();
19*4db555a5SRichard Lowe 
20*4db555a5SRichard Lowe __thread char *foo = "foo";
21*4db555a5SRichard Lowe __thread char *bar = "bar";
22*4db555a5SRichard Lowe 
23*4db555a5SRichard Lowe int
main(void)24*4db555a5SRichard Lowe main(void)
25*4db555a5SRichard Lowe {
26*4db555a5SRichard Lowe 	printf("foo: %p bar: %p\n", &foo, &bar);
27*4db555a5SRichard Lowe 	func();
28*4db555a5SRichard Lowe 	return (0);
29*4db555a5SRichard Lowe }
30