On 11/20/2015 05:15 AM, Kyrill Tkachov wrote:
Hi Kirill,

On 18/11/15 14:11, Kirill Yukhin wrote:
Hello Andreas, Devid.

On 18 Nov 10:45, Andreas Schwab wrote:
Kirill Yukhin <kirill.yuk...@gmail.com> writes:

diff --git a/gcc/testsuite/c-c++-common/attr-simd.c
b/gcc/testsuite/c-c++-common/attr-simd.c
new file mode 100644
index 0000000..b4eda34
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/attr-simd.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-optimized" } */
+
+__attribute__((__simd__))
+extern
+int simd_attr (void)
+{
+  return 0;
+}
+
+/* { dg-final { scan-tree-dump "simd_attr\[ \\t\]simdclone|vector"
"optimized" } } */
On ia64:

FAIL: c-c++-common/attr-simd.c  -Wc++-compat   scan-tree-dump
optimized "simd_attr[ \\t]simdclone|vector"
FAIL: c-c++-common/attr-simd.c  -Wc++-compat   scan-tree-dump
optimized "simd_attr2[ \\t]simdclone|vector"

$ grep simd_attr attr-simd.c.194t.optimized
;; Function simd_attr (simd_attr, funcdef_no=0, decl_uid=1389,
cgraph_uid=0, symbol_order=0)
simd_attr ()
;; Function simd_attr2 (simd_attr2, funcdef_no=1, decl_uid=1392,
cgraph_uid=1, symbol_order=1)
simd_attr2 ()
As far as vABI is supported on x86_64/i?86 only, I am going to enable
mentioned `scan-tree-dump' only
for these targets. This should cure both IA64 and Power.

Concerning attr-simd-3.c. It is known issue: PR68158.
And I believe this test should work everywhere as far as PR is resolved.
I'll put xfail into the test.
Which will lead to (in g++.log):
gcc/testsuite/c-c++-common/attr-simd-3.c:5:48: warning: '__simd__'
attribute does not apply to types\
  [-Wattributes]^M
output is:
gcc/testsuite/c-c++-common/attr-simd-3.c:5:48: warning: '__simd__'
attribute does not apply to types\
  [-Wattributes]^M

XFAIL: c-c++-common/attr-simd-3.c  -std=gnu++98 PR68158 (test for
errors, line 5)
FAIL: c-c++-common/attr-simd-3.c  -std=gnu++98 (test for excess errors)
Excess errors:
gcc/testsuite/c-c++-common/attr-simd-3.c:5:48: warning: '__simd__'
attribute does not apply to types\
  [-Wattributes]

Patch in the bottom.

gcc/tessuite/
    * c-c++-common/attr-simd-3.c: Put xfail (PR68158) on dg-error.

This test fails on bare-metal targets that don't support -fcilkplus or
-pthread.
Would you consider moving them to the cilkplus testing directory or
adding an appropriate
effective target check?
I think an effective-target-check is the most appropriate. The whole point here is to make that attribute independent of Cilk support.

jeff

Reply via email to