Le 04/03/2023 à 22:20, Harald Anlauf a écrit : > Hi Mikael, > > Am 04.03.23 um 18:09 schrieb Mikael Morin: >> There was a comment about the old_symbol thing at the end of my previous >> message: >> https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613354.html > > I think Tobias might be the better person to answer this. > But when playing with variations of that else-branch, > I always hit an issue with class_74.f90, where the class > variables are not dummy arguments but local variables. > > E.g. take the following reduced testcase: > > subroutine foo >   class(*)  :: y >   dimension :: y(:,:) >   pointer   :: y > end subroutine foo > > So when we see the dimension but haven't seen the > pointer (or allocatable) declaration, we appear to > generate an error with bad consequences (ICE). > > If this is a resolution issue, maybe it can be fixed > differently, but likely needs digging deeper.  With > the patch as-is at least I do not see a memory leak > in that context. > One of my suggestions was to fix it as attached. It is probably more clear with an actual patch to look at. It seems to work on your example and class_74 as well. It seems to also fix some valgrind errors on this example: subroutine foo pointer :: y dimension :: y(:,:) class(*) :: y end subroutine foo I'm fine with that fix if it works for you. I suggest waiting for next stage 1, but it's your call, you have the green light from Steve anyway. Thanks for your work.