blob: ef553bdf2ce1a76a7a4c9e45f977e5d133297f60 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
/* { dg-do compile } */
/* { dg-options "-O2 -Wdangling-pointer" } */
struct S {
int x;
};
void g (int **p)
{
struct S s = {};
*p = &s.x; /* { dg-warning "address of local variable" } */
}
|