https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70267
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|tree-optimization |c++ --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- (gdb) p debug_gimple_stmt (stmt) # VUSE <.MEM_3> f.0_4 = (struct Foo *) D.2296; is not valid gimple (but we fail to diagnose this). It converts <var_decl 0x7ffff7fefea0 D.2296 type <record_type 0x7ffff69dfb28 Foo type_3 type_5 type_6 QI size <integer_cst 0x7ffff6887f48 constant 8> unit size <integer_cst 0x7ffff6887f60 constant 1> align 8 symtab 0 alias set -1 canonical type 0x7ffff69dfb28 fields <var_decl 0x7ffff7fefc60 class$ type <record_type 0x7ffff69df7e0 Class> public static external nonlocal decl_3 decl_5 decl_6 VOID file t.C line 24 col 34 align 8 context <record_type 0x7ffff69dfb28 Foo> chain <type_decl 0x7ffff69e0d10 Foo>> context <namespace_decl 0x7ffff69e0428 lang> full-name "class java::lang::Foo" X() n_parents=1 use_template=0 interface-unknown pointer_to_this <pointer_type 0x7ffff69f37e0> chain <type_decl 0x7ffff69e0a18 Foo>> ignored QI file t.C line 33 col 29 size <integer_cst 0x7ffff6887f48 8> unit size <integer_cst 0x7ffff6887f60 1> align 8 context <function_decl 0x7ffff69e2ee0 Bar4> chain <var_decl 0x7ffff69f9090 f.0>> to (struct Foo *). (void) (f = (struct Foo *) TARGET_EXPR <D.2296, _Jv_AllocObject (&_ZN4java4lang3Foo6class$E)>) maybe a ADDR_EXPR is missing around the TARGET_EXPR? Frontend issue. At -O0 we end up with <bb 2>: _Jv_AllocObject (&_ZN4java4lang3Foo6class$E); f.0_4 = (struct Foo *) D.2296; f = f.0_4; f.1_6 = f; _Jv_Throw (f.1_6); which obviously is bullshit.