This is the mail archive of the gcc-bugs@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: c++/9786: [3.2/3.3/3.4 regression] Ice in fixup_abnormal_edgeswith -fnon-call-exceptions -O2



I traced the -fnon-call-exceptions ICE I reported in PR 9786 back to the following two checkins:

Wed Mar 6 10:59:39 CET 2002 Jan Hubicka <jh at suse dot cz>

        * cfgrtl.c (delete_insn_and_edges, delete_insn_chain_and_edges): New.
        * rtl.h (delete_insn_and_edges, delete_insn_chain_and_edges): Declare

        * basic-block.h (update_life_info, update_life_info_in_dirty_blocks,
        delete_noop_moves): Return indeger.
        * flow.c (ndead): New variable.
        (propagate_block_delete_insn): Use delete_insn_and_edges; remove
        BB argument; update callers.
        (propagate_block_delete_libcall): Use delete_insn_chain_and_edges.
        (life_analysis): Do not call purge_all_dead_edges.
        (update_life_info): Return number of deleted insns; print statistics.
        (update_life_info_in_dirty_blocks): likewise.
        (delete_noop_moves): Use delete_insn_and_edges; print statistics;
        return number of insns deleted.

        * cse.c: Include timevar.h
        (delete_trivially_dead_insns): Kill preserve_basic_blocks argument;
        iterate until stabilizes; print statistics; return number of killed
        insns.
        * Makefile.in: (cse.o): Add timevar.h dependency
        * rtl.h (delete_trivially_dead_insns): New.
        * timever.def: Add TV_DELETE_TRIVIALLY_DEAD timer.
        * toplev.c (rest_of_compilation): Update callers.

        * cfgcleanup.c (try_optimize_cfg): Kill blocks.
        (try_optimize_cfg): Do not update liveness.
        (cleanup-cfg): Loop until try_optimize_cfg and dead code
        removal stabilizes; use delete_trivially_dead_insns.

* cfgrtl.c (verify_flow_info): Sanity check outgoing edges.


(cvs date tag "2002-03-06 02:20") changed the succesful compilation into:

pr9786.C: In constructor `B::B(const D2&)':
pr9786.C:23: Missing REG_EH_REGION note in the end of bb 4
pr9786.C:23: verify_flow_info failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

then:

Thu Mar 7 16:33:54 CET 2002 Jan Hubicka <jh at suse dot cz>

        * basic-block.h (fixup_abnormal_edges): Declare.
        * reload1.c (fixup_abnormal_edges): New function.
        * reg-stack.c (convert_regs): Use it.

* gcse.c (insert_insn_end_bb): Handle trapping insns.

* gcse.c (hash_scan_set): Refuse instructions with EH edges.

changed the compiler error to:

pr9786.C: In constructor `B::B(const D2&)':
pr9786.C:23: Internal compiler error in fixup_abnormal_edges, at reload1.c:9506
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

I've attached the example that I submitted with the PR modified for inclusion
in the g++.dg testsuite.

-nick
// PR c++/9786
// { dg-do compile }
// { dg-options "-O2 -fnon-call-exceptions" }
struct D1 {
    float l;
    D1 GS() const {D1 d;float f=.299*l;d.l=f;return d;}
    static D1 G() {return D1();}
};
struct D2 {
    D1 g;
    D2(const D1& gi) : g(gi) {}
    D2 GS() const {return D2(g.GS());}
};
class A {
  public:
    virtual ~A() {}
};
class B : public A {
  public:
    B(const D2& mi);
    D2 fm;
};
B::B(const D2 &mi) : fm(mi.GS()) {}

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