https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78175
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Eric Botcazou <[email protected]>: https://gcc.gnu.org/g:7bdac5a4a5cdf896d0358ea576439b3c3321ef22 commit r16-5018-g7bdac5a4a5cdf896d0358ea576439b3c3321ef22 Author: Eric Botcazou <[email protected]> Date: Tue Nov 4 00:40:39 2025 +0100 Ada: Fix segfault for instantiation on function call returning string The problem is that a transient scope is created during the analysis of the actual parameters of the instantiation and this discombobulates the complex handling of scopes in Sem_Ch12. gcc/ada/ PR ada/78175 * sem_ch12.adb (Hide_Current_Scope): Deal with a transient scope as current scope. (Remove_Parent): Likewise. gcc/testsuite/ * gnat.dg/generic_inst15.adb: New test. * gnat.dg/generic_inst15_pkg-g.ads: New helper. * gnat.dg/generic_inst15_pkg.ads: Likewise.
