RTEMS: Add Cortex-M33 multilib
[gcc.git] / gcc / testsuite / g++.dg / uninit-pr105646.C
blob48ceb986ec66557a79a118d1e964925bbd5d7fd8
1 // { dg-do compile }
2 // { dg-require-effective-target c++11 }
3 // { dg-options "-O2 -Wuninitialized" }
5 int f1();
6 int f2(){
7     bool v2{v2}; // { dg-warning "is used uninitialized" }
8     auto const & a = f1();
9     return a;
11 int f3(){
12     auto const & a = f1();
13     // Diagnose the following when optimizing and as unconditional
14     // uninitialized use despite f1 possibly throwing
15     bool v3{v3}; // { dg-warning "is used uninitialized" }
16     return a;