]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/43665 (INTENT(IN) etc. optimization of calls: function annotations...
authorMartin Jambor <mjambor@suse.cz>
Tue, 7 Sep 2010 17:00:44 +0000 (19:00 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Tue, 7 Sep 2010 17:00:44 +0000 (19:00 +0200)
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.

From-SVN: r163960

gcc/ChangeLog
gcc/ipa-cp.c

index 7d75459163edeb8a9454d9e9b5ab2196d6b1a872..746b3fbdd76e6105ebce5cf72e272de0df4bbdc8 100644 (file)
@@ -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
index e6c67d62653e8a78f51d8575168e190a8325a07f..e94fdca9d3b9a1495541ceee26164ddae7140417 100644 (file)
@@ -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