+ return node;
+
+ default:
+ break;
+ }
+
+ break;
+
+ case DECL_STMT:
+ /* We cannot inline functions that contain other functions. */
+ if (TREE_CODE (TREE_OPERAND (node, 0)) == FUNCTION_DECL
+ && DECL_INITIAL (TREE_OPERAND (node, 0)))
+ return node;
+ break;
+
+ case GOTO_STMT:
+ case GOTO_EXPR:
+ t = TREE_OPERAND (node, 0);
+
+ /* We will not inline a function which uses computed goto. The
+ addresses of its local labels, which may be tucked into
+ global storage, are of course not constant across
+ instantiations, which causes unexpected behaviour. */
+ if (TREE_CODE (t) != LABEL_DECL)
+ return node;
+
+ /* We cannot inline a nested function that jumps to a nonlocal
+ label. */
+ if (TREE_CODE (t) == LABEL_DECL
+ && DECL_CONTEXT (t) && DECL_CONTEXT (t) != fn)
+ return node;
+
+ break;
+
+ default:
+ break;
+ }
+
+ return NULL_TREE;
+}
+
+static int
+c_cannot_inline_tree_fn (fnp)
+ tree *fnp;
+{
+ tree fn = *fnp;
+ tree t;
+
+ if (! function_attribute_inlinable_p (fn))
+ {
+ DECL_UNINLINABLE (fn) = 1;
+ return 1;
+ }
+
+ /* If a function has pending sizes, we must not defer its
+ compilation, and we can't inline it as a tree. */
+ if (fn == current_function_decl)
+ {
+ t = get_pending_sizes ();
+ put_pending_sizes (t);
+
+ if (t)
+ {
+ DECL_UNINLINABLE (fn) = 1;
+ return 1;
+ }
+ }
+
+ if (DECL_CONTEXT (fn))
+ {
+ /* If a nested function has pending sizes, we may have already
+ saved them. */
+ if (DECL_LANG_SPECIFIC (fn)->pending_sizes)
+ {
+ DECL_UNINLINABLE (fn) = 1;
+ return 1;
+ }
+ }
+ else
+ {
+ /* We rely on the fact that this function is called upfront,
+ just before we start expanding a function. If FN is active
+ (i.e., it's the current_function_decl or a parent thereof),
+ we have to walk FN's saved tree. Otherwise, we can safely
+ assume we have done it before and, if we didn't mark it as
+ uninlinable (in which case we wouldn't have been called), it
+ is inlinable. Unfortunately, this strategy doesn't work for
+ nested functions, because they're only expanded as part of
+ their enclosing functions, so the inlinability test comes in
+ late. */
+ t = current_function_decl;
+
+ while (t && t != fn)
+ t = DECL_CONTEXT (t);
+ if (! t)
+ return 0;
+ }
+
+ if (walk_tree (&DECL_SAVED_TREE (fn), inline_forbidden_p, fn, NULL))
+ {
+ DECL_UNINLINABLE (fn) = 1;
+ return 1;
+ }
+
+ return 0;