1 // PR c++/99318
2 // { dg-do compile { target c++11 } }
3 
4 template <typename T>
5 struct S {
m_fnS6     [[deprecated("foo")]] unsigned m_fn (char const chr)
7     {
8         using index_t = unsigned;
9         return T::arr[static_cast<index_t>(chr)]; // { dg-bogus "deprecated" }
10     }
11 };
12 
13 extern unsigned int arr[];
14 
15 struct R {
m_fnR16     [[deprecated("foo")]] unsigned m_fn (char const chr)
17     {
18         using index_t = unsigned;
19         return arr[static_cast<index_t>(chr)]; // { dg-bogus "deprecated" }
20     }
21 };
22