+2011-10-13 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
+ New predicate to determine whether some operations on an array
+ type are available when the full view of its component may differ
+ from the view of the point of the array declaration.
+ * sem_ch4.adb (Find_Equality_Types): Use
+ Available_Full_View_Of_Component.
+ * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
+
+2011-10-13 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch9.adb: Analyze aspects while discriminants of protected
+ type are visible.
+
+2011-10-13 Geert Bosch <bosch@adacore.com>
+
+ * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
+ a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
+ longer depend on an external library.
+ * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
+ a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
+ Update dependencies.
+ * gcc-interface/Make-lang.in: Update dependencies.
+
2011-10-13 Cyrille Comar <comar@adacore.com>
* gnat_ugn.texi: Minor editing.
a-ngcoty$(objext) \
a-ngelfu$(objext) \
a-ngrear$(objext) \
- a-nllrar$(objext) \
- a-nlrear$(objext) \
- a-nurear$(objext) \
a-nlcefu$(objext) \
+ a-nlcoar$(objext) \
a-nlcoty$(objext) \
a-nlelfu$(objext) \
+ a-nlrear$(objext) \
+ a-nllcar$(objext) \
a-nllcef$(objext) \
a-nllcty$(objext) \
a-nllefu$(objext) \
+ a-nllrar$(objext) \
a-nscefu$(objext) \
a-nscoty$(objext) \
a-nselfu$(objext) \
+ a-nucoar$(objext) \
a-nucoty$(objext) \
a-nudira$(objext) \
a-nuelfu$(objext) \
a-nuflra$(objext) \
a-numaux$(objext) \
a-numeri$(objext) \
+ a-nurear$(objext) \
a-rbtgbo$(objext) \
a-rbtgbk$(objext) \
a-rbtgso$(objext) \
s-fvadfl$(objext) \
s-fvaffl$(objext) \
s-fvagfl$(objext) \
+ s-gearop$(objext) \
s-geveop$(objext) \
s-gloloc$(objext) \
s-htable$(objext) \
ada/lib-list.adb ada/lib-load.ads ada/lib-sort.adb ada/lib-util.ads \
ada/lib-xref.ads ada/namet.ads ada/namet.adb ada/namet-sp.ads \
ada/nlists.ads ada/nlists.adb ada/nmake.ads ada/nmake.adb ada/opt.ads \
- ada/output.ads ada/par_sco.ads ada/put_alfa.ads ada/restrict.ads \
- ada/restrict.adb ada/rident.ads ada/rtsfind.ads ada/scans.ads \
- ada/sem.ads ada/sem.adb ada/sem_aggr.ads ada/sem_aggr.adb \
+ ada/opt.adb ada/output.ads ada/par_sco.ads ada/put_alfa.ads \
+ ada/restrict.ads ada/restrict.adb ada/rident.ads ada/rtsfind.ads \
+ ada/scans.ads ada/sem.ads ada/sem.adb ada/sem_aggr.ads ada/sem_aggr.adb \
ada/sem_attr.ads ada/sem_aux.ads ada/sem_aux.adb ada/sem_cat.ads \
ada/sem_ch10.ads ada/sem_ch11.ads ada/sem_ch12.ads ada/sem_ch13.ads \
ada/sem_ch13.adb ada/sem_ch2.ads ada/sem_ch3.ads ada/sem_ch4.ads \
endif
endif
EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
+ EXTRA_LIBGNAT_OBJS+=sigtramp-ppcvxw.o
+ EXTRA_LIBGNAT_SRCS+=sigtramp-ppcvxw.c
endif
endif
EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-vxwexc.o
EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
+ EXTRA_LIBGNAT_SRCS+=sigtramp-ppcvxw.c
+ EXTRA_LIBGNAT_OBJS+=sigtramp-ppcvxw.o
+
# Extra pairs for the vthreads runtime
ifeq ($(strip $(filter-out vthreads,$(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS += \
EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o s-thread.o s-vxwexc.o
EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o s-vxwext.o
- EXTRA_LIBGNAT_SRCS+=vx_stack_info.c
- EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
+ EXTRA_LIBGNAT_SRCS+=vx_stack_info.c sigtramp-ppcvxw.c
+ EXTRA_LIBGNAT_OBJS+=vx_stack_info.o sigtramp-ppcvxw.o
GNATRTL_SOCKETS_OBJS =
ifeq ($(strip $(filter-out yes,$(TRACE))),)
include $(fsrcdir)/ada/Makefile.rtl
-GNATRTL_LINEARALGEBRA_OBJS = a-nlcoar.o a-nllcar.o \
- a-nucoar.o i-forbla.o i-forlap.o s-gearop.o
+GNATRTL_LINEARALGEBRA_OBJS = i-forbla.o i-forlap.o
GNATRTL_OBJS = $(GNATRTL_NONTASKING_OBJS) $(GNATRTL_TASKING_OBJS) \
- $(GNATRTL_LINEARALGEBRA_OBJS) g-trasym.o memtrack.o
+ $(GNATRTL_LINEARALGEBRA_OBJS) memtrack.o
# Default run time files
for file in $(RTSDIR)/*.ali; do \
$(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
done
- -$(INSTALL_DATA) $(RTSDIR)/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
-cd $(RTSDIR); for file in *$(arext);do \
$(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
$(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
socket.o : socket.c gsocket.h
sysdep.o : sysdep.c
raise.o : raise.c raise.h
+sigtramp-ppcvxw.o : sigtramp-ppcvxw.c sigtramp.h
vx_stack_info.o : vx_stack_info.c
raise-gcc.o : raise-gcc.c raise.h
end if;
if T1 /= Standard_Void_Type
- and then not Is_Limited_Type (T1)
- and then not Is_Limited_Composite (T1)
and then Has_Compatible_Type (R, T1)
+ and then
+ ((not Is_Limited_Type (T1)
+ and then not Is_Limited_Composite (T1))
+
+ or else
+ (Is_Array_Type (T1)
+ and then not Is_Limited_Type (Component_Type (T1))
+ and then Available_Full_View_Of_Component (T1)))
then
if Found
and then Base_Type (T1) /= Base_Type (T_F)
begin
if No_Run_Time_Mode then
Error_Msg_CRT ("protected type", N);
- goto Leave;
+ if Has_Aspects (N) then
+ Analyze_Aspect_Specifications (N, Def_Id);
+ end if;
+
+ return;
end if;
Tasking_Used := True;
Next_Entity (E);
end loop;
+ -- If aspects are present, analyze them now. They can make references
+ -- to the discriminants of the type.
+
+ if Has_Aspects (N) then
+ Analyze_Aspect_Specifications (N, Def_Id);
+ end if;
+
End_Scope;
-- Case of a completion of a private declaration
Process_Full_View (N, T, Def_Id);
end if;
end if;
-
- <<Leave>>
- if Has_Aspects (N) then
- Analyze_Aspect_Specifications (N, Def_Id);
- end if;
end Analyze_Protected_Type_Declaration;
---------------------
function Valid_Boolean_Arg (T : Entity_Id) return Boolean is
begin
- return Is_Boolean_Type (T)
- or else T = Any_Composite
- or else (Is_Array_Type (T)
- and then T /= Any_String
- and then Number_Dimensions (T) = 1
- and then Is_Boolean_Type (Component_Type (T))
- and then (not Is_Private_Composite (T)
- or else In_Instance)
- and then (not Is_Limited_Composite (T)
- or else In_Instance))
+ if Is_Boolean_Type (T)
or else Is_Modular_Integer_Type (T)
- or else T = Universal_Integer;
+ or else T = Universal_Integer
+ or else T = Any_Composite
+ then
+ return True;
+
+ elsif Is_Array_Type (T)
+ and then T /= Any_String
+ and then Number_Dimensions (T) = 1
+ and then Is_Boolean_Type (Component_Type (T))
+ and then
+ ((not Is_Private_Composite (T)
+ and then not Is_Limited_Composite (T))
+ or else In_Instance
+ or else Available_Full_View_Of_Component (T))
+ then
+ return True;
+
+ else
+ return False;
+ end if;
end Valid_Boolean_Arg;
--------------------------
if T = Any_Composite then
return False;
+
elsif Is_Discrete_Type (T)
or else Is_Real_Type (T)
then
return True;
+
elsif Is_Array_Type (T)
and then Number_Dimensions (T) = 1
and then Is_Discrete_Type (Component_Type (T))
or else In_Instance)
then
return True;
+
+ elsif Is_Array_Type (T)
+ and then Number_Dimensions (T) = 1
+ and then Is_Discrete_Type (Component_Type (T))
+ and then Available_Full_View_Of_Component (T)
+ then
+ return True;
+
elsif Is_String_Type (T) then
return True;
else
end if;
end Apply_Compile_Time_Constraint_Error;
+ function Available_Full_View_Of_Component (T : Entity_Id) return Boolean is
+ ST : constant Entity_Id := Scope (T);
+ SCT : constant Entity_Id := Scope (Component_Type (T));
+
+ begin
+ return In_Open_Scopes (ST)
+ and then In_Open_Scopes (SCT)
+ and then Scope_Depth (ST) >= Scope_Depth (SCT);
+ end Available_Full_View_Of_Component;
+
--------------------------------
-- Bad_Predicated_Subtype_Use --
--------------------------------
-- not end with a ? (this is used when the caller wants to parameterize
-- whether an error or warning is given.
+ function Available_Full_View_Of_Component (T : Entity_Id) return Boolean;
+ -- If at the point of declaration an array type has a private or limited
+ -- component, several array operations are not avaiable on the type, and
+ -- the array type is flagged accordingly. If in the immediate scope of
+ -- the array type the component becomes non-private or non-limited, these
+ -- operations become avaiable. This can happen if the scopes of both types
+ -- are open, and the scope of the array is not outside the scope of the
+ -- component.
+
procedure Bad_Predicated_Subtype_Use
(Msg : String;
N : Node_Id;
-- by the derived type declaration for type Typ.
function Is_Iterator (Typ : Entity_Id) return Boolean;
- -- AI05-0139-2: Check whether Typ is derived from the predefined interface
- -- Ada.Iterator_Interfaces.Forward_Iterator.
+ -- AI05-0139-2 : check whether Typ is one of the predefined interfaces
+ -- in Ada.Iterator_Interfaces, or it is derived from one.
function Is_LHS (N : Node_Id) return Boolean;
-- Returns True iff N is used as Name in an assignment statement