> On 11 Jun 2018, at 11:24, Jakub Jelinek <ja...@redhat.com> wrote:
>
> On Mon, Jun 11, 2018 at 08:50:31AM +0200, Olivier Hainque wrote:
>> FWIW, I was surprised by a gotcha while writing tests for this,
>> where both
>>
>> { dg-final { scan-assembler "0x3.*DW_AT_language" } }
>> and { dg-final { scan-assembler "0xd.*DW_AT_language" } }
>>
>> matched for Ada95 (0xd) with -gdwarf-3.
>
> Sure, you need to use something like \[^\n\r]* instead.
>> scan-assembler uses "regexp" without --line, and 0x3 happened
>> to match from a much earlier line in the output, with an assembly
>> output like
>>
>> bla 0x3 blo
>> <some other dwarf>
>> 0xd # DW_AT_language
>>
>> I adjusted the regex not to match newline characters and the
>> test is now more accurate, then I noticed that other language tests
>> use '.*' so might be affected as well, unless I'm missing something.
>
> In some tests using .* is intentional, in lots of others probably a bug.
I see, thanks for confirming :)
Regards,
Olivier