https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70747
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2016-04-21 Component|c |middle-end Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Target Milestone|--- |6.0 Summary|ICE on valid code on |[6/7 Regression] ICE on |x86_64-linux-gnu: |valid code on |verify_gimple failed |x86_64-linux-gnu: | |verify_gimple failed Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. The GENERIC looks like ;; Function fn1 (null) ;; enabled by -tree-original { a = (int *) __builtin_malloc (8); b = 0, 0; } which is already odd. fold produces this via if (TREE_CODE_CLASS (code) == tcc_binary || TREE_CODE_CLASS (code) == tcc_comparison) { ... if (TREE_CODE (arg1) == COMPOUND_EXPR && reorder_operands_p (arg0, TREE_OPERAND (arg1, 0))) { tem = fold_build2_loc (loc, code, type, op0, fold_convert_loc (loc, TREE_TYPE (op1), TREE_OPERAND (arg1, 1))); return build2_loc (loc, COMPOUND_EXPR, type, TREE_OPERAND (arg1, 0), tem); } and the issue is that type is int while the comparison folding producing tem returns a bool via fold_comparison: 8684 switch (code) 8685 { 8686 case EQ_EXPR: 8687 case LE_EXPR: 8688 case LT_EXPR: 8689 return boolean_false_node;