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

Re: [creduce-bugs] template-non-type-arg-to-int counts to infinity



On 2016.02.25 at 16:08 +0100, Markus Trippelsdorf wrote:
> markus@x4 tmp % ~/creduce/creduce/creduce --no-default-passes --add-pass pass_clang "template-non-type-arg-to-int" 1 ./check.sh registry.ii
> ===< 6930 >===
> running 3 interestingness tests in parallel
> ===< pass_clang :: template-non-type-arg-to-int >===
> (-0.0 %, 15246 bytes)
> (-0.0 %, 15247 bytes)
> (-0.0 %, 15248 bytes)
> (-0.0 %, 15249 bytes)
> (-0.0 %, 15250 bytes)
> (-0.0 %, 15251 bytes)
> (-0.0 %, 15252 bytes)
> (-0.1 %, 15253 bytes)
> (-0.1 %, 15254 bytes)
> (-0.1 %, 15255 bytes)
> (-0.1 %, 15256 bytes)
> (-0.1 %, 15257 bytes)
> (-0.1 %, 15258 bytes)
> (-0.1 %, 15259 bytes)
> (-0.1 %, 15260 bytes)
> (-0.1 %, 15261 bytes)
> (-0.1 %, 15262 bytes)
> (-0.1 %, 15263 bytes)
> (-0.1 %, 15264 bytes)
> (-0.1 %, 15265 bytes)
> (-0.1 %, 15266 bytes)
> (-0.1 %, 15267 bytes)
> (-0.2 %, 15268 bytes)
> (-0.2 %, 15269 bytes)
> ...

Forgot to attach the testcase. Sorry.

-- 
Markus

Attachment: check.sh
Description: Bourne shell script

 namespace libecap {
         namespace adapter {
       class Service;
       class Xaction;
      }
         }
            namespace std {
           typedef long unsigned int size_t;
           inline namespace __cxx11 __attribute__((__abi_tag__ )) {
      }
           template<typename _Tp>     inline _Tp*     __addressof(void) noexcept     ;
           template<typename _Tp, _Tp __v>     struct integral_constant     {
            static constexpr _Tp value = __v;
            typedef integral_constant type;
          };
           
           typedef integral_constant<bool, false> false_type;
           template<bool, typename, typename>     struct conditional;
           template<typename...>     struct __or_;
           template<typename _B1, typename _B2>     struct __or_<_B1, _B2>     : public conditional<_B1::value, _B1, _B2>::type     {
      };
           template<typename _B1, typename _B2, typename _B3, typename... _Bn>     struct __or_<_B1, _B2, _B3, _Bn...>     : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type     {
      };
           template<typename...>     struct __and_;
           template<typename _B1, typename _B2>     struct __and_<_B1, _B2>     : public conditional<_B1::value, _B2, _B1>::type     {
      };
           template<typename _Pp>     struct __not_     : public integral_constant<bool, !_Pp::value>     {
      };
           template<typename>     struct remove_cv;
           template<typename>     struct __is_void_helper     : public false_type {
      };
           template<typename _Tp>     struct is_void     : public __is_void_helper<typename remove_cv<_Tp>::type>::type     {
      };
           template<typename>     struct is_array     : public false_type {
      };
           template<typename>     struct is_lvalue_reference     : public false_type {
      };
           template<typename>     struct is_rvalue_reference     : public false_type {
      };
           template<typename>     struct is_function     : public false_type {
      };
           template<typename _Tp>     struct is_reference     : public __or_<is_lvalue_reference<_Tp>,                    is_rvalue_reference<_Tp>>::type     {
      };
           template<typename _Tp>     struct is_object     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,                           is_void<_Tp>>>::type     {
      };
           template<typename _Tp>     struct __is_referenceable     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type     {
      };
           template<typename>     struct add_rvalue_reference;
           template<typename _Tp>     void  declval() noexcept;
           struct __do_is_default_constructible_impl   {
          template<typename _Tp, typename = decltype(_Tp())>       void  __test(int);
        };
           template<typename _Tp>     struct __is_default_constructible_impl     : public __do_is_default_constructible_impl     {
            typedef decltype(__test(0)) type;
          };
           template<typename _Tp>     struct __is_default_constructible_atom     : public __and_<__not_<is_void<_Tp>>,                     __is_default_constructible_impl<_Tp>>::type     {
      };
           template<typename _Tp, bool = is_array<_Tp>::value>     struct __is_default_constructible_safe;
           template<typename _Tp>     struct __is_default_constructible_safe<_Tp, false>     : public __is_default_constructible_atom<_Tp>::type     {
      };
           template<typename _Tp>     struct is_default_constructible     : public __is_default_constructible_safe<_Tp>::type     {
      };
           template<typename _Tp>     struct __is_nt_default_constructible_atom     : public integral_constant<bool, noexcept(_Tp())>     {
      };
           template<typename _Tp, bool = is_array<_Tp>::value>     struct __is_nt_default_constructible_impl;
           template<typename _Tp>     struct __is_nt_default_constructible_impl<_Tp, false>     : public __is_nt_default_constructible_atom<_Tp>     {
      };
           template<typename _Tp>     struct is_nothrow_default_constructible     : public __and_<is_default_constructible<_Tp>,                     __is_nt_default_constructible_impl<_Tp>>::type     {
      };
           template<typename _From, typename _To,            bool = __or_<is_void<_From>, is_function<_To>,                         is_array<_To>>::value>     struct __is_convertible_helper     {
             template<typename _To1>  static void __test_aux(_To1);
            template<typename _From1, typename _To1,         typename = decltype(__test_aux<_To1>)>  static integral_constant<bool, true>  __test(int);
          public:       typedef decltype(__test<_From, _To>(0)) type;
          };
           template<typename _From, typename _To>     struct is_convertible     : public __is_convertible_helper<int, _To>::type     {
      };
           template<typename _Tp>     struct remove_const     {
      typedef int type;
      };
           template<typename _Tp>     struct remove_volatile     {
      typedef int type;
      };
           template<typename _Tp>     struct remove_cv     {
            typedef int  type;
          };
           template<typename _Tp>     struct remove_reference     {
      typedef _Tp type;
      };
           template<typename _Tp, bool = __is_referenceable<_Tp>::value>     struct __add_rvalue_reference_helper     {
      typedef _Tp type;
      };
           template<typename _Tp>     struct add_rvalue_reference     : public __add_rvalue_reference_helper<_Tp>     {
      };
           template<typename _Up,     bool _IsArray = is_array<_Up>::value,     bool _IsFunction = is_function<_Up>::value>     struct __decay_selector;
           template<typename _Up>     struct __decay_selector<_Up, false, false>     {
      typedef _Up __type;
      };
           template<typename _Tp>     class decay     {
            
          public:       typedef typename __decay_selector<int>::__type type;
          };
           template<typename _Tp>     struct __strip_reference_wrapper     {
            typedef int __type;
          };
           template<typename _Tp>     struct __decay_and_strip     {
            typedef _Tp  __type;
          };
           template<int                                                                                                                                                                                                                                                                                                                                                                                               , typename _Tp = void>     struct enable_if     {
      typedef int type;
      };
           template<bool _Cond, typename _Iftrue, typename _Iffalse>     struct conditional     {
      typedef _Iftrue type;
      };
           template<typename _Tp>     constexpr _Tp&&     forward(typename std::remove_reference<_Tp>::type& __t) noexcept     ;
           template<typename _Tp>     constexpr typename std::remove_reference<_Tp>::type&&     move(_Tp&& __t) noexcept     ;
           template<class _T1, class _T2>     struct pair     {
            int first;
            int second;
            constexpr pair(const _T1& __a, const _T2& __b)       : first(__a), second(__b) {
   }
            template<class _U1, class _U2, class = typename         enable_if<__and_<is_convertible<const _U1&, _T1>,     is_convertible<const _U2&, _T2>>::value>::type>  constexpr pair(const pair<_U1, _U2>& __p)  : first(__p.first), second(__p.second) {
   }
          };
           template<class _T1, class _T2>     constexpr pair<typename __decay_and_strip<_T1>::__type,                    typename __decay_and_strip<_T2>::__type>     make_pair(_T1&& __x, _T2&& __y)     ;
         }
            namespace __gnu_cxx __attribute__ ((__visibility__ )) {
           using std::size_t;
           template<typename _Tp>     class new_allocator     {
          public:       
            template<typename _Tp1>         struct rebind         {
   typedef new_allocator<_Tp1> other;
   };
            template<typename _Up, typename... _Args>         void         construct(_Up* __p, _Args&&... __args)  {
   }
          };
         }
            namespace std {
           template<typename _Tp>     using __allocator_base = __gnu_cxx::new_allocator<_Tp>;
           template<typename _Tp>     class allocator: public __allocator_base<int>     {
          };
           template<typename _Alloc>     struct allocator_traits     ;
           template<typename _Tp>     struct allocator_traits     {
            using pointer = int*;
            template<typename _Up>  using rebind_alloc = allocator<_Up>;
          };
         }
            namespace __gnu_cxx __attribute__ ((__visibility__ )) {
         template<typename _Alloc>   struct __alloc_traits   : std::allocator_traits<int>   {
          
          template<typename _Tp>       struct rebind       {
   typedef typename std::allocator_traits<int>::template rebind_alloc<int> other;
   };
        };
         }
            namespace std __attribute__ ((__visibility__ )) {
           template<class _CharT>     struct char_traits;
         namespace __cxx11 {
        template<typename _CharT, typename _Traits = char_traits<_CharT>,            typename _Alloc = allocator<_CharT> >     class basic_string;
        typedef basic_string<char> string;
      }
         }
            typedef struct 
            pthread_mutex_t;
            namespace __gnu_cxx __attribute__ ((__visibility__ )) {
           enum _Lock_policy {
        _S_atomic };
           static const _Lock_policy __default_lock_policy =   _S_atomic;
         }
            namespace std __attribute__ ((__visibility__ )) {
         namespace __cxx11 {
        template<typename _CharT, typename _Traits, typename _Alloc>     class basic_string     {
         typedef typename __gnu_cxx::__alloc_traits<int>::template  rebind<int>::other _Char_alloc_type;
         
         
         typedef typename __gnu_cxx::__alloc_traits<int>::pointer pointer;
         struct _Alloc_hider : _Char_alloc_type       {
    _Alloc_hider(pointer __dat, const int& __a = int())  ;
         };
         _Alloc_hider _M_dataplus;
         pointer       _M_local_data()       ;
       public:       basic_string()       noexcept       : _M_dataplus(_M_local_data)       {
   }
         basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())       : _M_dataplus(_M_local_data(), __a)       {
         }
     };
      }
         namespace tr1 {
            using __gnu_cxx::_Lock_policy;
        using __gnu_cxx::__default_lock_policy;
           template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>     class __shared_ptr;
        template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>     class __weak_ptr;
        template<typename _Tp, _Lock_policy _Lp>     class __shared_ptr     {
       };
        template<typename _Tp, _Lock_policy _Lp>     class __weak_ptr     {
       };
        template<typename _Tp>     class shared_ptr     : public __shared_ptr<int>     {
       };
        template<typename _Tp>     class weak_ptr     : public __weak_ptr<int>     {
       public:       
         template<typename _Tp1>         weak_ptr(const shared_ptr<_Tp1>& __r)  ;
              };
      }
         }
            namespace libecap {
         using std::tr1::weak_ptr;
         using std::tr1::shared_ptr;
         extern bool RegisterVersionedService( void);
         namespace adapter {
      class Service {
    public:                                          
        shared_ptr<int> self;
   };
      }
         }
            namespace std __attribute__ ((__visibility__ )) {
           
          struct _List_node_base     {
       };
        
           template<typename _Tp>     struct _List_node : public _List_node_base     {
          };
           template<typename _Tp>     struct _List_iterator     {
          };
         namespace __cxx11 {
        template<typename _Tp, typename _Alloc>     class _List_base     {
       protected:       typedef typename std::allocator<int >::template rebind<_List_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::tr1::weak_ptr<libecap::adapter::Service> >> >::other         _Node_alloc_type;
         struct _List_impl       : public _Node_alloc_type       {
         };
         _List_impl _M_impl;
         _List_node<std::pair<int, int >>       _M_get_node       ;
         _Node_alloc_type&       _M_get_Node_allocator() noexcept       ;
         _List_base()       : _M_impl()       {
   }
         _List_base(_List_base&& __x) noexcept       : _M_impl(std::move)       {
    auto* const __xnode = std::__addressof;
    if (__xnode->_M_next == __xnode)    _M_init;
    else    ;
   }
         void       _M_init() noexcept       ;
       };
        template<typename _Tp, typename _Alloc = std::allocator<std::pair<int, int >> >     class list : protected _List_base<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::tr1::weak_ptr<libecap::adapter::Service> >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::tr1::weak_ptr<libecap::adapter::Service> > >>     {
         typedef _List_base<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::tr1::weak_ptr<libecap::adapter::Service> >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::tr1::weak_ptr<libecap::adapter::Service> > >> _Base;
         typedef typename _Base::_Node_alloc_type _Node_alloc_type;
       public:       
         typedef std::pair<int, int >  iterator;
       protected:       typedef _List_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::tr1::weak_ptr<libecap::adapter::Service> >> _Node;
         using _Base::_M_get_Node_allocator;
         template<typename... _Args>         _Node*         _M_create_node(_Args&&... __args)  {
      _Node* __p = 0;
      try      {
          _M_get_Node_allocator().construct(__p,       std::forward<_Args>(__args)...);
        }
      catch(...)      {
        }
    }
       public:       list()       noexcept       : _Base() {
   }
         iterator       end() noexcept       ;
         void       push_back(const std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::tr1::weak_ptr<libecap::adapter::Service> >& __x)       {
   this->_M_insert(end(), __x);
   }
        template<typename... _Args>        void        _M_insert(iterator __position, _Args&&... __args)        {
     _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...);
         }
       };
      }
         }
            namespace libecap {
         
         
         
         
         static std::list<int > TheStagingArea;
         }
            bool libecap::RegisterVersionedService( void) {
          const char * v = "1.0.1";
          adapter::Service * s = 0;
          const std::pair<int, int > si = std::make_pair(v, s->self);
          TheStagingArea.push_back(si);
         }