[Bug c++/67529] rx-elf C++ inherited class malformed call to overridden methods

ericns1 at spirilis dot net gcc-bugzilla@gcc.gnu.org
Wed Sep 9 20:23:00 GMT 2015


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

--- Comment #3 from Eric <ericns1 at spirilis dot net> ---
Further clarifying, creating a whole new function "void check2(void)" inside
MyTemplate which did *not* exist as a virtual function inside MyTemplateParent
produces correct code when begin(uint8_t) tries to call it:


 ;(call_insn 12 11 15 (parallel [
 ;            (call (mem:QI (symbol_ref/i:SI ("_ZN10MyTemplate6check2Ev")
[flags 0x3] <function_decl 0x7fa8b79c45e8 check2>) [0 check2 S1 A8])
 ;                (const_int 0 [0]))
 ;            (clobber (reg:CC 16 cc))
 ;        ]) my_template.h:34 18 {call_internal}
 ;     (expr_list:REG_EH_REGION (const_int 0 [0])
 ;        (nil))
 ;    (expr_list:SI (use (reg:SI 1 r1))
 ;        (nil)))
        bsr     __ZN10MyTemplate6check2Ev        ; 12   call_internal/2 [length
= 4]



More information about the Gcc-bugs mailing list