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] dwarf2out don't discriminate on dwarf version for advertising Ada



> On 11 Jun 2018, at 11:24, Jakub Jelinek <jakub@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


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