[Bug tree-optimization/51737] [4.6 Regression] g++ crashes (internal compiler error: Segmentation fault) when compiling quickbook

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 3 16:00:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51737

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org
      Known to work|                            |4.7.0

--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-03 15:59:53 UTC ---
Testcase, ICEs at -O2, works on trunk.  The code we ICE on is the same
on the branch and trunk, so maybe the issue is still latent there or maybe
we fixed it elsewhere.  -fno-ipa-sra fixes it on the branch.

template<class T> class intrusive_ptr {
public:
    ~intrusive_ptr() { intrusive_ptr_release( px ); }
    T * px;
};
template <typename T>     struct intrusive_base     {
    friend void intrusive_ptr_release(T* ptr) { delete ptr; }
};
struct section_info;
struct file_info : intrusive_base<file_info> {
    intrusive_ptr<file_info> parent;
    intrusive_ptr<section_info> switched_section;
};
struct section_info : intrusive_base<section_info> {
    intrusive_ptr<section_info> parent;
};
struct id_state {
    void * start_file(void);
};
void * id_state::start_file(void) {
    intrusive_ptr<file_info> parent;
}
struct id_generation_data : intrusive_base<id_generation_data> {
    void child_length() const {}
};
void generate_id(id_generation_data& generation_data)
{
  generation_data.child_length();
}



More information about the Gcc-bugs mailing list