* gnat1drv.adb (Gnat1drv): Set operating mode to Generate_Code when
CodePeer_Mode is set, to benefit from full front-end expansion
(e.g. generics).
2009-07-20 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb: Add guard.
* exp_disp.adb, sem_disp.adb (Make_DT): Check underlying view of type
for possible attribute definition of External_Tag, in case clause
appears in the private part of a package.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149816
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-07-20 Arnaud Charlet <charlet@adacore.com>
+
+ * gnat1drv.adb (Gnat1drv): Set operating mode to Generate_Code when
+ CodePeer_Mode is set, to benefit from full front-end expansion
+ (e.g. generics).
+
+2009-07-20 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_res.adb: Add guard.
+
+ * exp_disp.adb, sem_disp.adb (Make_DT): Check underlying view of type
+ for possible attribute definition of External_Tag, in case clause
+ appears in the private part of a package.
+
2009-07-20 Jerome Guitton <guitton@adacore.com>
* gcc-interface/Makefile.in: cleanup powerpc linux target pairs.
-- specific tagged type, as opposed to one of its ancestors.
-- If the type is an unconstrained type extension, we are building the
-- dispatch table of its anonymous base type, so the external tag, if
- -- any was specified, must be retrieved from the first subtype.
+ -- any was specified, must be retrieved from the first subtype. Go to
+ -- the full view in case the clause is in the private part.
else
declare
Def : constant Node_Id := Get_Attribute_Definition_Clause
- (First_Subtype (Typ),
+ (Underlying_Type (First_Subtype (Typ)),
Attribute_External_Tag);
Old_Val : String_Id;
Polling_Required := False;
- -- Set operating mode to check semantics with full front-end
- -- expansion, but no back-end code generation.
+ -- Set operating mode to Generate_Code to benefit from full
+ -- front-end expansion (e.g. generics).
- Operating_Mode := Check_Semantics;
- Debug_Flag_X := True;
+ Operating_Mode := Generate_Code;
-- We need SCIL generation of course
and then (Is_Class_Wide_Type (Designated_Type (A_Typ))
or else (Nkind (A) = N_Attribute_Reference
and then
- Is_Class_Wide_Type (Etype (Prefix (A)))))
+ Is_Class_Wide_Type (Etype (Prefix (A)))))
and then not Is_Class_Wide_Type (Designated_Type (F_Typ))
and then not Is_Controlling_Formal (F)
- -- Disable these checks in imported C++ subprograms
+ -- Disable these checks for call to imported C++ subprograms
- and then not (Is_Imported (Entity (Name (N)))
- and then Convention (Entity (Name (N)))
- = Convention_CPP)
+ and then not
+ (Is_Entity_Name (Name (N))
+ and then Is_Imported (Entity (Name (N)))
+ and then Convention (Entity (Name (N))) = Convention_CPP)
then
Error_Msg_N
("access to class-wide argument not allowed here!", A);