[Bug regression/37976] [4.4 Regression] ICE in insert_into_preds_of_block

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Oct 31 12:19:00 GMT 2008



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-10-31 12:18 -------
Reduced testcase:

void percent_x(int ch, char *p, char* ok_chars)                                 
{ 
  char *cp = ch == 'a' ? p : "";                                                
  for (;*(cp += __builtin_strspn (cp, ok_chars));)
    ;                                                                           
}

__builtin_strspn is partially redundant for cp == "" (it's zero).  The
zero is of wrong type becaue fold_builtin_strspn returns integer_zero_node
instead of size_zero_node.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2008-10-31 12:18:07
               date|                            |
            Summary|ICE in                      |[4.4 Regression] ICE in
                   |insert_into_preds_of_block  |insert_into_preds_of_block


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



More information about the Gcc-bugs mailing list