https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116945
--- Comment #13 from Mark Wielaard <mark at gcc dot gnu.org> --- (In reply to Eric Botcazou from comment #12) > Unlike the C and C++ standards, the Ada standard is freely available at: > http://www.ada-auth.org/standards/22rm/html/RM-TTL.html > and the 'Valid attribute is specified there: > http://www.ada-auth.org/standards/22rm/html/RM-13-9-2.html Thanks for the reference. But this does seem to be a bit of a circular definition. It says the 'Valid attribute can be used to check whether the value has a valid representation, and an invalid representation can be created by an uninitialized object. But it doesn't define how it checks for the invalid representation. It does state that it is not an error to check the validity of an object that is invalid. "Determining whether X is normal and has a valid representation as part of the evaluation of X'Valid is not considered to include an evaluation of X." But it looks like valgrind here determines that an evaluation of X is happening because the code flow depends on uninitialized value. I think what makes this hard is that nobody seems to know what code is being generated for this case. Sam, might it be possible to disassemble or produce the assembly gnat creates for the code that triggers this error?