Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / 20001117-1.c
blob1b24300da8e5b16636303ae72e00ad9184e50e0e
1 /* { dg-do run } */
2 /* { dg-options "-O2 -finstrument-functions" } */
3 /* { dg-require-effective-target return_address } */
5 extern void abort (void);
6 extern void exit (int);
8 double
9 foo (double a, double b)
11 double c;
12 if (0.0 < a)
13 c = a;
14 else if (b > 0.0)
15 c = 0.0;
16 else
17 return 0;
18 return 2.0 * (b - c);
21 int main ()
23 if (foo (1.0, 4.0) != 6.0)
24 abort ();
25 exit (0);
28 /* Abort on non-NULL CALL_SITE to ensure that __builtin_return_address
29 was expanded properly. */
30 void __attribute__((no_instrument_function))
31 __cyg_profile_func_enter(void *this_fn, void *call_site)
33 if (call_site == (void *)0)
34 abort ();
37 void __attribute__((no_instrument_function))
38 __cyg_profile_func_exit(void *this_fn, void *call_site)
40 if (call_site == (void *)0)
41 abort ();