OSDN Git Service

PR testsuite/24841
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 20050309-1.c
1 /* This caused an ICE on s390 due to incorrect secondary
2    output reloads.  */
3
4 /* { dg-do compile } */
5 /* { dg-options "-O2 -fprofile-generate" } */
6
7 char *
8 test(char *ret, int *counter, void *schema,
9      const char* name, const char *namespace,
10      void *node, int topLevel)
11 {
12   char buf[30];
13   int val;
14
15   if (counter == 0) return 0;
16   if (schema == 0) return 0;
17   if (name == 0) return 0;
18
19   __builtin_memset (ret, 0, 100);
20   lookup (schema, name, -1);
21   val = hash (schema, name, namespace, name, ret);
22   if (val == 0) return ret;
23
24   if (topLevel != 0)
25     {
26       error (1, 0, 0, node, "%s", name);
27       return 0;
28     }
29
30   __snprintf_chk (buf, 29, 1, 30, "#eCont %d", ++*counter);
31   val = hash (schema, name, buf, namespace, ret);
32   if (val == 0) return ret;
33
34   error (1, 0, 0, node, "%s", name);
35   return 0;
36 }
37
38 /* { dg-final { cleanup-coverage-files } } */