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]

[Bug target/36635] [4.4 Regression] cc1 segfault from svn 137122



------- Comment #4 from jakub at gcc dot gnu dot org  2008-10-07 16:16 -------
I've reproduced PR37341 though.  And I believe your patch is an overkill, as
cse_cc_succs only recurses if edge destination has a single predecessor.
So IMHO you don't need to keep a bitmap of visited blocks, as the only way
to reach endless recursion is if you eventually reach the original bb
cse_condition_code_reg called cse_cc_succs with, as if there is a smaller loop
there would be some bb with more than one predecessor.

To fix this, we can either add an extra argument to cse_cc_succs (the original
bb) and bail if e->dest is equal to orig_bb; IMHO this is the cheapest
variant),
or we could call find_unreachable_blocks () if tem > 0 before
cse_condition_code_reg and disregard (bb->flags & BB_REACHABLE) == 0 bb's (or
delete_unreachable_blocks ()).


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-06-26 10:25:28         |2008-10-07 16:16:48
               date|                            |


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


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