diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-12-05 12:02:24 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-12-05 12:02:24 +0100 |
commit | 0f4be535527b871d60daa51840e511cb66df6a9d (patch) | |
tree | 58acd4c116ae1b2b68b9482f60b3681d1ea78517 | |
parent | a53c56136d37b424f4f6b89e903763b82c33cfb9 (diff) | |
download | gcc-0f4be535527b871d60daa51840e511cb66df6a9d.zip gcc-0f4be535527b871d60daa51840e511cb66df6a9d.tar.gz gcc-0f4be535527b871d60daa51840e511cb66df6a9d.tar.bz2 |
[multiple changes]
2012-12-05 Thomas Quinot <quinot@adacore.com>
* exp_dist.adb: Minor reformatting.
2012-12-05 Tristan Gingold <gingold@adacore.com>
* Make-generated.in: Remove the VMS host specific part, as VMS
compilers aren't built anymore on VMS.
2012-12-05 Thomas Quinot <quinot@adacore.com>
* sem.adb, errout.ads, atree.adb, atree.ads (Check_Error_Detected):
Only return quietly if a serious error of configurable run time
violation has been found.
2012-12-05 Yannick Moy <moy@adacore.com>
* sem_res.adb (Resolve_Type_Conversion): In Alfa_Mode, do not apply
conversion checks.
From-SVN: r194205
-rw-r--r-- | gcc/ada/ChangeLog | 20 | ||||
-rw-r--r-- | gcc/ada/Make-generated.in | 21 | ||||
-rw-r--r-- | gcc/ada/atree.adb | 7 | ||||
-rw-r--r-- | gcc/ada/atree.ads | 14 | ||||
-rw-r--r-- | gcc/ada/errout.ads | 7 | ||||
-rw-r--r-- | gcc/ada/exp_dist.adb | 6 | ||||
-rw-r--r-- | gcc/ada/sem.adb | 1 | ||||
-rw-r--r-- | gcc/ada/sem_res.adb | 3 |
8 files changed, 52 insertions, 27 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8f486e4..365039f 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,23 @@ +2012-12-05 Thomas Quinot <quinot@adacore.com> + + * exp_dist.adb: Minor reformatting. + +2012-12-05 Tristan Gingold <gingold@adacore.com> + + * Make-generated.in: Remove the VMS host specific part, as VMS + compilers aren't built anymore on VMS. + +2012-12-05 Thomas Quinot <quinot@adacore.com> + + * sem.adb, errout.ads, atree.adb, atree.ads (Check_Error_Detected): + Only return quietly if a serious error of configurable run time + violation has been found. + +2012-12-05 Yannick Moy <moy@adacore.com> + + * sem_res.adb (Resolve_Type_Conversion): In Alfa_Mode, do not apply + conversion checks. + 2012-12-05 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_N_Assignment_Statement): Handle properly diff --git a/gcc/ada/Make-generated.in b/gcc/ada/Make-generated.in index 57160ce..1ddd0b5 100644 --- a/gcc/ada/Make-generated.in +++ b/gcc/ada/Make-generated.in @@ -66,16 +66,6 @@ $(ADA_GEN_SUBDIR)/stamp-nmake: $(ADA_GEN_SUBDIR)/sinfo.ads $(ADA_GEN_SUBDIR)/nma $(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/nmake/nmake.adb $(ADA_GEN_SUBDIR)/nmake.adb touch $(ADA_GEN_SUBDIR)/stamp-nmake -ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),) -OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \ - -DTARGET='""$(target)""' s-oscons-tmplt.c - -OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \ - -DTARGET='""$(target)""' s-oscons-tmplt.c ; \ - ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \ - ./s-oscons-tmplt.exe > s-oscons-tmplt.s - -else # GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust # for running it from $(ADA_GEN_SUBDIR)/bldtools/oscons OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \ @@ -83,7 +73,16 @@ OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \ OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \ -DTARGET=\"$(target)\" s-oscons-tmplt.c > s-oscons-tmplt.i OSCONS_EXTRACT=$(OSCONS_CC) -S s-oscons-tmplt.i -endif + +# Note: if you need to build with a non-GNU compiler, you could adapt the +# following definitions (written for VMS DEC-C) +#OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \ +# -DTARGET='""$(target)""' s-oscons-tmplt.c +# +#OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \ +# -DTARGET='""$(target)""' s-oscons-tmplt.c ; \ +# ld -o s-oscons-tmplt.exe s-oscons-tmplt.obj; \ +# ./s-oscons-tmplt.exe > s-oscons-tmplt.s $(ADA_GEN_SUBDIR)/s-oscons.ads : $(ADA_GEN_SUBDIR)/s-oscons-tmplt.c $(ADA_GEN_SUBDIR)/gsocket.h $(ADA_GEN_SUBDIR)/xoscons.adb $(ADA_GEN_SUBDIR)/xutil.ads $(ADA_GEN_SUBDIR)/xutil.adb -$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/oscons diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb index d51e85d..a5c80dc 100644 --- a/gcc/ada/atree.adb +++ b/gcc/ada/atree.adb @@ -567,9 +567,12 @@ package body Atree is procedure Check_Error_Detected is begin -- An anomaly has been detected which is assumed to be a consequence of - -- a previous error. Raise an exception if no error found previously. + -- a previous serious error or configurable run time violation. Raise + -- an exception if no such error has been detected. - if Total_Errors_Detected = 0 then + if Serious_Errors_Detected = 0 + and then Configurable_Run_Time_Violations = 0 + then raise Program_Error; end if; end Check_Error_Detected; diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads index 8c434db..ac27b3f 100644 --- a/gcc/ada/atree.ads +++ b/gcc/ada/atree.ads @@ -302,12 +302,20 @@ package Atree is -- Number of warnings detected. Initialized to zero at the start of -- compilation. Initialized for -gnatVa use, see comment above. + Configurable_Run_Time_Violations : Nat := 0; + -- Count of configurable run time violations so far. This is used to + -- suppress certain cascaded error messages when we know that we may not + -- have fully expanded some items, due to high integrity violations (i.e. + -- the use of constructs not permitted by the library in use, or improper + -- constructs in No_Run_Time mode). + procedure Check_Error_Detected; -- When an anomaly is found in the tree, many semantic routines silently -- bail out, assuming that the anomaly was caused by a previously detected - -- error. This routine should be called in these cases, and will raise an - -- exception if no error has been detected. This ensure that the anomaly - -- is never allowed to go unnoticed. + -- serious error (or configurable run time violation). This routine should + -- be called in these cases, and will raise an exception if no such error + -- has been detected. This ensure that the anomaly is never allowed to go + -- unnoticed. ------------------------------- -- Default Setting of Fields -- diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads index 2c6ab7d..0f746d9 100644 --- a/gcc/ada/errout.ads +++ b/gcc/ada/errout.ads @@ -39,13 +39,6 @@ with System; package Errout is - Configurable_Run_Time_Violations : Nat := 0; - -- Count of configurable run time violations so far. This is used to - -- suppress certain cascaded error messages when we know that we may not - -- have fully expanded some items, due to high integrity violations (i.e. - -- the use of constructs not permitted by the library in use, or improper - -- constructs in No_Run_Time mode). - Current_Error_Source_File : Source_File_Index renames Err_Vars.Current_Error_Source_File; -- Id of current messages. Used to post file name when unit changes. This diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb index c2396c1..92aa427 100644 --- a/gcc/ada/exp_dist.adb +++ b/gcc/ada/exp_dist.adb @@ -10077,7 +10077,7 @@ package body Exp_Dist is -- Integer types (walk back to the base type) elsif U_Type = RTE (RE_Integer_8) then - Lib_RE := RE_TC_I8; + Lib_RE := RE_TC_I8; elsif U_Type = RTE (RE_Integer_16) then Lib_RE := RE_TC_I16; @@ -10188,7 +10188,7 @@ package body Exp_Dist is -- Make a return statement that calls TC_Build with the given -- typecode kind, and the constructed parameters list. - procedure Return_Alias_TypeCode (Base_TypeCode : Node_Id); + procedure Return_Alias_TypeCode (Base_TypeCode : Node_Id); -- Return a typecode that is a TC_Alias for the given typecode -------------------------- @@ -10258,7 +10258,7 @@ package body Exp_Dist is --------------------------- procedure Return_Alias_TypeCode - (Base_TypeCode : Node_Id) + (Base_TypeCode : Node_Id) is begin Add_TypeCode_Parameter (Base_TypeCode, Parameters); diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb index f357779..95b6942 100644 --- a/gcc/ada/sem.adb +++ b/gcc/ada/sem.adb @@ -27,7 +27,6 @@ with Atree; use Atree; with Debug; use Debug; with Debug_A; use Debug_A; with Elists; use Elists; -with Errout; use Errout; with Expander; use Expander; with Fname; use Fname; with Lib; use Lib; diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 64199fa..dd07b30 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -9552,11 +9552,14 @@ package body Sem_Res is -- Skip these type conversion checks if universal fixed operands -- operands involved, since range checks are handled separately for -- these cases (in the appropriate Expand routines in unit Exp_Fixd). + -- Also skip type conversion checks in formal verification mode, as the + -- formal verification backend deals directly with these checks. if Nkind (N) = N_Type_Conversion and then not Is_Generic_Type (Root_Type (Target_Typ)) and then Target_Typ /= Universal_Fixed and then Operand_Typ /= Universal_Fixed + and then not Alfa_Mode then Apply_Type_Conversion_Checks (N); end if; |