Hi Iain,

> Tested on aarch64-darwin (and testing now on aarch64-linux),
> OK for trunk (assuming the Linux tests pass)?

as I've said before, I very much like the syntax, but ...

> The motivation for this is that it is not unusal for subtargets to have
> substantially equivalent code-gen but differing in details.  This provision
> avoid duplication of the common sections.
>
> Viz:
> // { dg-final { check-function-bodies {"**" "*E"} "*/" "" { target { ! 
> *-*-darwin* } } {\.L[0-9]+} } }
> // { dg-final { check-function-bodies {"**" "*M"} "*/" "" { target 
> *-*-darwin* } {\.L[0-9]+} } }

... this is going the wrong direction IMO: this will be duplicated into
every test that needs different prefixes.  The testsuite is already
riddled with such duplication, and I'd rather see it reduced than
increase it.

> This says that body scan lines can begin with either ** or *E for ELF targets
> (or pecoff, I guess)
> but that Darwin targets should scan for either ** or *M.

Imagine (which I think is plausible) that PE-COFF support is really
added: this would make the default (ELF) case ever harder to read, apart
from having to modify this section in every single test involved.

If the multiple prefix support were moved into check-function-bodies
instead, all this would simply vanish, improving both readability and
maintainablity.  Witness Richard's change to patch to move the explicit
dg-add-options check_function_bodies into dg-final.

I also think that this is doable without too much churn:

* Move the functionality into check-function-bodies, always applying it.

* Given that only some of the AVR tests (28 total) use a prefix other
  than "**" ("** ") for some unknown reason, change those tests to also
  use "**" like everyone else.

* Then, in check-function-bodies the explicit PREFIX arg can simply be
  ignored (or rather checked that that it's "**" as in all tests so
  far) and replaced by the magic above.

I think this would be a large win for everyone with manageable
complexity.

As a follow-up, mostly mechanical, one could remove the explicit PREFIX
from the tests, relying on the default instead.

Thoughts?  I'd especially like Mike's and Richard's opinions on this.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to