gcc/testsuite/g++.dg/warn/pr86881.C
raw| 1 | // PR c++/86881 ICE with shadow warning |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | // { dg-additional-options { -Wshadow-compatible-local } }} |
| 4 | |
| 5 | void a() { |
| 6 | auto b([] {}); |
| 7 | { |
| 8 | auto b = 0; |
| 9 | } |
| 10 | } |
| 11 | |
| 12 | struct Proxy { }; |
| 13 | |
| 14 | void Two () |
| 15 | { |
| 16 | auto my = Proxy (); |
| 17 | { |
| 18 | auto my = Proxy (); // { dg-warning "shadows" "" { xfail *-*-* } } |
| 19 | }; |
| 20 | } |