This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/38454] [4.4 Regression] memcpy folding breaks -D_FORTIFY_SOURCE=2 protection



------- Comment #1 from jakub at gcc dot gnu dot org  2008-12-09 23:03 -------
Subject: Bug 38454

Author: jakub
Date: Tue Dec  9 23:01:15 2008
New Revision: 142617

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142617
Log:
        PR middle-end/38454
        * function.h (struct function): Add always_inline_functions_inlined.
        * ipa-inline.c (cgraph_early_inlining): Set it to true.
        * tree-optimize.c (execute_fixup_cfg): Likewise.
        * builtins.c (avoid_folding_inline_builtin): New function.
        (fold_call_expr): Don't optimize always_inline builtins before
        inlining.
        (fold_call_stmt): Likewise.
        (fold_builtin_call_array): Likewise.  Don't call
        fold_builtin_varargs for BUILT_IN_MD builtins.

        * gcc.dg/memset-1.c: New test.
        * gcc.dg/memcpy-2.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/memcpy-2.c
    trunk/gcc/testsuite/gcc.dg/memset-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/function.h
    trunk/gcc/ipa-inline.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-optimize.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38454


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]