https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61800
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.10.0 --- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- markus@x4 http % cat TunnelUtils.ii #pragma GCC visibility push(hidden) #pragma GCC visibility push(default) typedef unsigned int uint32_t; #pragma GCC visibility pop typedef enum class tag_nsresult : uint32_t { NS_OK = 0, } nsresult; typedef int nsIID; class A { public: virtual nsresult operator()(const nsIID &, void **) const = 0; }; template <class T> class B { public: typedef T element_type; B (const A &p1) { uint32_t __trans_tmp_1; void *newRawPtr; __trans_tmp_1 = NS_FAILED_impl (p1 ((T::template D<T, void>::kIID), &newRawPtr)); } }; class F : public A { virtual nsresult operator()(const nsIID &p1, void **) const; }; class G { public: template <typename T, typename U> struct D; }; template <typename T> struct G::D<G, T> { static const nsIID kIID __attribute__ ((visibility ("hidden"))); }; class H : public G { virtual nsresult CloseWithStatus (nsresult p1); }; inline uint32_t NS_FAILED_impl (nsresult p1) {} inline const F do_QueryReferent (G *p1, nsresult *p2 = 0) {} nsresult H::CloseWithStatus (nsresult p1) { B<G> baseTrans (do_QueryReferent (0)); return CloseWithStatus (nsresult::NS_OK); } markus@x4 http % /var/tmp/gcc_test/usr/local/bin/c++ -c -O3 -std=c++11 TunnelUtils.ii TunnelUtils.ii:53:1: internal compiler error: Segmentation fault } ^ 0xb87bff crash_signal ../../gcc/gcc/toplev.c:337 0x9f4e46 tree_check ../../gcc/gcc/tree.h:2730 0x9f4e46 decl_maybe_in_construction_p(tree_node*, tree_node*, gimple_statement_base*, tree_node*) ../../gcc/gcc/ipa-devirt.c:1974 0x9f5dd1 get_polymorphic_call_info(tree_node*, tree_node*, tree_node**, long*, ipa_polymorphic_call_context*, gimple_statement_base*) ../../gcc/gcc/ipa-devirt.c:2176 0x845414 cgraph_create_indirect_edge(cgraph_node*, gimple_statement_base*, int, long, int) ../../gcc/gcc/cgraph.c:970 0x84e1c1 cgraph_clone_edge(cgraph_edge*, cgraph_node*, gimple_statement_base*, unsigned int, long, int, bool) ../../gcc/gcc/cgraphclones.c:139 0x84ed8e cgraph_clone_node(cgraph_node*, tree_node*, long, int, bool, vec<cgraph_edge*, va_heap, vl_ptr>, bool, cgraph_node*, bitmap_head*) ../../gcc/gcc/cgraphclones.c:473 0x10a97a2 recursive_inlining ../../gcc/gcc/ipa-inline.c:1388 0x10a97a2 inline_small_functions ../../gcc/gcc/ipa-inline.c:1768 0x10a97a2 ipa_inline ../../gcc/gcc/ipa-inline.c:2185 0x10a97a2 execute ../../gcc/gcc/ipa-inline.c:2545 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions.