re PR middle-end/23484 (__builtin___memcpy_chk miscompilation)
PR middle-end/23484 * builtins.c (fold_builtin_memory_chk, fold_builtin_stxcpy_chk, fold_builtin_strncpy_chk, fold_builtin_snprintf_chk): If len is not constant, but maxlen is, don't set len to maxlen, rather set maxlen to len if len is a constant. * gcc.c-torture/execute/builtins/pr23484-chk.c: New test. * gcc.c-torture/execute/builtins/pr23484-chk-lib.c: New file. From-SVN: r103594
Showing
Please
register
or
sign in
to comment