public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "fang at csl dot cornell dot edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/45293] ICE in iterative_hash_template_arg, at cp/pt.c:1589 Date: Wed, 18 Aug 2010 22:05:00 -0000 [thread overview] Message-ID: <20100818220510.28380.qmail@sourceware.org> (raw) In-Reply-To: <bug-45293-3227@http.gcc.gnu.org/bugzilla/> ------- Comment #8 from fang at csl dot cornell dot edu 2010-08-18 22:05 ------- reduced test case (manually reduced after delta): =========================================================== typedef long unsigned int size_t; template <class T> struct never_ptr { T* ptr; T* operator -> () const throw() { return ptr; } }; namespace HAC { template <class> class instance_collection_pool_bundle; template <class Tag> class footprint_base { typedef instance_collection_pool_bundle<Tag> collection_pool_bundle_type; protected: const never_ptr<collection_pool_bundle_type> collection_pool_bundle; }; struct process_tag; template <class Tag> class instance_collection; template <class> struct class_traits; template <class Tag> class instance_alias_info; } namespace std { template <class T> struct default_vector { typedef size_t type; }; } namespace HAC { class footprint : private footprint_base<process_tag> { void operator [] ( const size_t ) const; }; class physical_instance_collection; template <class, size_t> class instance_array; typedef instance_collection<process_tag> process_instance_collection; typedef instance_alias_info<process_tag> process_instance_alias_info; template <class> class general_collection_type_manager; template <> struct class_traits<process_tag> { typedef process_tag tag_type; typedef process_instance_alias_info instance_alias_info_type; typedef process_instance_collection instance_collection_generic_type; typedef physical_instance_collection instance_collection_parent_type; typedef general_collection_type_manager<tag_type> collection_type_manager_parent_type; }; class instance_collection_base { }; class physical_instance_collection : public instance_collection_base { }; template <class Tag> class collection_interface : public class_traits<Tag>::instance_collection_parent_type { }; template <class Tag> class instance_collection : public collection_interface<Tag>, public class_traits<Tag>::collection_type_manager_parent_type { public: typedef class_traits<Tag> traits_type; typedef typename traits_type::instance_alias_info_type instance_alias_info_type; typedef never_ptr<const instance_alias_info_type> const_instance_alias_info_ptr_type; }; template <class Tag> class general_collection_type_manager { }; template <class T> class instance_collection_pool_wrapper { public: typedef T collection_type; typedef typename collection_type::traits_type::tag_type tag_type; }; template <class Tag> struct instance_collection_pool_bundle : public instance_collection_pool_wrapper<instance_array<Tag, 0> > { void lookup_collection(void) const; }; template <class Tag, size_t D> class instance_array : public instance_collection<Tag> { public: typedef class_traits<Tag> traits_type; typedef typename traits_type::instance_collection_generic_type parent_type; typedef typename parent_type::const_instance_alias_info_ptr_type const_instance_alias_info_ptr_type; void get_all_aliases(typename std::default_vector<const_instance_alias_info_ptr_type>::type&) const; }; template <class Tag> class instance_array<Tag,0> : public instance_collection<Tag> { public: typedef class_traits<Tag> traits_type; typedef typename traits_type::instance_collection_generic_type parent_type; typedef typename parent_type::const_instance_alias_info_ptr_type const_instance_alias_info_ptr_type; void get_all_aliases(typename std::default_vector<const_instance_alias_info_ptr_type>::type&) const; }; void footprint::operator [] ( const size_t ) const { footprint_base<process_tag>::collection_pool_bundle->lookup_collection(); } } =========================================================== This should be a valid test case, passes g++-4.0.1. reducing script: #!/bin/sh -e # must be valid for g++-4.0.1! (powerpc-apple-darwin8) g++ -o footprint.o -c footprint.ii > /dev/null 2>&1 # then fail specifically with ICE g++-fsf-4.5 -o footprint.o -c footprint.ii > footprint.err 2>&1 || : grep -q "internal compiler error: in iterative_hash_template_arg, at cp/pt.c:1589" footprint.err keywords: ICE-on-valid-code -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45293
next prev parent reply other threads:[~2010-08-18 22:05 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-08-16 1:06 [Bug c++/45293] New: " fang at csl dot cornell dot edu 2010-08-16 1:08 ` [Bug c++/45293] " fang at csl dot cornell dot edu 2010-08-16 6:11 ` fang at csl dot cornell dot edu 2010-08-16 10:08 ` rguenth at gcc dot gnu dot org 2010-08-17 17:26 ` fang at csl dot cornell dot edu 2010-08-17 17:41 ` hjl dot tools at gmail dot com 2010-08-18 16:31 ` fang at csl dot cornell dot edu 2010-08-18 20:13 ` fang at csl dot cornell dot edu 2010-08-18 22:05 ` fang at csl dot cornell dot edu [this message] 2010-09-06 18:44 ` dodji at gcc dot gnu dot org 2010-09-06 18:50 ` dodji at gcc dot gnu dot org 2010-09-07 7:12 ` dodji at gcc dot gnu dot 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=20100818220510.28380.qmail@sourceware.org \ --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).