1c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hinesvoid call();
2c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines
3c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hinesstruct S {
4c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines  static void foo() { call(); call(); }
5c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines  static void bar() { call(); call(); }
6c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines  static void baz() {}
7c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines};
8c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines
9c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines#ifdef FILE1
10c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines# define FUNC_NAME func1
11c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines# define FUNC_BODY \
12c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines    S::foo(); S::bar(); S::baz();
13c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines#else
14c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines# define FUNC_NAME func2
15c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines# define FUNC_BODY \
16c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines    S::bar();
17c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines#endif
18c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines
19c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hinesvoid FUNC_NAME() {
20c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines  FUNC_BODY
21c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines}
22c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines
23c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines// Build instructions:
24c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines// $ clang -g -fPIC -c -DFILE1 arange-overlap.cc -o obj1.o
25c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines// $ clang -g -fPIC -c arange-overlap.cc -o obj2.o
26c6a4f5e819217e1e12c458aed8e7b122e23a3a58Stephen Hines// $ clang -shared obj1.o obj2.o -o <output>
27