On Tue, 2009-10-27 at 02:09 -0400, Kaveh R. GHAZI wrote:
> On Mon, 26 Oct 2009, Steve Ellcey wrote:
>
> > 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.
>
> I think you need two backslashes escaping the paren and maybe one before
> the pipe. I'm not sure about the \| vs | though, give the double escape
> paren a try both ways. You can see some examples via:
>
> find gcc/testsuite | xargs grep 'scan-assembler-times.*[(|]'
>
> --Kaveh
I tried two backslashes in front of the parens and either one or no
backslashes in front of the pipe. None of them work. I did a find
looking for examples and that didn't help. The most common usage I
found was no backslashes before the parens and one backslash before the
pipe. But those examples didn't have any .*? expressions in them and I
don't know if that is messing things up somehow because that doesn't
work for me in this case.
Steve Ellcey
[email protected]