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

            Bug ID: 78088
           Summary: [7 Regression] error: non-trivial conversion in unary
                    operation
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

markus@x4 /tmp % cat scimage.ii
class A {
public:
  int m_fn1();
};
struct B : A {
  void m_fn2();
};
void B::m_fn2() {
  long a;
  int b, c;
  for (;;) {
    c = 0;
    for (; c < a; ++c, ++b)
      b > 0 ? m_fn1() : 0;
  }
}

markus@x4 /tmp % g++ -O3 -c scimage.ii
scimage.ii: In member function ‘bool B::m_fn2()’:
scimage.ii:8:6: error: non-trivial conversion in unary operation
 bool B::m_fn2() {
      ^
long int
int
_34 = -b_2;
scimage.ii:8:6: internal compiler error: verify_gimple failed
0xda8760 verify_gimple_in_cfg(function*, bool)
        ../../gcc/gcc/tree-cfg.c:5208
0xc89d57 execute_function_todo
        ../../gcc/gcc/passes.c:1965
0xc8ae2c execute_todo
        ../../gcc/gcc/passes.c:2015

Reply via email to