http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51218
--- Comment #10 from tkoenig at netcologne dot de <tkoenig at netcologne dot de> 2011-11-19 10:57:23 UTC --- Am 19.11.2011 11:18, schrieb anlauf at gmx dot de: > This won't work. The implementation of the management > of temporaries does not allow that the same instance > is used more than once. If I understand your code, you are modifying the arguments of your function and evaluating that function more than once in a single expression. This is illegal in Fortran, so gfortran could, in principle, do anything with it. I would advise you to fix your code to be standard-conforming. Because such code is unfortunately quite common, gfortran by default does not do such optimizations unless directed to be. The fact that it does here nonetheless is, indeed, a bug.