blob: 662e0d1182e6ccb597975e52e8535ab2e06c3f16 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O2 -Wtrivial-auto-var-init -ftrivial-auto-var-init=pattern" } */
int g(int *, int *);
int f()
{
switch (0) {
int x; /* { dg-warning "cannot be initialized with" } */
int y; /* { dg-warning "cannot be initialized with" } */
default:
return g(&x, &y);
}
}
int g1(int, int);
int f1()
{
switch (0) {
int x; /* { dg-warning "cannot be initialized with" } */
int y; /* { dg-warning "cannot be initialized with" } */
default:
return g1(x, y);
}
}
struct S
{
char a;
int b;
};
int g2(int);
int f2(int input)
{
switch (0) {
struct S x; /* { dg-warning "cannot be initialized with" } */
struct S y; /* { dg-warning "cannot be initialized with" } */
default:
return g2(input) + x.b + y.b;
}
}