diff options
author | Gary Dismukes <dismukes@adacore.com> | 2025-07-11 23:30:18 +0000 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2025-07-22 10:35:17 +0200 |
commit | 585ade15412ae056c5ee17c046ae6316ca5d23c1 (patch) | |
tree | 764740cc97ea6004d27b89dd2932af30e1a86d51 /gcc/ada/gcc-interface/misc.cc | |
parent | beb6c12a41738f6cf4a1305be6518a0955a55123 (diff) | |
download | gcc-585ade15412ae056c5ee17c046ae6316ca5d23c1.zip gcc-585ade15412ae056c5ee17c046ae6316ca5d23c1.tar.gz gcc-585ade15412ae056c5ee17c046ae6316ca5d23c1.tar.bz2 |
ada: Nested use_type_clause with "all" cancels use_type_clause with wider scope
The compiler mishandles nested use_type_clauses in the case where the
outer one is a normal use_type_clause and the inner one has "all".
Upon leaving the scope of the inner use_type_clause, the outer one
is effectively disabled, because it's not considered redundant (and
in fact it's only partially redundant). This is fixed by testing for
the presence of a use_type_clause for the same type that has a wider
scope when ending the inner use_type_clause.
gcc/ada/ChangeLog:
* sem_ch8.adb (End_Use_Type): Add a test for there not being an earlier
use_type_clause for the same type as an additional criterion for turning
off In_Use and Current_Use_Clause.
Diffstat (limited to 'gcc/ada/gcc-interface/misc.cc')
0 files changed, 0 insertions, 0 deletions