scanasm.exp doesn't work too well
Jakub Jelinek
jakub@redhat.com
Thu Jun 13 13:20:00 GMT 2002
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
More information about the Gcc
mailing list