beginner's guide to gfortran testsuite

Paul Thomas paulthomas2@wanadoo.fr
Thu Nov 24 05:55:00 GMT 2005


FX

This is a very good idea and it should be posted on the Wiki.   Please 
accept some minor additions.

>
> ! { dg-do compile }
> ! { dg-do link }
> ! { dg-do execute }               ! cf. Eriks's remark
>
> (Mind the spaces

"within" rather than "around"

>
>   print *, modulo(4_4,3_8) ! { dg-warning "same type and kind" }
>
> where the argument to dg-warning is a part of (actually, a regular 
> expression for a part of) the warning message. Similarly, there is a 
> dg-error directive.

"Sometimes the same line will produce more than one error message.  The 
regular expression | can be used to separate the different 
possibilities. See gfortran.dg/external_implicit_none.f90 or 
implicit_actual.f90, for examples."

>
> * Other advanced features not discussed here: dg-additional, which 
> enables us to create mixed C-Fortran testcases 

"(gfortran.dg/f2c_4.f90 for example)"

> ; dg-output, which tests for the output of the executed program

"(gfortran.dg/merge_char_const.f90 for example)"

> ; dg-require-* to run a testcase on targets fulfilling certain conditions

"(gfortran.dg/large_integer_kind_1.f90 for example)"

> ; and { xfail *-*-* } directives, for test that are expected to fail 
> on certain platforms

"(for which gfortran.dg/vect/vect-2.f90 vect-5.f90 are examples)"

Paul




More information about the Fortran mailing list