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

           Summary: ICE on for-loop/throw combination
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: g...@portuosus.com


Source file /tmp/redux.cc:

#include <iostream>
#include <string>

int main(int argc,char**argv)
{
  std::string str;
  for ( int field(0);
        (field<10) && ((std::cin>>str)?true:(throw std::string("failure")));
        field++ );
}

produces:

/tmp/redux.cc: In function ‘int main(int, char**)’:
/tmp/redux.cc:7:3: internal compiler error: in fold_convert_loc, at
fold-const.c:2670

Reply via email to