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 ipa/70646] [4.9/5/6 Regression] Corrupt truncated function


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

--- Comment #36 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Author: jamborm
Date: Thu May 19 15:09:21 2016
New Revision: 236473

URL: https://gcc.gnu.org/viewcvs?rev=236473&root=gcc&view=rev
Log:
[PR 70646] Store size to inlining predicate conditions

2016-05-19  Martin Jambor  <mjambor@suse.cz>

        PR ipa/70646
        * ipa-inline.h (condition): New field size.
        * ipa-inline-analysis.c (add_condition): New parameter SIZE, use it
        for comaprison and store it into the new condition.
        (evaluate_conditions_for_known_args): Use condition size to check
        access sizes for all but CHANGED conditions.
        (unmodified_parm_1): New parameter size_p, store access size into it.
        (unmodified_parm): Likewise.
        (unmodified_parm_or_parm_agg_item): Likewise.
        (eliminated_by_inlining_prob): Pass NULL to unmodified_parm as size_p.
        (set_cond_stmt_execution_predicate): Extract access sizes and store
        them to conditions.
        (set_switch_stmt_execution_predicate): Likewise.
        (will_be_nonconstant_expr_predicate): Likewise.
        (will_be_nonconstant_predicate): Likewise.
        (inline_read_section): Stream condition size.
        (inline_write_summary): Likewise.
        * lto-streamer.h (LTO_minor_version): Bump.

testsuite/
        * gcc.dg/ipa/pr70646.c: New test.


Added:
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/ipa/pr70646.c
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/ipa-inline-analysis.c
    branches/gcc-5-branch/gcc/ipa-inline.h
    branches/gcc-5-branch/gcc/lto-streamer.h
    branches/gcc-5-branch/gcc/testsuite/ChangeLog

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