* gcc.dg/const-elim-1.c: Remove xfail for xtensa-*-*.
[official-gcc.git] / gcc / testsuite / gcc.dg / 20020201-1.c
blob6002c59819fb7b17edfc94f71f66bc1a329a4e14
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 extern void abort (void);
11 extern void exit (int);
13 int rand (void);
14 void srand (unsigned int seed);
16 int globvar;
18 void
19 leave (int i)
21 if (i != 0)
22 abort ();
23 exit (0);
26 void
27 doit ()
29 srand (12);
30 globvar = rand ();
31 if (rand () > 0)
32 globvar = 0;
33 leave (globvar);
36 int
37 main ()
39 doit ();
42 /* { dg-final { cleanup-coverage-files } } */