[PATCH] gfortran.dg test harness for gfortran
Billinghurst, David (CALCRTS)
david.billinghurst@comalco.riotinto.com.au
Thu Jul 8 22:44:00 GMT 2004
> From: Phil Edwards [mailto:phil@codesourcery.com]
> On Thu, Jul 08, 2004 at 07:39:30PM +1000, Billinghurst, David (CALCRTS) wrote:
>> +
>> +proc gfortran-dg-test { prog do_what extra_tool_flags } {
>> + set result \
>> + [gcc-dg-test-1 gfortran_target_compile $prog $do_what $extra_tool_flags]
>> +
>> + set comp_output [lindex $result 0]
>> + set output_file [lindex $result 1]
>> +
>> + # Put the error message on the same line as the line number
>> + # Remove the line of source code with the error and
>> + # the " ^" that points to error
>> + regsub -all "\n\[^\n\]*\n *\\^\n" $comp_output "" comp_output
>> +
>> + return [list $comp_output $output_file]
>> +}
>
> I realize you're copying from existing code, but you can probably just
> return $result, rather than taking it apart, using only one half of it,
> and then putting it back together. Bit of a teensy speedup, next time
> you're editing that file.
Thanks. I'll look at this as I tweak the harness.
More information about the Fortran
mailing list