https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62298
--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- Workaround: replace res = this with res%buffer = this%buffer res%length = this%len() ... other needed components With these changes the code compiles, but I cannot guarantee that it works!