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