1 // { dg-do assemble  }
2 // { dg-options "-Wno-return-local-addr" }
3 
bad1()4 int& bad1()
5 {
6   int x = 0;
7   return x;
8 }
9 
bad2()10 int* bad2()
11 {
12   int x = 0;
13   return &x;
14 }
15 
16 int f();
17 
bad3()18 const int& bad3()
19 {
20   return f();
21 }
22 
bad4()23 const int& bad4()
24 {
25   return int();
26 }
27