This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Testsuite regular expression question
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc at gcc dot gnu dot org
- Cc: janis187 at us dot ibm dot com
- Date: Mon, 26 Oct 2009 16:06:56 -0700 (PDT)
- Subject: Testsuite regular expression question
- Reply-to: sje at cup dot hp dot com
I am looking at a failure of gcc.dg/debug/dwarf2/inline2.c on IA64
HP-UX. The problem I have is with the assembler scan:
/* { dg-final { scan-assembler-times "byte.*?0x3.*? DW_AT_inline" 3 } } */
IA64 HP-UX is using 'data1' instead of 'byte' in the output. Now that
should be easy to fix and if I change the string to:
/* { dg-final { scan-assembler-times "data1.*?0x3.*? DW_AT_inline" 3 } } */
I do get this test to pass. But other systems are using 'byte' so of
course I need to allow for either byte or data1. I have tried:
/* { dg-final { scan-assembler-times "(byte|data1).*?0x3.*? DW_AT_inline" 3 } } */
/* { dg-final { scan-assembler-times "(byte\|data1).*?0x3.*? DW_AT_inline" 3 } } */
/* { dg-final { scan-assembler-times "\(byte\|data1\).*?0x3.*? DW_AT_inline" 3 } } */
And various other escapes, parenthesis, etc but cannot get any of them
to work. Does anyone know what this RE should look like to allow 'byte'
or 'data1' in the string? It seems to break as soon as I introduce
parenthesis anywhere in the RE.
Steve Ellcey
sje@cup.hp.com