On Tue, Oct 17, 2017 at 04:42:58PM +0200, Tom de Vries wrote: > I found the culprit, in gfortran-dg-runtest: > ... > # 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"]] { > set option_list $torture_with_loops > } else { > set option_list [list { -O } ] > } > ... > This doesn't take dg-do-what-default into account. [ Note that this search > also triggers on '! bla bla dg-do run bla bla' ] > > Attached patch fixes this. > > Tested on x86_64 with test-case > libgomp/testsuite/libgomp.oacc-fortran/declare-1.f90. > > Verified that that adding '! dg-do compiler' switches back to running with > '-O'. > > OK, if full testing is ok?
I believe this was fully intentional and the presence/absence of explicit dg-do run can then be used to decide if it should loop through options or not. Jakub