http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50288
--- Comment #12 from janus at gcc dot gnu.org 2011-09-05 19:33:26 UTC --- (In reply to comment #5) > --- a/gcc/testsuite/lib/gfortran-dg.exp > +++ b/gcc/testsuite/lib/gfortran-dg.exp > @@ -104,7 +104,9 @@ proc gfortran-dg-runtest { testcases default-extra-flags } > { > > # look if this is dg-do-run test, in which case > # we cycle through the option list, otherwise we don't > - if [expr [search_for $test "dg-do run"]] { > + if [expr [search_for $test "dg-do +run-once"]] { > + set option_list [list { -O } ] > + } elseif [expr [search_for $test "dg-do +run"]] { > set option_list $torture_with_loops > } else { > set option_list [list { -O } ] Unfortunately, the patch in comment #5 does not really work for me. When using "dg-do run-once" in class_45b.f03, I get: ERROR: gfortran.dg/class_45b.f03 -O : 1: syntax error for " dg-do 1 run-once " Apparently it is not possible to add new 'dg-do' keywords, cf. e.g.: http://gcc.gnu.org/ml/gcc-patches/2011-01/msg02347.html