| 1 |
/* PR c/60139 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-Wpedantic -std=gnu89" } */ |
| 4 |
/* { dg-prune-output ".*near initialization for.*" } */ |
| 5 |
|
| 6 |
double sin (double); |
| 7 |
void |
| 8 |
fn (int *p) |
| 9 |
{ |
| 10 |
int **a[] = { &p, /* { dg-warning "17:initializer element is not computable at load time" } */ |
| 11 |
(void *) 0, &p }; /* { dg-warning "28:initializer element is not computable at load time" } */ |
| 12 |
double d[] = { sin (1.0), /* { dg-warning "18:initializer element is not a constant expression" } */ |
| 13 |
8.8, sin (1.0), 2.6 }; /* { dg-warning "23:initializer element is not a constant expression" } */ |
| 14 |
} |