diff options
author | Martin Liska <mliska@suse.cz> | 2018-11-27 14:06:48 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-11-27 13:06:48 +0000 |
commit | facf0354cfdaa555f376311b9d3c8fec79747f09 (patch) | |
tree | 3ef0c2c2a134b5685f82b8144402a410645d79a7 /gcc/fortran/parse.c | |
parent | 2ff5ffb623e17b6bb81532394cb1f42fe7b354c8 (diff) | |
download | gcc-facf0354cfdaa555f376311b9d3c8fec79747f09.zip gcc-facf0354cfdaa555f376311b9d3c8fec79747f09.tar.gz gcc-facf0354cfdaa555f376311b9d3c8fec79747f09.tar.bz2 |
Support simd function declarations via a pre-include.
2018-11-27 Martin Liska <mliska@suse.cz>
* config/gnu-user.h (TARGET_F951_OPTIONS): New.
* gcc.c (find_fortran_preinclude_file): New function
to handle Fortran pre-include.
2018-11-27 Martin Liska <mliska@suse.cz>
* decl.c (gfc_match_gcc_builtin): New function.
* gfortran.h (struct vect_builtin_tuple): New.
(gfc_adjust_builtins): Likewise.
* lang-specs.h (TARGET_F951_OPTIONS): New.
(F951_OPTIONS): Use it.
* lang.opt: Add new option -fpre-include.
* match.h (gfc_match_gcc_builtin): Declare new function.
* parse.c (decode_gcc_attribute): Handle builtin.
(parse_progunit): Call gfc_adjust_builtins.
* scanner.c (gfc_new_file): Load pre-included header file
when provided.
* trans-intrinsic.c (add_simd_flag_for_built_in): New.
(gfc_adjust_builtins): Likewise.
2018-11-27 Martin Liska <mliska@suse.cz>
* gfortran.dg/simd-builtins-1.f90: New test.
* gfortran.dg/simd-builtins-1.h: New test.
* gfortran.dg/simd-builtins-2.f90: New test.
* gfortran.dg/simd-builtins-3.f90: New test.
* gfortran.dg/simd-builtins-3.h: New test.
* gfortran.dg/simd-builtins-4.f: New test.
* gfortran.dg/simd-builtins-4.h: New test.
* gfortran.dg/simd-builtins-5.f: New test.
* gfortran.dg/simd-builtins-6.f90: New test.
From-SVN: r266509
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 13cc6f5..56d0d05 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -1072,6 +1072,7 @@ decode_gcc_attribute (void) match ("attributes", gfc_match_gcc_attributes, ST_ATTR_DECL); match ("unroll", gfc_match_gcc_unroll, ST_NONE); + match ("builtin", gfc_match_gcc_builtin, ST_NONE); /* All else has failed, so give up. See if any of the matchers has stored an error message of some sort. */ @@ -5663,6 +5664,8 @@ parse_progunit (gfc_statement st) gfc_state_data *p; int n; + gfc_adjust_builtins (); + if (gfc_new_block && gfc_new_block->abr_modproc_decl && gfc_new_block->attr.function) |