diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-04 07:54:00 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-04 07:54:00 +0000 |
commit | 1f5d83cf1a47d0d34b8b19df99ddd7294ae13510 (patch) | |
tree | 91119788af8e584b9632c7a81a99301a7bf9abab /gcc/ada/exp_aggr.adb | |
parent | 6d9c537395ca06276bcf41c09d2d3ff8681f783b (diff) | |
download | gcc-1f5d83cf1a47d0d34b8b19df99ddd7294ae13510.tar.gz |
2014-08-04 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
if error already detected. We may reach this point in spite of
previous errors when compiling with -gnatq, to force all possible
errors (this is the usual ACATS mode).
2014-08-04 Gary Dismukes <dismukes@adacore.com>
* checks.adb (Generate_Range_Check): For the case of converting
a base type with a larger range to a smaller target subtype, only
use unchecked conversions of bounds in the range check followed
by conversion in the case where both types are discrete. In other
cases, convert to the target base type and save in a temporary
followed by the range check.
(Convert_And_Check_Range): New procedure factoring code to save
conversion to a temporary followed by a range check (called two
places in Generate_Range_Check).
* exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
check-in, to generate range checks for conversions between
any floating-point types rather than limiting it to matching
base types.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213532 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_aggr.adb')
-rw-r--r-- | gcc/ada/exp_aggr.adb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 378d66fee63..60838de3674 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -5013,6 +5013,13 @@ package body Exp_Aggr is (Return_Applies_To (Return_Statement_Entity (Parent (N)))) then return; + + -- Do not attempt expansion if error already detected. We may reach this + -- point in spite of previous errors when compiling with -gnatq, to + -- force all possible errors (this is the usual ACATS mode). + + elsif Error_Posted (N) then + return; end if; -- If the semantic analyzer has determined that aggregate N will raise |