diff options
author | Jakub Jelinek <jakub@redhat.com> | 2014-02-08 00:54:17 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2014-02-08 00:54:17 +0100 |
commit | d31d42c74d6f47d4f2082f7675f292be4af951d4 (patch) | |
tree | 9b5119f7b1533c1ecdfc45c6698e6808c2a93959 /gcc/ipa-cp.c | |
parent | a0a98fef260011c6f0bf60fd76a1f05399d90b98 (diff) | |
download | gcc-d31d42c74d6f47d4f2082f7675f292be4af951d4.zip gcc-d31d42c74d6f47d4f2082f7675f292be4af951d4.tar.gz gcc-d31d42c74d6f47d4f2082f7675f292be4af951d4.tar.bz2 |
re PR ipa/60026 (ICE at -O3 on valid code (with the optimize pragma) on x86_64-linux-gnu)
PR ipa/60026
* ipa-cp.c (determine_versionability): Fail at -O0
or __attribute__((optimize (0))) or -fno-ipa-cp functions.
* tree-sra.c (ipa_sra_preliminary_function_checks): Similarly.
Revert:
2014-02-04 Jakub Jelinek <jakub@redhat.com>
PR ipa/60026
* tree-inline.c (copy_forbidden): Fail for
__attribute__((optimize (0))) functions.
From-SVN: r207621
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r-- | gcc/ipa-cp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index a2682bb..d93b45c 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -430,6 +430,9 @@ determine_versionability (struct cgraph_node *node) reason = "not a tree_versionable_function"; else if (cgraph_function_body_availability (node) <= AVAIL_OVERWRITABLE) reason = "insufficient body availability"; + else if (!opt_for_fn (node->decl, optimize) + || !opt_for_fn (node->decl, flag_ipa_cp)) + reason = "non-optimized function"; else if (lookup_attribute ("omp declare simd", DECL_ATTRIBUTES (node->decl))) { /* Ideally we should clone the SIMD clones themselves and create |