[Bug ada/78066] Misleading error message about redundant Dynamic_Predicate incorrectly mentions "Valid"
ebotcazou at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Oct 22 12:46:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78066
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-10-22
CC| |ebotcazou at gcc dot gnu.org
Ever confirmed|0 |1
Known to fail| |6.2.1, 7.0
--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> The exact repetition of the range constraint on type T
> in its Dynamic_Predicate leads to infinite recursion.
> This is as predicted by a warning. However, the warning mentions
> attribute Valid, whereas the source has a membership test.
It's because the compiler (cleverly?) synthesizes 'Valid out of the test.
> Also, the workaround shown in the commented line seems to be
> checking membership in the same set of values, but compilation
> and program do not exhibit the same behavior.
>
> (Is infinite recursion acceptable behavior when constraint
> and Dynamic_Predicate are identical?)
Of course not.
More information about the Gcc-bugs
mailing list