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



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



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Target|i?86-*-*                    |i?86-*-*, x86_64-*-*

             Status|UNCONFIRMED                 |NEW

   Last reconfirmed|                            |2012-12-19

     Ever Confirmed|0                           |1



--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-19 
14:56:02 UTC ---

Reduced testcase, fails at -O2:



static bool st_IsPathDelimiter( char c ) { return c == '/'; }

bool IsValidPath( char const * filename )

{

  if ( !filename || filename[0] == 0 )     

    return false;

  char const * run = filename;

  while ( run && *run )       

    {

      if ( run[0] == '.' )   

        if ( run[1] != '.' || ( !st_IsPathDelimiter( run[2] ) && run[2] != 0 )

)   

          return false;   

      while ( *run && !st_IsPathDelimiter( *run ) )

        ++run;

      if ( *run ) 

        ++run;

    }

}

Reply via email to