http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46360
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-08 19:18:37 UTC --- Reduced testcase (fails without any options, -Wwrite-strings is not needed): __attribute__((gnu_inline, always_inline)) extern inline char * strncpy (char *dest, const char *src, __SIZE_TYPE__ len) { return __builtin_strncpy (dest, src, len); } void foo (char *s) { strncpy (s, "", 0); } The problem is the fold_stmt Honza added to gimplify_call_expr. Unfortunately fold_stmt doesn't expect it is being called when still not in SSA form. Seems gimplify_and_update_call_from_tree has been adjusted for that in PR45073, but update_call_from_tree still needs doing that. Will work on it tomorrow.