* sem_util.adb (Is_Iterator, Is_Reversible_iterator): Use
root type to determine whether the type is a descendant of the
corresponding interface type, so take into account multiple
levels of subtypes and derivations.
2015-10-23 Olivier Hainque <hainque@adacore.com>
* tracebak.c: Refine selection of GCC/GENERIC_UNWINDER for
tracebacks on x86 & x86_64.
(x86 & x86_64): If !SJLJ, always pick the
GCC_UNWINDER for x86_64 (not only on linux).
* sem_util.ads: Minor fix in comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229239
138bc75d-0d04-0410-961f-
82ee72b054a4
+2015-10-23 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_util.adb (Is_Iterator, Is_Reversible_iterator): Use
+ root type to determine whether the type is a descendant of the
+ corresponding interface type, so take into account multiple
+ levels of subtypes and derivations.
+
+2015-10-23 Olivier Hainque <hainque@adacore.com>
+
+ * tracebak.c: Refine selection of GCC/GENERIC_UNWINDER for
+ tracebacks on x86 & x86_64.
+ (x86 & x86_64): If !SJLJ, always pick the
+ GCC_UNWINDER for x86_64 (not only on linux).
+ * sem_util.ads: Minor fix in comment.
+
2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Pragma): Pragma Volatile_Function should
Iface : Entity_Id;
begin
+ -- The type may be a subtype of a descendant of the proper instance of
+ -- the predefined interface type, so we must use the root type of the
+ -- given type. The same us done for Is_Reversible_Iterator.
+
if Is_Class_Wide_Type (Typ)
- and then Nam_In (Chars (Etype (Typ)), Name_Forward_Iterator,
+ and then Nam_In (Chars (Root_Type (Typ)), Name_Forward_Iterator,
Name_Reversible_Iterator)
and then
Is_Predefined_File_Name
- (Unit_File_Name (Get_Source_Unit (Etype (Typ))))
+ (Unit_File_Name (Get_Source_Unit (Root_Type (Typ))))
then
return True;
begin
if Is_Class_Wide_Type (Typ)
- and then Chars (Etype (Typ)) = Name_Reversible_Iterator
+ and then Chars (Root_Type (Typ)) = Name_Reversible_Iterator
and then Is_Predefined_File_Name
- (Unit_File_Name (Get_Source_Unit (Etype (Typ))))
+ (Unit_File_Name (Get_Source_Unit (Root_Type (Typ))))
then
return True;
-- Determines if Current_Scope is within an init proc
function Within_Scope (E : Entity_Id; S : Entity_Id) return Boolean;
- -- Returns True if entity Id is declared within scope S
+ -- Returns True if entity E is declared within scope S
procedure Wrong_Type (Expr : Node_Id; Expected_Type : Entity_Id);
-- Output error message for incorrectly typed expression. Expr is the node
but our only alternative is the generic unwinder which requires
compilation forcing a frame pointer to be reliable. */
-#if defined (__linux__) && !defined (__USING_SJLJ_EXCEPTIONS__)
+#if (defined (__x86_64__) || defined (__linux__)) && !defined (__USING_SJLJ_EXCEPTIONS__)
#define USE_GCC_UNWINDER
#else
#define USE_GENERIC_UNWINDER