https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120365
Bug ID: 120365 Summary: Flag/skip torture testing in presence of explicit '-O' Product: gcc Version: 16.0 Status: UNCONFIRMED Keywords: internal-improvement Severity: enhancement Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: jakub at gcc dot gnu.org Target Milestone: --- Occasionally during development I run into "non-sensical differences" when 'diff'ing DejaGnu '*.sum' files: for example, when I see a change for a test case's torture testing at '-O0', but expect to see anything only with optimizations enabled. Usually I then find a hard-coded '-O' in the test case 'dg-options' or similar. This means that torture testing effectively tests the same '-O' a number of times, which in addition to being confusing also is wasteful. We could add some linting for that (cross-referencing PR116163), or generally do something like commit r15-9015-g2cb728e14b5640849dad7571b9bbb0091ff5fcab "testsuite: Don't cycle through option list for gfortran.dg and libgomp.fortran dg-do run tests with -O in dg*options", for example.