From facf0354cfdaa555f376311b9d3c8fec79747f09 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 27 Nov 2018 14:06:48 +0100 Subject: Support simd function declarations via a pre-include. 2018-11-27 Martin Liska * 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 * 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 * 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 --- gcc/fortran/lang-specs.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc/fortran/lang-specs.h') diff --git a/gcc/fortran/lang-specs.h b/gcc/fortran/lang-specs.h index c3ab970..61a9118 100644 --- a/gcc/fortran/lang-specs.h +++ b/gcc/fortran/lang-specs.h @@ -32,9 +32,15 @@ #define F951_CPP_OPTIONS "%{!nocpp: -cpp=%g.f90 %{E} %(cpp_unique_options) \ %{E|M|MM:%(cpp_debug_options) " CPP_ONLY_OPTIONS \ " -fsyntax-only};: " CPP_FORWARD_OPTIONS "}" + +#ifndef TARGET_F951_OPTIONS +#define TARGET_F951_OPTIONS +#endif + #define F951_OPTIONS "%(cc1_options) %{J*} \ - %{!nostdinc:-fintrinsic-modules-path finclude%s}\ - %{!fsyntax-only:%(invoke_as)}" + %{!nostdinc:-fintrinsic-modules-path finclude%s}" \ + TARGET_F951_OPTIONS \ + "%{!fsyntax-only:%(invoke_as)}" #define F951_SOURCE_FORM "%{!ffree-form:-ffixed-form}" -- cgit v1.1