Adjust scan string for PIE
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-prof / crossmodule-indircall-1a.c
blob568cfa990fce074de8837f7081ddb7b5b05c7a0a
1 /* It seems there is no way to avoid the other source of mulitple
2 source testcase from being compiled independently. Just avoid
3 error. */
4 #ifdef DOJOB
5 extern int a;
6 void abort (void);
8 #ifdef _PROFILE_USE
9 __attribute__ ((externally_visible))
10 int constval=1,constval2=2;
11 #else
12 __attribute__ ((externally_visible))
13 int constval=3,constval2=2;
14 #endif
17 void
18 add(int i)
20 /* Verify that inlining happens for first case. */
21 if (i==constval && !__builtin_constant_p (i))
22 abort ();
23 /* Second case has no dominating target; it should not inline. */
24 if (i==constval2 && __builtin_constant_p (i))
25 abort ();
26 a += i;
28 void
29 sub(int i)
31 a -= i;
33 __attribute__ ((externally_visible))
34 void (*p[2])(int)={add, sub};
35 #else
36 int
37 main()
39 return 0;
41 #endif