This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: scanasm.exp doesn't work too well
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "H . J . Lu" <hjl at lucon dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 13 Jun 2002 22:15:50 +0200
- Subject: Re: scanasm.exp doesn't work too well
- References: <20020613125519.A26477@lucon.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jun 13, 2002 at 12:55:19PM -0700, H . J . Lu wrote:
> Your patch:
>
> 2002-06-10 Jakub Jelinek <jakub@redhat.com>
>
> * g++.dg/opt/vt1.C: New test.
>
> causes:
>
> FAIL: g++.dg/opt/vt1.C scan-assembler-not section.*_ZTV1S.*"[^w"]*"
>
> The problem is the asm output is
>
> ...
> .section .gnu.linkonce.d._ZTV1S,"aw",@progbits
> ...
> .section .gnu.linkonce.t._ZN1S2vmEv,"ax",@progbits
>
> But scan-assembler-not does
>
> set fd [open $output_file r]
> set text [read $fd]
> close $fd
>
> if ![regexp -- "[lindex $args 0]" $text] {
> pass "$testcase scan-assembler-not [lindex $args 0]"
> } else {
> fail "$testcase scan-assembler-not [lindex $args 0]"
> verbose -log "$testcase: $text"
> }
>
> I don't see how it can ever work right when you have the asm output
> above. All procedures in scanasm.exp may have the same problem, which
> can lead false negative and false positive. Should we make procedures
> in scanasm.exp line oriented?
Then .* should be probably replaced with \[^\n\r\]* and \[^w\"\]
with \[^w\"\n\r\].
I'll test it out tomorrow.
Jakub