1 // PR c++/65327
2 // { dg-do compile { target c++11 } }
3 // DR1688 says that constexpr can be used together with volatile.
4 
5 constexpr volatile int i = 10;
6 
7 void
foo()8 foo ()
9 {
10   constexpr volatile int j = 5;
11   static constexpr volatile int k = 5;
12 }
13 
14 constexpr volatile int // { dg-warning "deprecated" "" { target c++2a } }
bar()15 bar ()
16 {
17   return i;
18 } // { dg-error "lvalue-to-rvalue conversion of a volatile lvalue" }
19