http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59645
Bug ID: 59645 Summary: [4.7/4.8/4.9 Regression] ICE with covariant return and volatile Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org The following valid code snippet triggers an ICE since GCC 4.6.0: =========================================================== struct A { virtual ~A(); }; struct B { virtual ~B(); }; struct C : A, B {}; struct X { virtual B* foo(volatile int); }; struct Y : X { virtual C* foo(volatile int); }; C* Y::foo(volatile int) { return 0; } =========================================================== bug.cc: In member function 'virtual C* Y::_ZTch0_h8_N1Y3fooEi(int)': bug.cc:15:37: error: invalid argument to gimple call C* Y::foo(volatile int) { return 0; } ^ D.2311 retval.0_3 ={v} Y::foo (this_2(D), D.2311); bug.cc:15:37: internal compiler error: verify_gimple failed 0xba3116 verify_gimple_in_cfg(function*) ../../gcc/gcc/tree-cfg.c:4854 0xacafe2 execute_function_todo ../../gcc/gcc/passes.c:1850 0xacb933 execute_todo ../../gcc/gcc/passes.c:1884 Please submit a full bug report, [etc.]