diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ipa-cp.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7d75459..746b3fb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-09-07 Martin Jambor <mjambor@suse.cz> + + PR fortran/43665 + * ipa-cp.c (ipcp_versionable_function_p): Return false if there + are any type attributes. + 2010-09-07 Jan Hubicka <jh@suse.cz> * tree-ssa-ccp.c (fold_const_aggregate_ref): Fix handling of array_ref_low_bound diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index e6c67d6..e94fdca 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -427,8 +427,11 @@ ipcp_versionable_function_p (struct cgraph_node *node) { struct cgraph_edge *edge; - /* There are a number of generic reasons functions cannot be versioned. */ - if (!node->local.versionable) + /* There are a number of generic reasons functions cannot be versioned. We + also cannot remove parameters if there are type attributes such as fnspec + present. */ + if (!node->local.versionable + || TYPE_ATTRIBUTES (TREE_TYPE (node->decl))) return false; /* Removing arguments doesn't work if the function takes varargs |