aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref.ads
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2022-04-20 14:48:11 -0700
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-30 08:29:03 +0000
commitebddfe50d8bf48458db0b658b962f62548dd671f (patch)
tree4e39c5ba33e7802d161e4ad0599e0728e7c54e78 /gcc/ada/lib-xref.ads
parent567bf44932542b8f861dc7880dba3273fb5838ce (diff)
downloadgcc-ebddfe50d8bf48458db0b658b962f62548dd671f.zip
gcc-ebddfe50d8bf48458db0b658b962f62548dd671f.tar.gz
gcc-ebddfe50d8bf48458db0b658b962f62548dd671f.tar.bz2
[Ada] Incorrect determination of whether an expression is predicate-static
The expression given in a Static_Predicate aspect specification is required to be predicate-static. The implementation of this compile-time check was incorrect in some cases. There were problems in both directions: expressions that are not predicate-static were incorrectly treated as though they were and vice versa. This led to both accepting invalid code and to rejecting valid code. gcc/ada/ * sem_ch13.adb (Is_Predicate_Static): Do not generate warnings about subexpressions of enclosing expressions. Generate warnings for predicates that are known to be always true or always false, except in the case where the predicate is expressed as a Boolean literal. Deal with non-predicate-static expressions that have been transformed into predicate-static expressions. Add missing Is_Type_Ref call to N_Membership_Test case.
Diffstat (limited to 'gcc/ada/lib-xref.ads')
0 files changed, 0 insertions, 0 deletions