diff options
author | Bob Duff <duff@adacore.com> | 2023-01-05 20:21:15 -0500 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-15 11:36:41 +0200 |
commit | b4509d1960165b205425c5b14ef1ff4ea5fd4435 (patch) | |
tree | bd11c6d14807b609003c79610bd70f292d1f176e /gcc/ada | |
parent | 0f7d8f2f669c64529aafb24bfc0b1f59b4958f19 (diff) | |
download | gcc-b4509d1960165b205425c5b14ef1ff4ea5fd4435.zip gcc-b4509d1960165b205425c5b14ef1ff4ea5fd4435.tar.gz gcc-b4509d1960165b205425c5b14ef1ff4ea5fd4435.tar.bz2 |
ada: Add Check_Error_Detected before "raise Bad_Attribute"
We shouldn't raise Bad_Attribute if there is no error.
This patch adds a call to Check_Error_Detected to make sure that's true.
(There are other cases where we raise Bad_Attribute;
this patch doesn't try to fix them all.)
gcc/ada/
* sem_attr.adb
(Analyze_Attribute): Add a call to Check_Error_Detected.
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/sem_attr.adb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 77c56aa..9de9884 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -3299,6 +3299,7 @@ package body Sem_Attr is -- Check for missing/bad expression (result of previous error) if No (E1) or else Etype (E1) = Any_Type then + Check_Error_Detected; raise Bad_Attribute; end if; end if; |