blob: d496d205e89b54bd751bf91864f247923002d1d8 (
plain)
1
2
3
4
5
6
7
8
9
|
/* { dg-do assemble } */
/* { dg-options "-Werror=return-local-addr" } */
/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
int* bad()
{
int x = 0;
return &x; /* { dg-error "address of local variable" } */
}
|