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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Jambor <jamb...@gcc.gnu.org>:

https://gcc.gnu.org/g:9707b593f88041e74e5cf5640ec64fea13a0387c

commit r10-7719-g9707b593f88041e74e5cf5640ec64fea13a0387c
Author: Martin Jambor <mjam...@suse.cz>
Date:   Tue Apr 14 19:26:04 2020 +0200

    ipa-sra: Fix treatment of internal functions (PR 94434)

    IPA-SRA can segfault when processing a call to an internal function
    because such calls do not have corresponding call graphs and should be
    treated like memory accesses anyway, which what the patch below does.

    The patch makes an attempt to differentiate between reads and writes,
    although for things passed by value it does not make any difference.
    It treats all arguments of functions denoted with internal_store_fn_p
    as written to, even though in practice only some are, but for IPA-SRA
    purposes, actions needed to be taken when processing a read are also
    always performed when analyzing a write, so the code is just slightly
    pessimistic.  But not as pessimistic as bailing out on any internal
    call immediately.

    I have LTO bootstrapped and tested the patch on x86_64-linux and
    normally bootstrapped and tested it on aarch64-linux, although one
    which is not SVE capable.  I would appreciate testing on such machine
    too - as well as a small testcase that would follow all relevant
    conventions in gcc.target/aarch64/sve.

    2020-04-14  Martin Jambor  <mjam...@suse.cz>

            PR ipa/94434
            * ipa-sra.c: Include internal-fn.h.
            (enum isra_scan_context): Update comment.
            (scan_function): Treat calls to internal_functions like loads or
stores.

Reply via email to