* adadecode.h, adadecode.c (ada_demangle): Remove
ada_demangle, no longer used.
* a-except-2005.adb: Bring System.Traceback.Symbolic into the
closure.
2015-10-16 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb, sem_util.ads (Get_Reference_Discriminant): Utility to
locate the access discriminant that supports implicit dereference on a
record type.
(Is_OK_Variable_For_Out_Parameter): Reject other illegal uses
of Implicit_Dereference on an access_to_constant when actual
parameter is a rewritten variable or function call.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228886
138bc75d-0d04-0410-961f-
82ee72b054a4
2015-10-16 Bob Duff <duff@adacore.com>
+ * adadecode.h, adadecode.c (ada_demangle): Remove
+ ada_demangle, no longer used.
+ * a-except-2005.adb: Bring System.Traceback.Symbolic into the
+ closure.
+
+2015-10-16 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_util.adb, sem_util.ads (Get_Reference_Discriminant): Utility to
+ locate the access discriminant that supports implicit dereference on a
+ record type.
+ (Is_OK_Variable_For_Out_Parameter): Reject other illegal uses
+ of Implicit_Dereference on an access_to_constant when actual
+ parameter is a rewritten variable or function call.
+
+2015-10-16 Bob Duff <duff@adacore.com>
+
* a-tags.adb, s-trasym.adb, s-trasym.ads: Make sure we don't get
elaboration circularities when polling is turned on.
with System.WCh_Con; use System.WCh_Con;
with System.WCh_StW; use System.WCh_StW;
+pragma Warnings (Off);
+-- Suppress complaints about Symbolic not being referenced, and about it not
+-- having pragma Preelaborate.
+with System.Traceback.Symbolic;
+-- Bring Symbolic into the closure. If it is the s-trasym-dwarf.adb version,
+-- it will install symbolic tracebacks as the default decorator. Otherwise,
+-- symbolic tracebacks are not supported, and we fall back to hexadecimal
+-- addresses.
+pragma Warnings (On);
+
package body Ada.Exceptions is
pragma Suppress (All_Checks);
extern "C" {
#endif
-#ifdef IN_RTS
-char *
-ada_demangle (const char *coded_name)
-{
- char ada_name[2048];
-
- __gnat_decode (coded_name, ada_name, 0);
- return xstrdup (ada_name);
-}
-#endif
-
void
get_encoding (const char *coded_name, char *encoding)
{
* *
* C Header File *
* *
- * Copyright (C) 2001-2011, Free Software Foundation, Inc. *
+ * Copyright (C) 2001-2015, 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- *
from the encoded form. The Ada encodings are described in exp_dbug.ads. */
extern void get_encoding (const char *, char *);
-/* ada_demangle is added for COMPATIBILITY ONLY. It has the name of the
- function used in the binutils and GDB. Always consider using __gnat_decode
- instead of ada_demangle. Caller must free the pointer returned. */
-extern char *ada_demangle (const char *);
-
#ifdef __cplusplus
}
#endif
end if;
end Get_Reason_String;
+ --------------------------------
+ -- Get_Reference_Discriminant --
+ --------------------------------
+
+ function Get_Reference_Discriminant (Typ : Entity_Id) return Entity_Id is
+ D : Entity_Id;
+ begin
+ D := First_Discriminant (Typ);
+ while Present (D) loop
+ if Has_Implicit_Dereference (D) then
+ return D;
+ end if;
+ Next_Discriminant (D);
+ end loop;
+
+ -- Type must have a proper access discriminant.
+
+ pragma Assert (False);
+ end Get_Reference_Discriminant;
+
---------------------------
-- Get_Referenced_Object --
---------------------------
and then
Has_Implicit_Dereference (Etype (Name (Original_Node (AV))))
then
- return True;
+
+ -- Check that this is not a constant reference.
+
+ return not Is_Access_Constant (Etype (Prefix (AV)));
+
+ elsif Has_Implicit_Dereference (Etype (Original_Node (AV))) then
+ return
+ not Is_Access_Constant (Etype
+ (Get_Reference_Discriminant (Etype (Original_Node (AV)))));
else
return Is_OK_Variable_For_Out_Formal (Original_Node (AV));
-- literal or concatenation of string literals. An error is given for
-- any other form.
+ function Get_Reference_Discriminant (Typ : Entity_Id) return Entity_Id;
+ -- If Typ has Implicit_Dereference, return discriminant specified in
+ -- the corresponding aspect.
+
function Get_Referenced_Object (N : Node_Id) return Node_Id;
-- Given a node, return the renamed object if the node represents a renamed
-- object, otherwise return the node unchanged. The node may represent an