From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24173 invoked by alias); 20 Jan 2014 02:20:28 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24141 invoked by uid 48); 20 Jan 2014 02:20:22 -0000 From: "nheghathivhistha at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/59882] dev-cpp/xsd: internal compiler error: Segmentation fault Date: Mon, 20 Jan 2014 02:20:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nheghathivhistha at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg02094.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59882 --- Comment #2 from David Kredba --- c-reduce at --sllooww> namespace std { template < class, class > struct pair; template < typename _Iterator > struct iterator_traits { typedef typename _Iterator::value_type value_type; }; template < typename > class allocator { public: template < typename > struct rebind { typedef allocator other; }; }; template < typename > struct less { }; template < typename > struct _Select1st; } namespace __gnu_cxx { template < typename _Alloc > struct __alloc_traits { template < typename _Tp > struct rebind { typedef typename _Alloc::template rebind < _Tp >::other other; }; }; } namespace std { template < typename > struct _Rb_tree_node; template < typename, typename _Val, typename, typename _Compare, typename _Alloc = allocator < _Val > >class _Rb_tree { typedef typename __gnu_cxx::__alloc_traits < _Alloc >::template rebind < _Rb_tree_node < _Val > >::other _Node_allocator; typedef _Alloc allocator_type; template < typename _Key_compare > struct _Rb_tree_impl { _Rb_tree_impl (_Key_compare, _Node_allocator); }; _Rb_tree_impl < _Compare > _M_impl; public: _Rb_tree (_Compare __comp, allocator_type __a):_M_impl (__comp, __a) { } }; template < typename _Key, typename _Tp, typename _Compare = less < _Key >, typename _Alloc = allocator < pair < _Key, _Tp > > >class map { public: typedef _Key key_type; typedef pair < _Key, _Tp > value_type; typedef _Compare key_compare; typedef _Alloc allocator_type; typedef _Rb_tree < key_type, value_type, _Select1st < value_type >, key_compare > _Rep_type; _Rep_type _M_t; map (_Compare __comp, allocator_type __a = allocator_type ()):_M_t (__comp, __a) { } }; template < typename _Tp > struct _List_iterator { typedef _Tp value_type; }; template < typename _Tp > class list { public: typedef _List_iterator < _Tp > iterator; }; } namespace Cult { namespace Types { namespace Fundamental { typedef void Void; typedef int WideChar; } using Fundamental::Void; using Fundamental::WideChar; } namespace { template < typename I > class IteratorAdapter { public: typedef typename std::iterator_traits < I >::value_type Value; }; } namespace Types { template < typename > class StringTemplate; typedef StringTemplate < WideChar > WideString; } namespace Containers { template < typename K, typename T > class Map:std::map < K, T > { typedef std::map < K, T > Base; typedef typename Base::key_compare Compare; public: Map (Compare comp = Compare ()):Base (comp) { } }; template < typename T > class List { typedef std::list < T > Base; public: typedef IteratorAdapter < typename Base::iterator > Iterator; }; } } namespace { using namespace Cult::Types; } namespace XSDFrontend { namespace SemanticGraph { namespace Bits { template < typename > struct strip_pointer; template < typename X > struct strip_pointer { typedef X Type; }; template < typename I > struct PointerIterator { typedef typename strip_pointer < typename I::Value >::Type Reference; Reference operator* (); }; } class Edge { }; class Node; class Names:public Edge { }; class Scope { typedef Cult::Containers::List < Names * >NamesList; public: typedef Bits::PointerIterator < NamesList::Iterator > NamesIterator; }; class Type; class Complex:public Scope { }; } } namespace FrontendElements { namespace Traversal { template < typename > class TraverserBase { }; template < typename X > class DispatcherBase { public: virtual Void dispatch (X); }; template < typename X > class Dispatcher:public DispatcherBase < X > { }; } } namespace XSDFrontend { namespace Traversal { namespace Bits { using FrontendElements::Traversal::TraverserBase; using FrontendElements::Traversal::DispatcherBase; using FrontendElements::Traversal::Dispatcher; } typedef Bits::DispatcherBase < SemanticGraph::Edge > EdgeDispatcherBase; struct EdgeBase:virtual Bits::Dispatcher < SemanticGraph::Edge >, Bits::Dispatcher < SemanticGraph::Node > { }; template < typename > struct Edge:Bits::TraverserBase < SemanticGraph::Edge >, EdgeBase { }; struct Names:Edge < Names > { }; template < typename T > struct ScopeTemplate { template < typename > Void names (T, EdgeDispatcherBase & d) { typename T::NamesIterator b; d.dispatch (*b); } Void names (T s, EdgeDispatcherBase & d) { names < ScopeTemplate > (s, d); } }; struct Complex:ScopeTemplate < SemanticGraph::Complex > { }; } typedef WideString String; class Context { }; namespace Parser { namespace { typedef Cult::Containers::Map < SemanticGraph::Type, String > TypeInstanceMap; struct BaseType { BaseType (Context); }; struct ArgList:Traversal::Complex { ArgList (Context, TypeInstanceMap) { } virtual Void traverse (SemanticGraph::Complex c) { names (c, names_); } TypeInstanceMap map_; Traversal::Names names_; }; struct ParserConnect:Context { ParserConnect (Context c, TypeInstanceMap):base_ (c) { ArgList (*this, map_); } TypeInstanceMap map_; BaseType base_; }; } Void generate_driver_source (Context ctx) { TypeInstanceMap map; ParserConnect (ctx, map); } } }