[patch] Re: GFortran testsuite problems with "dg-do compile"
Brooks Moses
brooks.moses@codesourcery.com
Tue Dec 19 10:45:00 GMT 2006
Tobias Burnus wrote:
> Yes, see: http://gcc.gnu.org/wiki/HowToPrepareATestcase
>
> Valid actions for dg-do
>
> * preprocess - only run the preprocessor on the file.
> * compile - compile the file and emit the assembly code.
> * assemble - compile the file and assemble the assembly code, producing
> an object binary.
> * link - compile, assemble and link the testcase, producing an executable.
> * run - compile, assemble and link the testcase, and run the generated
> executable. The executable must then return with exit code 0 for the
> test to be successful.
>
> I think, gfortran can live with "compile" and "run" only:
> - Valid program - not only compile, assemble or link them, but also run them
> - Invalid programs - they cannot be assembled or linked as the compiler
> complains already
On the other hand, when a program contains no executable code -- for
example, the main program is a no-op that merely uses several functions
-- there's clearly no benefit to actually running the executable. There
may not even be any benefit in linking it or assembling it, unless the
testcase is related to a bug that only showed up on assembly or linkage.
So, given that the testsuite does take a while to run, I think it's
quite reasonable to have some valid programs in the testsuite that are
merely compiled.
I do agree that those are likely to be the useful tests in nearly all
cases, however; I'm just slightly disagreeing with your suggested
guidelines for when to use them.
> We currently have:
>
> link: char_result_11.f90
> assemble: same_name_1.f90
>
> I converted the first one to a "run" and the second one to a "link" to
> increase testing.
> Ok for the trunk?
I'm not sure I understand the reason for doing that -- if the intent is
to not have "link" or "assemble" in the gfortran testsuite, why did you
change the second one to "link"? And, if that isn't the intent, what's
the purpose of changing these at all, other than that they're there?
(Even if that is the intent: Why is it useful?)
- Brooks
More information about the Fortran
mailing list