https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121056
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Eric Botcazou <ebotca...@gcc.gnu.org>: https://gcc.gnu.org/g:b513e4f3e0914ade0a31a51625e1e2fe42093622 commit r16-2226-gb513e4f3e0914ade0a31a51625e1e2fe42093622 Author: Eric Botcazou <ebotca...@adacore.com> Date: Mon Jul 14 12:11:44 2025 +0200 Ada: Add missing guard before accessing the Underlying_Record_View field It is necessary when GNAT extensions are enabled (-gnatX switch). gcc/ada/ PR ada/121056 * sem_ch4.adb (Try_Object_Operation.Try_Primitive_Operation): Add test on Is_Record_Type before accessing Underlying_Record_View. gcc/testsuite/ * gnat.dg/deref4.adb: New test. * gnat.dg/deref4_pkg.ads: New helper.