This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] RFC: Making control flow more explicit


Op za 09-08-2003, om 15:40 schreef Steven Bosscher:
> Op za 09-08-2003, om 13:58 schreef Steven Bosscher:
> > In fact it bootstraps c,c++,objc,java,gfortran + libraries.  I'm running
> > the test suites now.
> 
> Here are the test results for tree-ssa with your patches applied.
> 
> I've compared these results with
> http://gcc.gnu.org/ml/gcc-testresults/2003-08/msg00459.html:
> The g++/objc test summaries are identical, so no c++ regressions.

Unfortunately, with the patches, tree-ssa gcc fails to compile the test
case for PR8361.  I've tried to cut down the huge test case to something
managable, but it doesn't help, the GIMPLE dump still is huge.

(Note that the attached test case code isn't even valid, but it still
shows the ICE and that's what mattes.)

Gr.
Steven


$ ./cc1plus t.C -quiet -O
t.C: In member function `void
   std::MODEL_GENERATOR::PrintGatomRulesConstraints()':
t.C:402: internal compiler error: Segmentation fault
Program received signal SIGSEGV, Segmentation fault.
can_throw_internal (insn=0x0) at ../../tree-ssa/gcc/except.c:2780
2780      if (region->type == ERT_THROW)
(gdb) where
#0  can_throw_internal (insn=0x0) at ../../tree-ssa/gcc/except.c:2780
#1  0x40293640 in ?? ()
#2  0x08463fd5 in control_flow_insn_p (insn=0x0) at ../../tree-ssa/gcc/cfgbuild.c:113
#3  0x0846404e in count_basic_blocks (f=0x4028f980)
    at ../../tree-ssa/gcc/cfgbuild.c:156
#4  0x08464b76 in find_basic_blocks (f=0x40293640, nregs=98, file=0x0)
    at ../../tree-ssa/gcc/cfgbuild.c:610
#5  0x0840b632 in rest_of_compilation (decl=0x402177e0)
    at ../../tree-ssa/gcc/toplev.c:3144
#6  0x081336be in genrtl_finish_function (fn=0x402177e0)
    at ../../tree-ssa/gcc/cp/semantics.c:3219
#7  0x0813298f in expand_body (fn=0x402177e0)
    at ../../tree-ssa/gcc/cp/semantics.c:2947
#8  0x080f813c in cp_parser_function_definition_after_declarator (parser=0x402177e0,
    inline_p=false) at ../../tree-ssa/gcc/cp/parser.c:13431
#9  0x080f80b2 in cp_parser_function_definition_from_specifiers_and_declarator (
    parser=0x401963c0, decl_specifiers=0x4029a690, attributes=0x4029a690,
    declarator=0x4029a690) at ../../tree-ssa/gcc/cp/parser.c:13370
#10 0x080f2f2a in cp_parser_init_declarator (parser=0x401963c0,
    decl_specifiers=0x40216e54, prefix_attributes=0x0,
    function_definition_allowed_p=true, member_p=false,
    function_definition_p=0xbfffe583) at ../../tree-ssa/gcc/cp/parser.c:9231
#11 0x080efec9 in cp_parser_simple_declaration (parser=0x401963c0,
(gdb) up
#1  0x40293640 in ?? ()
(gdb) l
4625        do_compile ();
4626
4627      if (errorcount || sorrycount)
4628        return (FATAL_EXIT_CODE);
4629
4630      return (SUCCESS_EXIT_CODE);
4631    }





typedef int ptrdiff_t;
typedef unsigned int size_t;

namespace std
{
  using ::ptrdiff_t;
  using ::size_t;
}

typedef struct pthread_mutex *pthread_mutex_t;

extern "C" {
int pthread_mutex_lock (pthread_mutex_t *);
}

typedef pthread_mutex_t __gthread_mutex_t;

static inline int
__gthread_mutex_lock (__gthread_mutex_t *mutex)
{
    return pthread_mutex_lock (mutex);
}

typedef int _Atomic_word;

namespace std
{
  struct _STL_mutex_lock
  {
    __gthread_mutex_t _M_lock;

    void
    _M_acquire_lock()
    {
      __gthread_mutex_lock(&_M_lock);
    }
  };
}


namespace std
{
  class __new_alloc
  {
  public:
    static void*
    allocate(size_t __n)
    { return ::operator new(__n); }
  };
  template<int __inst>
    class __malloc_alloc
    {
    private:
      static void* _S_oom_malloc(size_t);
      static void (* __malloc_alloc_oom_handler)();

    public:
      static void*
      allocate(size_t __n)
      {
      }

      static void
      deallocate(void* __p, size_t )
      {
      }

      static void (* __set_malloc_handler(void (*__f)()))()
      {
      }
    };


  typedef __new_alloc __mem_interface;
  template<typename _Tp, typename _Alloc>
    class __simple_alloc
    {
    public:
      static _Tp*
      allocate(size_t __n)
      {
      }

      static _Tp*
      allocate()
      {
      }

      static void
      deallocate(_Tp* __p, size_t __n)
      { _Alloc::deallocate(__p, __n * sizeof (_Tp)); }

      static void
      deallocate(_Tp* __p)
      {
      }
    };
  template<typename _Alloc>
    class __debug_alloc
    {
    private:


    public:
      static void*
      allocate(size_t __n)
      {
      }

      static void
      deallocate(void* __p, size_t __n)
      {
      }
    };
  template<bool __threads, int __inst>
    class __pool_alloc
    {
    private:

      union _Obj
      {
        union _Obj* _M_free_list_link;
        char _M_client_data[1];
      };

      static _Obj* volatile _S_free_list[0];


      static char* _S_start_free;
      static char* _S_end_free;
      static size_t _S_heap_size;

      static _STL_mutex_lock _S_lock;
      static _Atomic_word _S_force_new;

      static size_t
      _S_round_up(size_t __bytes)
      {
      }

      static size_t
      _S_freelist_index(size_t __bytes)
      {
      }



      static void*
      _S_refill(size_t __n);



      static char*
      _S_chunk_alloc(size_t __size, int& __nobjs);



      struct _Lock
      {
        _Lock() { _S_lock._M_acquire_lock(); }
        ~_Lock() { }
      } __attribute__ ((__unused__));

    public:

      static void*
      allocate(size_t __n)
      {
      }


      static void
      deallocate(void* __p, size_t __n)
      {
        _Lock __lock_instance;
      }
    };

  typedef __pool_alloc<true,0> __alloc;
  typedef __pool_alloc<false,0> __single_client_alloc;
  template<typename _Tp>
    class allocator
    {
      typedef __alloc _Alloc;
    public:
      typedef size_t size_type;
      typedef ptrdiff_t difference_type;
      typedef _Tp* pointer;
      typedef const _Tp* const_pointer;
      typedef _Tp& reference;
      typedef const _Tp& const_reference;
      typedef _Tp value_type;

      template<typename _Tp1>
        struct rebind
        { typedef allocator<_Tp1> other; };

      allocator() throw() {}
      allocator(const allocator&) throw() {}
      template<typename _Tp1>
        allocator(const allocator<_Tp1>&) throw() {}
      ~allocator() throw() {}

      pointer
      address(reference __x) const { return &__x; }

      const_pointer
      address(const_reference __x) const { return &__x; }



      _Tp*
      allocate(size_type __n, const void* = 0)
      {
      }
    };

  template<typename _Tp, typename _Alloc>
    struct __allocator
    {
      _Alloc __underlying_alloc;

      typedef size_t size_type;
      typedef ptrdiff_t difference_type;
      typedef _Tp* pointer;
      typedef const _Tp* const_pointer;
      typedef _Tp& reference;
      typedef const _Tp& const_reference;
      typedef _Tp value_type;

      template<typename _Tp1>
        struct rebind
        { typedef __allocator<_Tp1, _Alloc> other; };

      __allocator() throw() {}
      __allocator(const __allocator& __a) throw()
      : __underlying_alloc(__a.__underlying_alloc) {}

      template<typename _Tp1>
        __allocator(const __allocator<_Tp1, _Alloc>& __a) throw()
        : __underlying_alloc(__a.__underlying_alloc) {}

      ~__allocator() throw() {}
    };

  template<typename _Tp, typename _Allocator>
    struct _Alloc_traits
    {
      static const bool _S_instanceless = false;
      typedef typename _Allocator::template rebind<_Tp>::other allocator_type;
    };

  template<typename _Tp, typename _Allocator>
    const bool _Alloc_traits<_Tp, _Allocator>::_S_instanceless;


  template<typename _Tp, typename _Tp1>
    struct _Alloc_traits<_Tp, allocator<_Tp1> >
    {
      static const bool _S_instanceless = true;
      typedef __simple_alloc<_Tp, __alloc> _Alloc_type;
      typedef allocator<_Tp> allocator_type;
    };
}


namespace std
{
template <class _Arg, class _Result>
struct unary_function {
  typedef _Arg argument_type;
  typedef _Result result_type;
};



template <class _Arg1, class _Arg2, class _Result>
struct binary_function {
  typedef _Arg1 first_argument_type;
  typedef _Arg2 second_argument_type;
  typedef _Result result_type;
};

template <class _Tp>
struct less : public binary_function<_Tp,_Tp,bool>
{
  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; }
};


template <class _Tp>
struct _Identity : public unary_function<_Tp,_Tp> {
  _Tp& operator()(_Tp& __x) const { return __x; }
  const _Tp& operator()(const _Tp& __x) const { return __x; }
};

namespace std { }

using namespace std;



namespace std
{
  template<typename _Val>
    struct _Rb_tree_node
    {
    };

  template<typename _Tp, typename _Alloc, bool _S_instanceless>
    class _Rb_tree_alloc_base
    {
    };

  template<typename _Tp, typename _Alloc>
    class _Rb_tree_alloc_base<_Tp, _Alloc, true>
    {
    public:
    typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type allocator_type;
      allocator_type get_allocator() const { }

      _Rb_tree_alloc_base(const allocator_type&) : _M_header(0) {}

    protected:
      _Rb_tree_node<_Tp>* _M_header;

      typedef typename _Alloc_traits<_Rb_tree_node<_Tp>, _Alloc>::_Alloc_type
      _Alloc_type;

      _Rb_tree_node<_Tp>*
      _M_get_node() { }

      void
      _M_put_node(_Rb_tree_node<_Tp>* __p) { _Alloc_type::deallocate(__p, 1); }
    };

  template<typename _Tp, typename _Alloc>
    struct _Rb_tree_base : public _Rb_tree_alloc_base<_Tp, _Alloc,
                                  _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
    {
      typedef _Rb_tree_alloc_base<_Tp,
        _Alloc, _Alloc_traits<_Tp, _Alloc>::_S_instanceless> _Base;
      typedef typename _Base::allocator_type allocator_type;

      _Rb_tree_base(const allocator_type& __a)
      : _Base(__a) {}
      ~_Rb_tree_base() { _M_put_node(this->_M_header); }
    };


  template<typename _Key, typename _Val, typename _KeyOfValue,
           typename _Compare, typename _Alloc = allocator<_Val> >
    class _Rb_tree : protected _Rb_tree_base<_Val, _Alloc>
    {
      typedef _Rb_tree_base<_Val, _Alloc> _Base;

    protected:
      typedef typename _Base::allocator_type allocator_type;

    public:

      _Rb_tree()
        : _Base(allocator_type())
      {
      }
    };
}


namespace std
{

template <class _Key, class _Compare = less<_Key>,
          class _Alloc = allocator<_Key> >
class set;

template <class _Key, class _Compare, class _Alloc>
class set
{
public:

  typedef _Key key_type;
  typedef _Key value_type;
  typedef _Compare key_compare;
  typedef _Compare value_compare;
private:
  typedef _Rb_tree<key_type, value_type,
                  _Identity<value_type>, key_compare, _Alloc> _Rep_type;
  _Rep_type _M_t;
};
}


class MODEL_GENERATOR

    {
    void PrintGatomRulesConstraints(void);
    };

void MODEL_GENERATOR::PrintGatomRulesConstraints(void)
    {
    set<int> allGatoms;
    }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]