aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
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/cp
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/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/parser.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 322b693..7027d93 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * parser.c (cp_parser_late_parsing_cilk_simd_fn_info): Look for
+ "simd" attribute as well. Update error message.
+
2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* parser.c (cp_parser_omp_declare_target): Adjust.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 5e8614b..286c8db 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -35049,10 +35049,12 @@ cp_parser_late_parsing_cilk_simd_fn_info (cp_parser *parser, tree attrs)
cp_omp_declare_simd_data *info = parser->cilk_simd_fn_info;
int ii = 0;
- if (parser->omp_declare_simd != NULL)
+ if (parser->omp_declare_simd != NULL
+ || lookup_attribute ("simd", attrs))
{
- error ("%<#pragma omp declare simd%> cannot be used in the same function"
- " marked as a Cilk Plus SIMD-enabled function");
+ error ("%<#pragma omp declare simd%> of %<simd%> attribute cannot be "
+ "used in the same function marked as a Cilk Plus SIMD-enabled "
+ " function");
XDELETE (parser->cilk_simd_fn_info);
parser->cilk_simd_fn_info = NULL;
return attrs;