aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-nested.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2008-05-25 22:42:49 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2008-05-25 22:42:49 +0000
commit3651f7ad941bc7dd797d5e5948c9922da0fb6f8c (patch)
tree1a3f8d2557f13dd05aa93e2ca0e800b6a5a115c6 /gcc/tree-nested.c
parentb885a4c1e2ba31aacad53184599c8ae2fc1147e6 (diff)
downloadgcc-3651f7ad941bc7dd797d5e5948c9922da0fb6f8c.zip
gcc-3651f7ad941bc7dd797d5e5948c9922da0fb6f8c.tar.gz
gcc-3651f7ad941bc7dd797d5e5948c9922da0fb6f8c.tar.bz2
tree-nested.c (convert_tramp_reference): Do not build a trampoline if we don't want one.
* tree-nested.c (convert_tramp_reference) <ADDR_EXPR>: Do not build a trampoline if we don't want one. * varasm.c (initializer_constant_valid_p) <ADDR_EXPR>: Do not return zero for nested functions if we don't want a trampoline. ada/ * trans.c (Attribute_to_gnu) <Code_Address>: Set TREE_NO_TRAMPOLINE instead of TREE_STATIC on the ADDR_EXPR. From-SVN: r135884
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r--gcc/tree-nested.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index e333003..ded3c2b 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -1645,6 +1645,10 @@ convert_tramp_reference (tree *tp, int *walk_subtrees, void *data)
if (DECL_NO_STATIC_CHAIN (decl))
break;
+ /* If we don't want a trampoline, then don't build one. */
+ if (TREE_NO_TRAMPOLINE (t))
+ break;
+
/* Lookup the immediate parent of the callee, as that's where
we need to insert the trampoline. */
for (i = info; i->context != target_context; i = i->outer)