[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[creduce-bugs] crash 3/4



$ "/home/regehr/creduce-install/libexec/clang_delta" --transformation=template-arg-to-int --counter=1 small.cpp
Segmentation fault
 
            
            
           
           
         
            namespace mpl_ {}
            
         namespace mpl {
      using namespace mpl_;
      }
         template< int N > struct int_ ;
         namespace mpl {
      
   template< typename F > struct template_arity;
   
     }
        
            namespace mpl_ {
         template< bool C_ > struct bool_;
         typedef bool_<true> true_;
         typedef bool_<false> false_;
         template< bool C_ > struct bool_ {
          static const bool value = C_;
          typedef bool_ type;
           };
         template< typename T, T N > struct integral_c;
         }
            
         template <class T, int val> struct integral_constant : public mpl::integral_c<int, val> {};
         template<> struct integral_constant<bool,true> : public mpl::true_ {};
         template<> struct integral_constant<bool,false> : public mpl::false_ {};
         
            
         template< typename T > struct is_array : public ::integral_constant<bool,false> {};
         template< typename T > struct is_lvalue_reference : public ::integral_constant<bool,false> {};
         template< typename T > struct is_rvalue_reference : public ::integral_constant<bool,false> {};
         
      
      struct no_type ;
      template <bool b1, bool b2, bool b3 = false, bool b4 = false, bool b5 = false, bool b6 = false, bool b7 = false> struct ice_or;
      template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7> struct ice_or {
       static const bool value = true;
   };
      
         
      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;
   };
      
         
      template <typename T> struct is_reference_impl {
      static const bool value = ::ice_or< ::is_lvalue_reference<int>::value, ::is_rvalue_reference<int>::value >::value;
   };
      
         template< typename T > struct is_reference : public ::integral_constant<bool,::is_reference_impl<int>::value> {};
         
      struct false_result {
       template <typename T> struct result_     {
           static const bool value = false;
       };
   };
      
         
      template<bool is_ref = true> struct is_function_chooser     : public ::false_result {};
      template <typename T> struct is_function_impl     : public is_function_chooser<>         ::template result_<int> {};
      
         template< typename T > struct is_function : public ::integral_constant<bool,::is_function_impl<int>::value> {};
         struct void_;
         struct na ;
         namespace mpl {
      template<       typename T = na     , typename Tag = void_     , typename Arity = int_< template_arity<T>::value >     > struct lambda;
      }
        
            
           class directory_iterator;
template<typename _Tp>     class new_allocator     {
          public:       
            typedef directory_iterator& reference;
            template<typename _Tp1>         struct rebind         {
   typedef new_allocator other;
   };
                                                                  };
         
            
           template<typename _Tp>     class allocator: public new_allocator<_Tp>     {};
           template<typename _Tp, typename _Alloc>     struct _Vector_base     {
            typedef typename allocator<directory_iterator>::template rebind<int>::other _Tp_alloc_type;
          };
           template<typename _Tp, typename _Alloc = allocator<directory_iterator> >     class vector : protected _Vector_base<directory_iterator, _Alloc>     {
            typedef _Vector_base<directory_iterator, _Alloc> _Base;
            typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
          public:       typedef directory_iterator value_type;
            typedef typename _Tp_alloc_type::reference reference;
                                      };
         
            
         namespace mpl {
      
   template< typename T > struct nested_type_wknd     : T::type {};
   
      
   template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl     : true_ {};
   
      template<       typename T1 = na     , typename T2 = na     , typename T3 = false_, typename T4 = false_, typename T5 = false_     > struct or_     : or_impl<           ::mpl::nested_type_wknd<T1>::value         , int, int, int, int         > {};
      }
         
            
         
      template <typename T> struct cv_traits_imp ;
      template <typename T> struct cv_traits_imp {
       static const bool is_volatile = false;
       typedef int unqualified_type;
   };
      template <class T> struct is_volatile_rval_filter {
      static const bool value = ::cv_traits_imp<int*>::is_volatile;
   };
      
         template< typename T > struct is_volatile : public ::integral_constant<bool,::is_volatile_rval_filter<int>::value> {};
         template< typename T > struct is_integral : public ::integral_constant<bool,false> {};
         template< typename T > struct is_float : public ::integral_constant<bool,false> {};
         
      template< typename T > struct is_arithmetic_impl {
       static const bool value = ::ice_or< ::is_integral<int>::value, ::is_float<int>::value >::value;
   };
      
         template< typename T > struct is_arithmetic : public ::integral_constant<bool,::is_arithmetic_impl<int>::value> {};
         template< typename T > struct is_void : public ::integral_constant<bool,false> {};
         
      template <typename T> struct is_union_impl {
      static const bool value = false;
   };
      
         template< typename T > struct is_union : public ::integral_constant<bool,::is_union_impl<int>::value> {};
         
      ;
      template <typename T> struct is_class_impl {
       static const bool value = ::ice_and< sizeof(0) == sizeof(char), ::ice_not< ::is_union<int>::value >::value >::value;
   };
      
         template< typename T > struct is_class : public ::integral_constant<bool,::is_class_impl<int>::value> {};
         
      template<class T> struct is_abstract_imp2 {
      ;
      static const typeof (sizeof(int)) s1 = sizeof(0);
      static const bool value = s1 == sizeof(char);
   };
      template <bool v> struct is_abstract_select {
      template <class T>    struct rebind    {
         typedef is_abstract_imp2<int> type;
      };
   };
      template <class T> struct is_abstract_imp {
      typedef is_abstract_select< ::is_class<int>::value> selector;
      typedef typename selector::template rebind<int> binder;
      typedef typename binder::type type;
      static const bool value = type::value;
   };
      
         template< typename T > struct is_abstract : public ::integral_constant<bool,::is_abstract_imp<int>::value> {};
         
      template <typename T> struct add_reference_rvalue_layer {
       typedef int& type;
   };
      template <typename T> struct add_reference_impl {
       typedef int  type;
   };
      
         template< typename T > struct add_reference {
      public: typedef int  type;
      };
         template< typename T > struct add_lvalue_reference {
      public: typedef int  type;
      };
         
      struct any_conversion ;
      template <typename T> struct checker ;
      template <typename From, typename To> struct is_convertible_basic_impl {
       
       static int _m_from;
       static bool const value =         sizeof 0          == sizeof(char);
   };
      template <typename From, typename To> struct is_convertible_impl {
       static const bool value = ::ice_and< ::ice_or< ::is_convertible_basic_impl<int,int>::value, ::is_void<int>::value >::value, ::ice_not< ::is_array<int>::value >::value, ::ice_not< ::is_function<int>::value >::value >::value;
   };
      template <bool trivial1, bool trivial2, bool abstract_target> struct is_convertible_impl_select {
      template <class From, class To>    struct rebind    {
         typedef is_convertible_impl<int, int> type;
      };
   };
      template <typename From, typename To> struct is_convertible_impl_dispatch_base {
      typedef is_convertible_impl_select<       ::is_arithmetic<int>::value,       ::is_arithmetic<int>::value,       ::is_abstract<int>::value    > selector;
      typedef typename selector::template rebind<int, int> isc_binder;
      typedef typename isc_binder::type type;
   };
      template <typename From, typename To> struct is_convertible_impl_dispatch    : public is_convertible_impl_dispatch_base<int, int>::type {};
      
         template< typename From, typename To > struct is_convertible : public ::integral_constant<bool,::is_convertible_impl_dispatch<int,int>::value> {};
         struct no_traversal_tag {};
         struct incrementable_traversal_tag   : no_traversal_tag {};
         struct single_pass_traversal_tag   : incrementable_traversal_tag {};
           
          template<bool>     struct enabled     {
         template<typename T>       struct base       {
           typedef int type;
         };
       };
          template <class Cond,               class Return>     struct enable_if       : enabled<mpl::or_<is_convertible<int, int>, is_convertible<int, int>, mpl_::bool_<false>, mpl_::bool_<false>, mpl_::bool_<false> >::value>::template base<int>     {};
        
         
      template <typename T, bool is_vol> struct remove_const_helper {
       typedef int type;
   };
      template <typename T> struct remove_const_impl {
       typedef int  type;
   };
      
         template< typename T > struct remove_const {
      public: typedef int  type;
      };
         namespace mpl {
      
      template<       typename F, typename T1, typename T2     > struct apply_wrap2     : F::template apply< int,int > {};
      }
        
            
         namespace mpl {
      
   template< int N > struct arity_tag {
       typedef char &type;
   };
   template<       int C1, int C2, int C3, int C4, int C5, int C6     > struct max_arity {
       static const int value =  C6 > C6 ;
   };
   
   template< typename F, int N > struct template_arity_impl {
       static const int value = sizeof - 1;
   };
   template< typename F > struct template_arity {
       static const int value =  max_arity< template_arity_impl< int,1 >::value, template_arity_impl< int,2 >::value, template_arity_impl< int,3 >::value, template_arity_impl< int,4 >::value, template_arity_impl< int,5 >::value, template_arity_impl< int,6 >::value >::value ;
   };
   
     }
         namespace mpl {
      template<       typename T     , typename Tag     , typename Arity     > struct lambda {
       typedef T type;
   };
      template<       typename F, typename T1, typename T2     > struct apply2     : apply_wrap2<           typename lambda<F>::type         , int, int         > {};
      }
           
          struct always_bool2     {
           template <class T, class U>         struct apply         {
               typedef bool type;
           };
       };
          template <         class Facade1       , class Facade2       , class Return     >     struct enable_if_interoperable       : ::enable_if<            mpl::or_<                is_convertible<int, int>              , is_convertible<int, int>            >          , int         >     {};
          template <         class ValueParam       , class CategoryOrTraversal       , class Reference       , class Difference     >     struct iterator_facade_types     {
           typedef int  value_type;
       };
        
           template <       class Derived     , class Value     , class CategoryOrTraversal     , class Reference = int&     , class Difference = typeof ((int *)0 - 0)   >   class iterator_facade   {
         private:                     typedef iterator_facade_types<          int, int, int, int       > associated_types;
         public:       typedef int value_type;
                   directory_iterator& operator++()       ;
                                           };
           template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 >  typename enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2<always_bool2,Derived1,Derived2>::type >::type operator ==( iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs) ;
         
            
           template<typename _Tp, typename _Alloc>     class _Deque_base     ;
                       template<typename _Tp, typename _Alloc = allocator<int> >     class deque : protected _Deque_base<int, _Alloc>     {};
           template<typename _Tp, typename _Sequence = deque<int> >     class stack     {
          public:       typedef int  value_type;
            
            
                   typename vector<directory_iterator, allocator<directory_iterator> >::reference       top()       ;
          };
         
            
           
                                                                                                                                                          class directory_entry ;
        class directory_iterator     : public iterator_facade< directory_iterator,                                      directory_entry,                                      single_pass_traversal_tag >   {
     public:     directory_iterator();
      ~directory_iterator() ;
                    };
            
       struct recur_dir_itr_imp     {
         
         stack< directory_iterator, vector< directory_iterator > > m_stack;
         void pop();
       };
            inline     void recur_dir_itr_imp::pop()     {
         directory_iterator &__trans_tmp_1 = m_stack.top();
         do       ;
         while (!0 && ++__trans_tmp_1 == directory_iterator());
       }