1 // PR c++/90953 - ICE with -Wmissing-format-attribute.
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wmissing-format-attribute" }
4 
5 namespace std {
6 union [[gnu::may_alias]] _Any_data{};
7 enum _Manager_operation { __get_type_info };
8 template <typename> class A;
9 class B {
10   typedef bool (*_Manager_type)(_Any_data, const _Any_data &,
11                                 _Manager_operation);
12 public:
13   _Any_data _M_functor;
14   _Manager_type _M_manager;
15 };
16 
17 struct type_info { } t;
18 
19 template <typename _Res, typename... _ArgTypes>
20 class A<_Res(_ArgTypes...)> : B {
21   const type_info &target_type() const noexcept;
22 };
23 template <typename _Res, typename... _ArgTypes>
target_type()24 const type_info &A<_Res(_ArgTypes...)>::target_type() const noexcept {
25   _Any_data __typeinfo_result;
26   _M_manager(__typeinfo_result, _M_functor, __get_type_info);
27   return t;
28 }
29 } // namespace std
30