[Bug middle-end/79396] New: [7 Regression] ICE (verify_flow_info failed) with -fnon-call-exceptions -O2

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 6 20:13:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79396

            Bug ID: 79396
           Summary: [7 Regression] ICE (verify_flow_info failed) with
                    -fnon-call-exceptions -O2
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: janus at gcc dot gnu.org
  Target Milestone: ---

Consider the following reduced test case:


#include <cmath>
#include <memory>

float build(float x) {
  std::shared_ptr<int> itNodes;
  return pow(x,2) + 2;
}


When compiled with current trunk (r245211) like this ...

$ g++-7 -fnon-call-exceptions -O2 smeshtofdneut.cpp

... it yields:

smeshtofdneut.cpp:4:7: error: BB 3 can not throw but has an EH edge
 float build(float x) {
       ^~~~~
smeshtofdneut.cpp:4:7: internal compiler error: verify_flow_info failed
0x99e9a9 verify_flow_info()
        /home/jweil/gcc/trunk/gcc/cfghooks.c:260
0xd016f1 execute_function_todo
        /home/jweil/gcc/trunk/gcc/passes.c:1978
0xd02105 execute_todo
        /home/jweil/gcc/trunk/gcc/passes.c:2016


More information about the Gcc-bugs mailing list