diff options
author | Jan Hubicka <jh@suse.cz> | 2008-09-17 17:00:59 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2008-09-17 15:00:59 +0000 |
commit | 0494626aae628174dd5d510d25a1fabac300387a (patch) | |
tree | 04fe9640a665ee7bf86c70b57f060c685b31ee95 /gcc/java | |
parent | 1c1b0507d40b99ad6356f8feb2b43430b30568bb (diff) | |
download | gcc-0494626aae628174dd5d510d25a1fabac300387a.zip gcc-0494626aae628174dd5d510d25a1fabac300387a.tar.gz gcc-0494626aae628174dd5d510d25a1fabac300387a.tar.bz2 |
re PR middle-end/18071 (-Winline does not respect -fno-default-inline)
PR c++/18071
* tree.h (DECL_INLINE): remove.
(DECL_DECLARED_INLINE_P): Update docs.
(DECL_NO_INLINE_WARNING_P): new.
(tree_function_decl): Replace inline_flag by no_inline_warning_flag.
* tree-inline.c (inlinable_function_p): Set DECL_NO_INLINE_WARNING_P.
Java:
* class.c (add_method_1): Do not initialize DECL_INLINE.
(make_local_function_alias): Likewise.
* expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
* lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
Objc:
* objc/objc-act.c (objc_finish_method_definition): Do not set DECL_INLINE.
C++:
* cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
From-SVN: r140418
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/java/class.c | 7 | ||||
-rw-r--r-- | gcc/java/expr.c | 4 | ||||
-rw-r--r-- | gcc/java/lang.c | 2 |
4 files changed, 14 insertions, 7 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index c88eca6..c5a9ecf 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,11 @@ +2008-09-17 Jan Hubicka <jh@suse.cz> + + PR c++/18071 + * class.c (add_method_1): Do not initialize DECL_INLINE. + (make_local_function_alias): Likewise. + * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE. + * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE. + 2008-09-09 Richard Guenther <rguenther@suse.de> * decl.c (build_result_decl): Remove no longer applicable diff --git a/gcc/java/class.c b/gcc/java/class.c index 647da9a..13cc54e 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -795,7 +795,7 @@ add_method_1 (tree this_class, int access_flags, tree name, tree function_type) if (access_flags & ACC_PUBLIC) METHOD_PUBLIC (fndecl) = 1; if (access_flags & ACC_PROTECTED) METHOD_PROTECTED (fndecl) = 1; if (access_flags & ACC_PRIVATE) - METHOD_PRIVATE (fndecl) = DECL_INLINE (fndecl) = 1; + METHOD_PRIVATE (fndecl) = 1; if (access_flags & ACC_NATIVE) { METHOD_NATIVE (fndecl) = 1; @@ -806,9 +806,9 @@ add_method_1 (tree this_class, int access_flags, tree name, tree function_type) file. */ DECL_EXTERNAL (fndecl) = CLASS_FROM_CURRENTLY_COMPILED_P (this_class) == 0; if (access_flags & ACC_STATIC) - METHOD_STATIC (fndecl) = DECL_INLINE (fndecl) = 1; + METHOD_STATIC (fndecl) = 1; if (access_flags & ACC_FINAL) - METHOD_FINAL (fndecl) = DECL_INLINE (fndecl) = 1; + METHOD_FINAL (fndecl) = 1; if (access_flags & ACC_SYNCHRONIZED) METHOD_SYNCHRONIZED (fndecl) = 1; if (access_flags & ACC_ABSTRACT) METHOD_ABSTRACT (fndecl) = 1; if (access_flags & ACC_STRICT) METHOD_STRICTFP (fndecl) = 1; @@ -1393,7 +1393,6 @@ make_local_function_alias (tree method) TREE_PUBLIC (alias) = 0; DECL_EXTERNAL (alias) = 0; DECL_ARTIFICIAL (alias) = 1; - DECL_INLINE (alias) = 0; DECL_INITIAL (alias) = error_mark_node; TREE_ADDRESSABLE (alias) = 1; TREE_USED (alias) = 1; diff --git a/gcc/java/expr.c b/gcc/java/expr.c index ff28bbb..0882b520 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -2089,9 +2089,9 @@ rewrite_arglist_getcaller (tree arglist) tree retaddr = build_call_expr (built_in_decls[BUILT_IN_RETURN_ADDRESS], 1, integer_zero_node); - - DECL_INLINE (current_function_decl) = 0; + DECL_UNINLINABLE (current_function_decl) = 1; + return chainon (arglist, tree_cons (NULL_TREE, retaddr, NULL_TREE)); diff --git a/gcc/java/lang.c b/gcc/java/lang.c index d049aeb..af2ed80 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -845,7 +845,7 @@ static bool java_decl_ok_for_sibcall (const_tree decl) { return (decl != NULL && DECL_CONTEXT (decl) == output_class - && DECL_INLINE (decl)); + && !DECL_UNINLINABLE (decl)); } /* Given a call_expr, try to figure out what its target might be. In |