]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/lang-specs.h
PR fortran/95090 - ICE: identifier overflow
[thirdparty/gcc.git] / gcc / fortran / lang-specs.h
CommitLineData
6de9cd9a
DN
1/* Contribution to the specs for the GNU Compiler Collection
2 from GNU Fortran 95 compiler.
8d9254fc 3 Copyright (C) 2002-2020 Free Software Foundation, Inc.
6de9cd9a 4
d234d788
NC
5 This file is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This file is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GCC; see the file COPYING3. If not see
17 <http://www.gnu.org/licenses/>. */
6de9cd9a
DN
18
19/* This is the contribution to the `default_compilers' array in gcc.c
20 for the f95 language. */
21
c9071863
DF
22/* Identical to gcc.c (cpp_options), but omitting %(cpp_unique_options)
23 and -fpch-preprocess on -save-temps. */
24#define CPP_ONLY_OPTIONS "%1 %{m*} %{f*} %{g*:%{!g0:%{g*} \
25 %{!fno-working-directory:-fworking-directory}}} \
26 %{std*&ansi&trigraphs} %{W*&pedantic*} %{w} \
27 %{O*} %{undef}"
670637ee 28
c9071863 29/* Options that f951 should know about, even if not preprocessing. */
d8ddea40 30#define CPP_FORWARD_OPTIONS "%{i*} %{I*} %{M*}"
c9071863 31
6cfcf3ed 32#define F951_CPP_OPTIONS "%{!nocpp: -cpp=%g.f90 %{E} %(cpp_unique_options) \
c9071863
DF
33 %{E|M|MM:%(cpp_debug_options) " CPP_ONLY_OPTIONS \
34 " -fsyntax-only};: " CPP_FORWARD_OPTIONS "}"
facf0354
ML
35
36#ifndef TARGET_F951_OPTIONS
37#define TARGET_F951_OPTIONS
38#endif
39
c9071863 40#define F951_OPTIONS "%(cc1_options) %{J*} \
facf0354
ML
41 %{!nostdinc:-fintrinsic-modules-path finclude%s}" \
42 TARGET_F951_OPTIONS \
43 "%{!fsyntax-only:%(invoke_as)}"
c9071863 44#define F951_SOURCE_FORM "%{!ffree-form:-ffixed-form}"
670637ee
DF
45
46
d4fa05b9 47{".F", "@f77-cpp-input", 0, 0, 0},
1200489c
TB
48{".FOR", "@f77-cpp-input", 0, 0, 0},
49{".FTN", "@f77-cpp-input", 0, 0, 0},
d4fa05b9
TS
50{".fpp", "@f77-cpp-input", 0, 0, 0},
51{".FPP", "@f77-cpp-input", 0, 0, 0},
6de9cd9a 52{"@f77-cpp-input",
670637ee 53 "f951 %i " F951_SOURCE_FORM " " \
c9071863 54 F951_CPP_OPTIONS " %{!E:" F951_OPTIONS "}", 0, 0, 0},
670637ee
DF
55{".f", "@f77", 0, 0, 0},
56{".for", "@f77", 0, 0, 0},
57{".ftn", "@f77", 0, 0, 0},
58{"@f77",
59 "f951 %i " F951_SOURCE_FORM " \
60 %{E:%{!cpp:%egfortran does not support -E without -cpp}} \
c9071863
DF
61 %{cpp:" F951_CPP_OPTIONS ";: " CPP_FORWARD_OPTIONS "} \
62 %{!E:" F951_OPTIONS "}", 0, 0, 0},
d4fa05b9
TS
63{".F90", "@f95-cpp-input", 0, 0, 0},
64{".F95", "@f95-cpp-input", 0, 0, 0},
7befd5d2 65{".F03", "@f95-cpp-input", 0, 0, 0},
f489fba1 66{".F08", "@f95-cpp-input", 0, 0, 0},
6de9cd9a 67{"@f95-cpp-input",
670637ee 68 "f951 %i " F951_CPP_OPTIONS " %{!E:" F951_OPTIONS "}", 0, 0, 0},
d4fa05b9
TS
69{".f90", "@f95", 0, 0, 0},
70{".f95", "@f95", 0, 0, 0},
7befd5d2 71{".f03", "@f95", 0, 0, 0},
f489fba1 72{".f08", "@f95", 0, 0, 0},
c9071863 73{"@f95",
670637ee 74 "f951 %i %{E:%{!cpp:%egfortran does not support -E without -cpp}}\
c9071863
DF
75 %{cpp:" F951_CPP_OPTIONS ";: " CPP_FORWARD_OPTIONS "} \
76 %{!E:" F951_OPTIONS "}", 0, 0, 0},
670637ee
DF
77
78
c9071863
DF
79#undef CPP_ONLY_OPTIONS
80#undef CPP_FORWARD_OPTIONS
670637ee
DF
81#undef F951_SOURCE_FORM
82#undef F951_CPP_OPTIONS
83#undef F951_OPTIONS