From 42ae387068be90759ead414855ecd14e933b0a4e Mon Sep 17 00:00:00 2001
From: Arnaud Charlet <charlet@gcc.gnu.org>
Date: Wed, 6 Feb 2013 12:13:07 +0100
Subject: [multiple changes]

2013-02-06  Vincent Celier  <celier@adacore.com>

	* prj-proc.adb (Process_Aggregated_Projects): Use a new project
	node tree for each project tree rooted at an aggregated project.

2013-02-06  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_util.adb (Is_Interface_Conversion): New routine.
	(Object_Access_Level): Detect an interface conversion
	that has been rewritten into a different construct. Use the
	original form of the conversion to find the access level of
	the operand.

2013-02-06  Eric Botcazou  <ebotcazou@adacore.com>

	* einfo.ads (Has_Pragma_No_Inline): New flag using Flag201.
	(Has_Pragma_No_Inline): Declare and mark as inline.
	(Set_Has_Pragma_No_Inline): Likewise.
	* einfo.adb (Has_Pragma_No_Inline): New function.
	(Set_Has_Pragma_No_Inline): New procedure.
	(Write_Entity_Flags): Handle Has_Pragma_No_Inline.
	* snames.ads-tmpl (Name_No_Inline): New pragma-related name.
	(Pragma_Id): Add Pragma_No_Inline value.
	* par-prag.adb (Prag): Handle Pragma_Inline.
	* sem_prag.adb (Inline_Status): New enumeration type.
	(Process_Inline): Change Active parameter
	to Inline_Status and add support for suppressed inlining.
	(Analyze_Pragma) <Pragma_Inline>: Adjust to above change.
	<Pragma_Inline_Always>: Likewise.
	 <Pragma_No_Inline>: Implement new pragma No_Inline.
	(Sig_Flags): Add Pragma_No_Inline.
	* gnat_rm.texi (Implementation Defined Pragmas): Add No_Inline.
	* gnat_ugn.texi (Switches for gcc): Mention Pragma No_Inline.

2013-02-06  Pascal Obry  <obry@adacore.com>

	* s-osprim-mingw.adb (Clock): Make sure we copy all data locally
	to avoid interleaved modifications that could happen from another
	task calling Get_Base_Data.
	(Get_Base_Data): Make it a critical section. Avoid updating if another
	task has already done it.

From-SVN: r195801
---
 gcc/ada/gcc-interface/utils.c | 30 +++++++++++++++++++++++-------
 1 file changed, 23 insertions(+), 7 deletions(-)

(limited to 'gcc/ada/gcc-interface/utils.c')

diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 309cff6..0906c0c 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -6,7 +6,7 @@
  *                                                                          *
  *                          C Implementation File                           *
  *                                                                          *
- *          Copyright (C) 1992-2012, Free Software Foundation, Inc.         *
+ *          Copyright (C) 1992-2013, Free Software Foundation, Inc.         *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
@@ -2621,14 +2621,14 @@ create_label_decl (tree label_name, Node_Id gnat_node)
    node), PARAM_DECL_LIST is the list of the subprogram arguments (a list of
    PARM_DECL nodes chained through the DECL_CHAIN field).
 
-   INLINE_FLAG, PUBLIC_FLAG, EXTERN_FLAG, ARTIFICIAL_FLAG and ATTR_LIST are
+   INLINE_STATUS, PUBLIC_FLAG, EXTERN_FLAG, ARTIFICIAL_FLAG and ATTR_LIST are
    used to set the appropriate fields in the FUNCTION_DECL.  GNAT_NODE is
    used for the position of the decl.  */
 
 tree
 create_subprog_decl (tree subprog_name, tree asm_name, tree subprog_type,
-		     tree param_decl_list, bool inline_flag, bool public_flag,
-		     bool extern_flag, bool artificial_flag,
+ 		     tree param_decl_list, enum inline_status_t inline_status,
+		     bool public_flag, bool extern_flag, bool artificial_flag,
 		     struct attrib *attr_list, Node_Id gnat_node)
 {
   tree subprog_decl = build_decl (input_location, FUNCTION_DECL, subprog_name,
@@ -2642,7 +2642,7 @@ create_subprog_decl (tree subprog_name, tree asm_name, tree subprog_type,
      function in the current unit since it is private to the other unit.
      We could inline the nested function as well but it's probably better
      to err on the side of too little inlining.  */
-  if (!inline_flag
+  if (inline_status != is_enabled
       && !public_flag
       && current_function_decl
       && DECL_DECLARED_INLINE_P (current_function_decl)
@@ -2651,8 +2651,24 @@ create_subprog_decl (tree subprog_name, tree asm_name, tree subprog_type,
 
   DECL_ARTIFICIAL (subprog_decl) = artificial_flag;
   DECL_EXTERNAL (subprog_decl) = extern_flag;
-  DECL_DECLARED_INLINE_P (subprog_decl) = inline_flag;
-  DECL_NO_INLINE_WARNING_P (subprog_decl) = inline_flag && artificial_flag;
+
+  switch (inline_status)
+    {
+    case is_suppressed:
+      DECL_UNINLINABLE (subprog_decl) = 1;
+      break;
+
+    case is_disabled:
+      break;
+
+    case is_enabled:
+      DECL_DECLARED_INLINE_P (subprog_decl) = 1;
+      DECL_NO_INLINE_WARNING_P (subprog_decl) = artificial_flag;
+      break;
+
+    default:
+      gcc_unreachable ();
+    }
 
   TREE_PUBLIC (subprog_decl) = public_flag;
   TREE_READONLY (subprog_decl) = TYPE_READONLY (subprog_type);
-- 
cgit v1.1