diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-27 11:48:45 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-27 11:48:45 +0200 |
commit | 6cbfce7e87651d5e7272bad48dfc63e71c1bb27a (patch) | |
tree | 1b8bba33017bf56868f71410e9917dde0ac8c621 /gcc/ada/sem_res.adb | |
parent | de3b531c9aa93592f98ebd99c6b35be632e3c1b3 (diff) | |
download | gcc-6cbfce7e87651d5e7272bad48dfc63e71c1bb27a.zip gcc-6cbfce7e87651d5e7272bad48dfc63e71c1bb27a.tar.gz gcc-6cbfce7e87651d5e7272bad48dfc63e71c1bb27a.tar.bz2 |
[multiple changes]
2017-04-27 Claire Dross <dross@adacore.com>
* a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
modifications in functional containers.
* a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads Reformat
to improve readablity. Subprograms are separated between basic
operations, constructors and properties. Universally quantified
formulas in contracts are factorized in independant functions
with a name and a comment. Names of parameters are improved.
2017-04-27 Gary Dismukes <dismukes@adacore.com>
* exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.
2017-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Resolve_Type_Conversion): Do not
install a predicate check here since this is already done during
the expansion phase. Verify whether the operand satisfies the
static predicate (if any) of the target type.
* sem_ch3.adb (Analyze_Object_Declaration): Do
not install a predicate check if the object is initialized by
means of a type conversion because the conversion is subjected
to the same check.
2017-04-27 Tristan Gingold <gingold@adacore.com>
* raise.c (__gnat_builtin_longjmp): Remove.
(__gnat_bracktrace):
Add a dummy definition for the compiler (__gnat_eh_personality,
__gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
__gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
__gnat_rcheck_31, __gnat_rcheck_32): Likewise.
* a-exexpr.adb: Renamed from a-exexpr-gcc.adb
* a-except.ads, a-except.adb: Renamed from a-except-2005.ads
and a-except-2005.adb.
* raise-gcc.c: Allow build in compiler, compiled as a C++
file.
(__gnat_Unwind_ForcedUnwind): Adjust prototype.
(db): Constify msg_format.
(get_call_site_action_for): Don't use void arithmetic.
* system.ads (Frontend_Exceptions): Set to False.
(ZCX_By_Default): Set to True.
(GCC_ZC_Support): Set to True.
* gcc-interface/Makefile.in: No more variants for a-exexpr.adb and
a-except.ad[sb].
* gcc-interface/Make-lang.in: Add support for backend zcx exceptions
in gnat1 and gnatbind.
* gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, s-addima.o,
s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
* s-excmac.ads, s-excmac.adb: Copy of variants.
* a-except.o: Adjust preequisites.
Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.
From-SVN: r247301
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r-- | gcc/ada/sem_res.adb | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index de5053c..0595b0b 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -11065,22 +11065,11 @@ package body Sem_Res is end; end if; - -- Ada 2012: if target type has predicates, the result requires a - -- predicate check. If the context is a call to another predicate - -- check we must prevent infinite recursion. + -- Ada 2012: once the type conversion is resolved, check whether the + -- operand statisfies the static predicate of the target type. if Has_Predicates (Target_Typ) then - if Nkind (Parent (N)) = N_Function_Call - and then Present (Name (Parent (N))) - and then (Is_Predicate_Function (Entity (Name (Parent (N)))) - or else - Is_Predicate_Function_M (Entity (Name (Parent (N))))) - then - null; - - else - Apply_Predicate_Check (N, Target_Typ); - end if; + Check_Expression_Against_Static_Predicate (N, Target_Typ); end if; -- If at this stage we have a real to integer conversion, make sure that |