https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115641
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- I think that arg:0 <addr_expr 0x7ffff6e1fcc0 type <pointer_type 0x7ffff6e4f1f8 type <record_type 0x7ffff6e49f18 T> unsigned DI size <integer_cst 0x7ffff700bf48 constant 64> unit-size <integer_cst 0x7ffff700bf60 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff6e4f2a0> readonly arg:0 <call_expr 0x7ffff6e3cf90 type <record_type 0x7ffff6e49f18 T> readonly fn <addr_expr 0x7ffff6e1fb60 type <pointer_type 0x7ffff6e4f000> readonly constant arg:0 <function_decl 0x7ffff6e46f00 f> t.c:25:7 start: t.c:25:7 finish: t.c:25:7> t.c:25:7 start: t.c:25:7 finish: t.c:25:10>> aka &f () is invalid GENERIC. That call needs to be wrapped in a TARGET_EXPR or something similar. That ADDR_EXPR is built from #0 0x000000000121075e in make_bit_field_ref (loc=2147483940, inner=<call_expr 0x7ffff6e3cf90>, orig_inner=<component_ref 0x7ffff6e3cfc0>, type=<integer_type 0x7ffff702b540 short unsigned int>, bitsize=16, bitpos=..., unsignedp=0, reversep=0) at /space/rguenther/src/gcc/gcc/fold-const.cc:4718 #1 0x0000000001219fef in fold_truth_andor_1 (loc=2147483940, code=TRUTH_OR_EXPR, truth_type=<integer_type 0x7ffff702b5e8 int>, lhs=<ne_expr 0x7ffff6e4adc0>, rhs=<ne_expr 0x7ffff6e4ade8>) at /space/rguenther/src/gcc/gcc/fold-const.cc:6934 #2 0x0000000001228073 in fold_truth_andor (loc=2147483940, code=TRUTH_ORIF_EXPR, type=<integer_type 0x7ffff702b5e8 int>, arg0=<ne_expr 0x7ffff6e4adc0>, arg1=<ne_expr 0x7ffff6e4ade8>, op0=<ne_expr 0x7ffff6e4adc0>, op1=<ne_expr 0x7ffff6e4ade8>) at /space/rguenther/src/gcc/gcc/fold-const.cc:9983 #3 0x0000000001235b31 in fold_binary_loc (loc=2147483940, code=TRUTH_ORIF_EXPR, type=<integer_type 0x7ffff702b5e8 int>, op0=<ne_expr 0x7ffff6e4adc0>, op1=<ne_expr 0x7ffff6e4ade8>) at /space/rguenther/src/gcc/gcc/fold-const.cc:12543 #4 0x000000000123cbad in fold_build2_loc (loc=2147483940, code=TRUTH_ORIF_EXPR, type=<integer_type 0x7ffff702b5e8 int>, op0=<ne_expr 0x7ffff6e4adc0>, op1=<ne_expr 0x7ffff6e4ade8>) at /space/rguenther/src/gcc/gcc/fold-const.cc:14222 #5 0x0000000000e9d19b in c_fully_fold_internal ( expr=<truth_orif_expr 0x7ffff6e4ac58>, in_init=false, maybe_const_operands=0x7fffffffd367, maybe_const_itself=0x7fffffffd364, for_int_const=false, lval=false) at /space/rguenther/src/gcc/gcc/c/c-fold.cc:552 the f ().day GENERIC tree is border-line with no decl visible. At least we don't want to introduce that via a TARGET_EXPR during folding. I have a patch to simply reject it.