When running under valgrind the Fortran frontend showed several leaks
involving __gmp_default_allocate for simple code such as
program p
real, pointer :: x(:)
allocate (x, source = reshape ([1.], [1]))
end
as not all used components of the structure gfc_code were freed when a
statement was freed. Just do so.
PR fortran/109010
gcc/fortran/ChangeLog:
* st.cc (gfc_free_statement): Also free components expr3 and expr4.
gfc_free_expr (p->expr1);
if (p->expr2)
gfc_free_expr (p->expr2);
+ if (p->expr3)
+ gfc_free_expr (p->expr3);
+ if (p->expr4)
+ gfc_free_expr (p->expr4);
switch (p->op)
{