https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89890
--- Comment #1 from Andrew Wood <andrew at fluidgravity dot co.uk> --- If I add the line "INTEGER, ALLOCATABLE :: i(:)" inside the definition of 'base', then valgrind reports the lost memory as having been allocated at the second ALLOCATE statement in the function 'new' instead of the first.