On 06/27/2012 05:05 PM, Mike Stump wrote: > On Jun 27, 2012, at 3:36 PM, Janis Johnson wrote: >> These scans from gcc.dg/vect/vect-50.c, and others similar to them in >> other vect tests, hurt my brain: >> >> /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 >> "vect" { xfail { vect_no_align } } } } */ >> /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 >> "vect" { target vect_hw_misalign } } } */ >> >> Both of these PASS for i686-pc-linux-gnu, causing duplicate lines in the >> gcc test summary. I'm pretty sure the following accomplishes the same >> goal: >> >> /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 >> "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ > > I don't think so? The first sets the xfail status for the testcase. If you > change the condition, you can't the xfail state for some targets, which would > be wrong (without a vec person chiming in).
The two checks are run separately. The first one runs everywhere and is expected to fail for vect_no_align. The second is only run for vect_hw_misalign. Targets for which vect_no_align is false and vect_hw_misliang is true get two PASS reports. > I'd like to think you can compose the two with some spelling... I just don't > think this one is it.? No, there is no way to combine "target" and "xfail", although since we intercept them we could presumably come up with a way to do that, with syntax and semantics we design. > I grepped around and found: > > /* { dg-message "does break strict-aliasing" "" { target { *-*-* && lp64 } > xfail *-*-* } 8 } */ > > which might have the right way to spell it, though, I always test to ensure > the construct does what I want. Nope. That should be flagged as an error by dg-message but it's passed through GCC's process-message which ignore errors (a bug) and simply ignores the directive. I'm currently trying a fix to not ignore errors from dg-error/dg-warning/dg-message and will then fix up the broken tests. >> That is, run the check everywhere > > We don't want to run the test on other than vect_hw_misalign targets, right? > I don't know, but right now it's run everywhere at least once. Janis