Sign in
gnu
/
gcc
/
d769c5040874bf9546f2524f3f1d2a894165f92a
/
.
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wunused-var-20.C
blob: 792c25369c740b765d5ef9b0f95df6c239b534b6 [
file
] [
log
] [
blame
]
// PR c++/38958
// { dg-options "-Wunused" }
volatile
int
g
;
struct
Lock
{
~
Lock
()
{
g
=
0
;
}
};
Lock
AcquireLock
()
{
return
Lock
();
}
int
main
()
{
const
Lock
&
lock
=
AcquireLock
();
g
=
1
;
g
=
2
;
g
=
3
;
}