This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gfortran.dg test harness for gfortran


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]