This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] gfortran.dg test harness for gfortran
- From: Phil Edwards <phil at codesourcery dot com>
- To: "Billinghurst, David (CALCRTS)" <david dot billinghurst at comalco dot riotinto dot com dot au>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Thu, 8 Jul 2004 18:39:57 -0400
- Subject: Re: [PATCH] gfortran.dg test harness for gfortran
- References: <8ED2FA87C8ACC04192709688DDFD5F5F09B35B@calttsv025.cal.riotinto.org>
- Reply-to: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
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.
--
"This release is mostly intended to mop up the minor and trivial bug fixes
in the list and clear out the documentation changes. As such, it should be
treated with even more suspicion than is normal."
- dpkg 1.10.22 release note