public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/63226] ICE with -flto-odr-type-merging Date: Fri, 12 Sep 2014 14:55:00 -0000 [thread overview] Message-ID: <bug-63226-4-5P4potpSNL@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-63226-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63226 --- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> --- Created attachment 33478 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33478&action=edit Second test file pair (1/2): one37.ii namespace std { template<typename _Arg, typename _Result> struct unary_function { }; } namespace mpl_ { } namespace mpl_ { template< bool C_ > struct bool_ { }; template< typename T, T N > struct integral_c; } namespace boost { namespace mpl { using ::mpl_::integral_c; } } namespace mpl_ { template< typename T, T N > struct integral_c { static const T value = N; }; } namespace boost{ template <class T, T val> struct integral_constant : public mpl::integral_c<T, val> { }; namespace detail { template <typename T> struct cv_traits_imp { typedef T unqualified_type; }; }; template< typename T > struct is_void : ::boost::integral_constant<bool,false> { }; template< typename T > struct is_integral : ::boost::integral_constant<bool,false> { }; namespace type_traits { template <typename T> struct is_mem_fun_pointer_impl { static const bool value = false; }; } template< typename T > struct remove_cv { typedef typename boost::detail::cv_traits_imp<T*>::unqualified_type type; }; template< typename T > struct is_member_function_pointer : ::boost::integral_constant<bool,::boost::type_traits::is_mem_fun_pointer_impl<typename remove_cv<T>::type>::value> { }; template< typename T > struct is_member_pointer : ::boost::integral_constant<bool,::boost::is_member_function_pointer<T>::value> { }; namespace type_traits { template <bool b1, bool b2, bool b3 = true, bool b4 = true, bool b5 = true, bool b6 = true, bool b7 = true> struct ice_and; template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7> struct ice_and { static const bool value = false; }; template <bool b> struct ice_not { static const bool value = true; }; } namespace detail { template< typename T > struct is_pointer_helper { static const bool value = false; }; template< typename T > struct is_pointer_impl { static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper<typename remove_cv<T>::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer<T>::value >::value >::value) ; }; } template< typename T > struct is_pointer : ::boost::integral_constant<bool,::boost::detail::is_pointer_impl<T>::value> { }; namespace mpl { template< bool C , typename T1 , typename T2 > struct if_c { }; template< typename T1 , typename T2 > struct if_c<false,T1,T2> { typedef T2 type; }; } template <bool B, class T = void> struct enable_if_c { typedef T type; }; template<typename Signature> class function; namespace detail { namespace function { union function_buffer { mutable void (*func_ptr)(); }; struct function_ptr_tag { }; template<typename F> class get_function_tag { typedef typename mpl::if_c<(is_pointer<F>::value), function_ptr_tag, function_ptr_tag>::type ptr_or_obj_tag; public: typedef ptr_or_obj_tag type; }; template<typename Functor> struct functor_manager { public: static inline void manage(const function_buffer& in_buffer, function_buffer& out_buffer) { } }; struct vtable_base { void (*manager)(const function_buffer& in_buffer, function_buffer& out_buffer); }; } } class function_base { }; namespace detail { namespace function { template< typename FunctionObj, typename R , typename T0 > struct function_obj_invoker1 { static R invoke(function_buffer& function_obj_ptr , T0 a0) { } }; template< typename FunctionObj, typename R , typename T0 > struct void_function_obj_invoker1 { }; template< typename FunctionObj, typename R , typename T0 > struct get_function_obj_invoker1 { typedef typename mpl::if_c<(is_void<R>::value), void_function_obj_invoker1< FunctionObj, R , T0 >, function_obj_invoker1< FunctionObj, R , T0 > >::type type; }; template<typename Tag> struct get_invoker1 { template<typename FunctionObj, typename R , typename T0> struct apply { typedef typename get_function_obj_invoker1< FunctionObj, R , T0 >::type invoker_type; typedef functor_manager<FunctionObj> manager_type; }; }; template<typename R , typename T0> struct basic_vtable1 { typedef R result_type; typedef result_type (*invoker_type)(function_buffer& , T0); vtable_base base; invoker_type invoker; }; } } template< typename R , typename T0 > class function1 : public function_base { typedef boost::detail::function::basic_vtable1< R , T0> vtable_type; public: template<typename Functor> function1(Functor f ,typename enable_if_c< (boost::type_traits::ice_not< (is_integral<Functor>::value)>::value), int>::type = 0 ) : function_base() { typedef typename detail::function::get_function_tag<Functor>::type tag; typedef detail::function::get_invoker1<tag> get_invoker; typedef typename get_invoker:: template apply<Functor, R , T0> handler_type; typedef typename handler_type::invoker_type invoker_type; typedef typename handler_type::manager_type manager_type; static vtable_type stored_vtable = { { &manager_type::manage } , &invoker_type::invoke }; } }; template<typename R , typename T0> class function<R ( T0)> : public function1<R , T0> { typedef function1<R , T0> base_type; public: template<typename Functor> function(Functor f ,typename enable_if_c< (boost::type_traits::ice_not< (is_integral<Functor>::value)>::value), int>::type = 0 ) : base_type(f) { } }; } typedef boost::function<void (const char*)> WarningHandler; class ParserImpl; class MyParser { ParserImpl* impl; public: MyParser (); }; class ParserImpl { public: ParserImpl (WarningHandler warner); }; static void DisplayWarning (const char* msg) { } MyParser::MyParser () { impl = new ParserImpl(DisplayWarning); }
next prev parent reply other threads:[~2014-09-12 14:55 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-09-11 13:48 [Bug lto/63226] New: " burnus at gcc dot gnu.org 2014-09-11 19:01 ` [Bug lto/63226] " hubicka at gcc dot gnu.org 2014-09-11 20:13 ` hubicka at gcc dot gnu.org 2014-09-12 0:18 ` hubicka at ucw dot cz 2014-09-12 14:55 ` burnus at gcc dot gnu.org [this message] 2014-09-12 14:55 ` burnus at gcc dot gnu.org 2014-09-12 15:02 ` burnus at gcc dot gnu.org 2014-09-15 15:03 ` [Bug lto/63226] [5 Regression] " trippels at gcc dot gnu.org 2014-09-19 21:40 ` hubicka at gcc dot gnu.org 2014-09-22 11:58 ` trippels at gcc dot gnu.org 2014-09-24 21:39 ` burnus at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-63226-4-5P4potpSNL@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).