aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/attr-simd-3.c
diff options
context:
space:
mode:
authorKirill Yukhin <kirill.yukhin@intel.com>2015-11-16 13:14:57 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2015-11-16 13:14:57 +0000
commitfff7721799b3bf7cabbcdf1096eeab18b68ef5d3 (patch)
tree5731243bcaf252b767216c4d28809a9959258645 /gcc/testsuite/c-c++-common/attr-simd-3.c
parent56b08a5894fd02a502b2b40897a2aa892f70caec (diff)
downloadgcc-fff7721799b3bf7cabbcdf1096eeab18b68ef5d3.zip
gcc-fff7721799b3bf7cabbcdf1096eeab18b68ef5d3.tar.gz
gcc-fff7721799b3bf7cabbcdf1096eeab18b68ef5d3.tar.bz2
Add __attribute__((__simd__)) to GCC.
gcc/ * omp-low.c (pass_omp_simd_clone::gate): If target allows - call without additional conditions. * doc/extend.texi (@item simd): New. gcc/c-family/ * c-common.c (handle_simd_attribute): New. (struct attribute_spec): Add entry for "simd". (handle_simd_attribute): New. gcc/c/ * c-parser.c (c_finish_omp_declare_simd): Look for "simd" attribute as well. Update error message. gcc/cp/ * parser.c (cp_parser_late_parsing_cilk_simd_fn_info): Look for "simd" attribute as well. Update error message. gcc/testsuite/ * c-c++-common/attr-simd.c: New test. * c-c++-common/attr-simd-2.c: New test. * c-c++-common/attr-simd-3.c: New test. From-SVN: r230422
Diffstat (limited to 'gcc/testsuite/c-c++-common/attr-simd-3.c')
-rw-r--r--gcc/testsuite/c-c++-common/attr-simd-3.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/attr-simd-3.c b/gcc/testsuite/c-c++-common/attr-simd-3.c
new file mode 100644
index 0000000..2bbdf04
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/attr-simd-3.c
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+/* { dg-prune-output "undeclared here \\(not in a function\\)|\[^\n\r\]* was not declared in this scope" } */
+
+void f () __attribute__((__simd__, __vector__)); /* { dg-error "in the same function marked as a Cilk Plus" } */