http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50288
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-09-04 20:35:36 UTC --- > An evil trick would be the following, which causes a run once: ... It works, but I think if this trick is used, it should be documented as in gcc/testsuite/gfortran.dg/cray_pointers_2.f90: ! Using two spaces between dg-do and run is a hack to keep gfortran-dg-runtest ! from cycling through optimization options for this expensive test. Another working possibility is to remove the line ! { dg-final { cleanup-modules "G_Nodes" } } from gfortran.dg/class_45b.f03 and add an empty "cleaning" test: cat ./gcc/testsuite/gfortran.dg/class_45c.f03 ! { dg-do run } ! ! PR 50227: [4.7 Regression] [OOP] ICE-on-valid with allocatable class variable ! ! Contributed by Andrew Benson <aben...@caltech.edu> program Test end program Test ! { dg-final { cleanup-modules "G_Nodes" } } Note that it will be impossible to test gfortran.dg/class_45b.f03 alone.