Message ID | 87k37uvhjr.fsf@schwinge.name |
---|---|
State | New |
Headers | show |
On Thu, Jul 03, 2014 at 12:54:32PM +0200, Thomas Schwinge wrote: > Thanks Janis and Mikael for your replies (nearly a year ago...), but > still my questions remain to be answered: in my understanding, the > libgomp testsuite is not the place for compiler torture testing > (different optimization flags and all that -- and, that is done for > Fortran only; gfortran-dg-runtest), but rather, I understand the libgomp > testsuite to be the place for libgomp library testing ;-), and hence I > propose to remove that special casing of Fortran test cases: No, it is intentional that we torture test those, libgomp is the place for all OpenMP runtime tests, not just for library testing. Jakub
Hi! On Thu, 3 Jul 2014 12:58:32 +0200, Jakub Jelinek <jakub@redhat.com> wrote: > On Thu, Jul 03, 2014 at 12:54:32PM +0200, Thomas Schwinge wrote: > > Thanks Janis and Mikael for your replies (nearly a year ago...), but > > still my questions remain to be answered: in my understanding, the > > libgomp testsuite is not the place for compiler torture testing > > (different optimization flags and all that -- and, that is done for > > Fortran only; gfortran-dg-runtest), but rather, I understand the libgomp > > testsuite to be the place for libgomp library testing ;-), and hence I > > propose to remove that special casing of Fortran test cases: > > No, it is intentional that we torture test those, libgomp is the place > for all OpenMP runtime tests, not just for library testing. But then, the obvious question: why for Fortran only, but not for C and C++? Grüße, Thomas
On Thu, Jul 03, 2014 at 01:06:48PM +0200, Thomas Schwinge wrote: > On Thu, 3 Jul 2014 12:58:32 +0200, Jakub Jelinek <jakub@redhat.com> wrote: > > On Thu, Jul 03, 2014 at 12:54:32PM +0200, Thomas Schwinge wrote: > > > Thanks Janis and Mikael for your replies (nearly a year ago...), but > > > still my questions remain to be answered: in my understanding, the > > > libgomp testsuite is not the place for compiler torture testing > > > (different optimization flags and all that -- and, that is done for > > > Fortran only; gfortran-dg-runtest), but rather, I understand the libgomp > > > testsuite to be the place for libgomp library testing ;-), and hence I > > > propose to remove that special casing of Fortran test cases: > > > > No, it is intentional that we torture test those, libgomp is the place > > for all OpenMP runtime tests, not just for library testing. > > But then, the obvious question: why for Fortran only, but not for C and > C++? Fortran has far more tests with arrays etc. that testing just -O0 or -O2 is insufficient, that is typically not the case for C/C++. Jakub
--- libgomp/testsuite/lib/libgomp-dg.exp +++ libgomp/testsuite/lib/libgomp-dg.exp @@ -5,3 +5,19 @@ proc libgomp-dg-test { prog do_what extra_tool_flags } { proc libgomp-dg-prune { system text } { return [gcc-dg-prune $system $text] } + +# Modified dg-runtest that deal with Fortran modules cleanup. +proc dg-runtest-fortran { testcases flags default-extra-flags } { + global runtests + + foreach testcase $testcases { + # If we're only testing specific files and this isn't one of them, skip it. + if {![runtest_file_p $runtests $testcase]} { + continue + } + verbose "Testing [file tail [file dirname $testcase]]/[file tail $testcase]" + list-module-names $testcase + dg-test $testcase $flags ${default-extra-flags} + cleanup-modules "" + } +} --- libgomp/testsuite/libgomp.fortran/fortran.exp +++ libgomp/testsuite/libgomp.fortran/fortran.exp @@ -11,6 +11,10 @@ set lang_link_flags "-lgfortran" set lang_test_file_found 0 set quadmath_library_path "../libquadmath/.libs" +# If a testcase doesn't have special options, use these. +if ![info exists DEFAULT_CFLAGS] then { + set DEFAULT_CFLAGS "-O2" +} # Initialize dg. dg-init @@ -60,7 +64,7 @@ if { $lang_test_file_found } { set_ld_library_path_env_vars # Main loop. - gfortran-dg-runtest $tests "" + dg-runtest-fortran $tests "" $DEFAULT_CFLAGS } # All done.