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); 7 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 15 16 17 void add(int i)18add(int i) 19 { 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; 27 } 28 void sub(int i)29sub(int i) 30 { 31 a -= i; 32 } 33 __attribute__ ((externally_visible)) 34 void (*p[2])(int)={add, sub}; 35 #else main()36main() 37 { 38 return 0; 39 } 40 #endif 41