diff options
author | Bob Duff <duff@adacore.com> | 2018-07-17 08:09:30 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-07-17 08:09:30 +0000 |
commit | db38c41b4b5529cb491116f090b1894ff6f9e9ae (patch) | |
tree | 715d049edce5ab801e8651a25077c57407d7ef7a /gcc | |
parent | 2bbc7940969ba1840d103c3f0c6af2de2e67c514 (diff) | |
download | gcc-db38c41b4b5529cb491116f090b1894ff6f9e9ae.zip gcc-db38c41b4b5529cb491116f090b1894ff6f9e9ae.tar.gz gcc-db38c41b4b5529cb491116f090b1894ff6f9e9ae.tar.bz2 |
[Ada] Assertion_Policy for class-wide precondition
This patch fixes the compiler to that class-wide preconditions on primitive
operations of interfaces are not checked at run time when the Assertion_Policy
indicates that they should be ignored. This is required by the RM.
2018-07-17 Bob Duff <duff@adacore.com>
gcc/ada/
* exp_disp.adb (Build_Class_Wide_Check): Return early if the
precondition is supposed to be ignored.
From-SVN: r262789
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/exp_disp.adb | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index fd02931..a076730 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-07-17 Bob Duff <duff@adacore.com> + + * exp_disp.adb (Build_Class_Wide_Check): Return early if the + precondition is supposed to be ignored. + 2018-07-17 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Check_Untagged_Equality): Extend check to operations diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index dbccfed..b022815 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -809,7 +809,7 @@ package body Exp_Disp is Prec := Next_Pragma (Prec); end loop; - if No (Prec) then + if No (Prec) or else Is_Ignored (Prec) then return; end if; |