https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85156

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Apr  3 21:42:51 2018
New Revision: 259057

URL: https://gcc.gnu.org/viewcvs?rev=259057&root=gcc&view=rev
Log:
        PR tree-optimization/85156
        * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
        evaluating the argument multiple times.

        * c-c++-common/pr85156.c: New test.
        * gcc.c-torture/execute/pr85156.c: New test.

Added:
    trunk/gcc/testsuite/c-c++-common/pr85156.c
    trunk/gcc/testsuite/gcc.c-torture/execute/pr85156.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to