http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60256
--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Marek Polacek from comment #5) > We call c_fully_fold on strcpy (s, s);, and because this CALL_EXPR is > tcc_vl_exp, we call fold () on it. fold () then via fold_call_expr -> ... > calls fold_builtin_strcpy and that hits > /* If SRC and DEST are the same (and not volatile), return DEST. */ > if (operand_equal_p (src, dest, 0)) > return fold_convert_loc (loc, TREE_TYPE (TREE_TYPE (fndecl)), dest); > > But on second thought, delayed folding won't help, as uninit passes are run > quite late and at that point strcpy(s, s); will be already gone. That is what I was afraid. On the other hand, this is such a particular testcase that I think it is better to focus on other more critical diagnostic issues.