Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / 20020201-1.c
blob1cb2a878804415e8051bd1d7e855b8edba8e4523
1 /* Check that arc profiling instrumentation code does not cause problems for
2 a program that calls functions that are likely to be in a shared library.
3 This was added to check the fix for PR target/5469, which prevents arc
4 profiling code from being inserted between a call and the restore of the
5 call-clobbered global pointer. */
7 /* { dg-options "-fprofile-arcs" } */
8 /* { dg-do run { target native } } */
10 #include <stdlib.h>
12 int globvar;
14 void
15 leave (int i)
17 if (i != 0)
18 abort ();
19 exit (0);
22 void
23 doit ()
25 srand (12);
26 globvar = rand ();
27 if (rand () > 0)
28 globvar = 0;
29 leave (globvar);
32 int
33 main ()
35 doit ();
38 /* { dg-final { cleanup-coverage-files } } */