Support simd function declarations via a pre-include.
authorMartin Liska <mliska@suse.cz>
Tue, 27 Nov 2018 13:06:48 +0000 (14:06 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 27 Nov 2018 13:06:48 +0000 (13:06 +0000)
commitfacf0354cfdaa555f376311b9d3c8fec79747f09
tree3ef0c2c2a134b5685f82b8144402a410645d79a7
parent2ff5ffb623e17b6bb81532394cb1f42fe7b354c8
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
22 files changed:
gcc/ChangeLog
gcc/config/gnu-user.h
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/gfortran.h
gcc/fortran/lang-specs.h
gcc/fortran/lang.opt
gcc/fortran/match.h
gcc/fortran/parse.c
gcc/fortran/scanner.c
gcc/fortran/trans-intrinsic.c
gcc/gcc.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/simd-builtins-1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/simd-builtins-1.h [new file with mode: 0644]
gcc/testsuite/gfortran.dg/simd-builtins-2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/simd-builtins-3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/simd-builtins-3.h [new file with mode: 0644]
gcc/testsuite/gfortran.dg/simd-builtins-4.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/simd-builtins-4.h [new file with mode: 0644]
gcc/testsuite/gfortran.dg/simd-builtins-5.f [new file with mode: 0644]
gcc/testsuite/gfortran.dg/simd-builtins-6.f90 [new file with mode: 0644]