re PR target/36634 (-msecure-plt combine gives invalid call insn)
[official-gcc.git] / gcc / fortran / f95-lang.c
blob794cc41a2d0708626495e210bbb8ed8d2a542264
1 /* gfortran backend interface
2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
3 Free Software Foundation, Inc.
4 Contributed by Paul Brook.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 3, or (at your option) any later
11 version.
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
22 /* f95-lang.c-- GCC backend interface stuff */
24 /* declare required prototypes: */
26 #include "config.h"
27 #include "system.h"
28 #include "ansidecl.h"
29 #include "system.h"
30 #include "coretypes.h"
31 #include "tree.h"
32 #include "tree-gimple.h"
33 #include "flags.h"
34 #include "langhooks.h"
35 #include "langhooks-def.h"
36 #include "timevar.h"
37 #include "tm.h"
38 #include "function.h"
39 #include "ggc.h"
40 #include "toplev.h"
41 #include "target.h"
42 #include "debug.h"
43 #include "diagnostic.h"
44 #include "tree-dump.h"
45 #include "cgraph.h"
47 #include "gfortran.h"
48 #include "cpp.h"
49 #include "trans.h"
50 #include "trans-types.h"
51 #include "trans-const.h"
53 /* Language-dependent contents of an identifier. */
55 struct lang_identifier
56 GTY(())
58 struct tree_identifier common;
61 /* The resulting tree type. */
63 union lang_tree_node
64 GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"),
65 chain_next ("(union lang_tree_node *)GENERIC_NEXT (&%h.generic)")))
68 union tree_node GTY((tag ("0"),
69 desc ("tree_node_structure (&%h)"))) generic;
70 struct lang_identifier GTY((tag ("1"))) identifier;
73 /* Save and restore the variables in this file and elsewhere
74 that keep track of the progress of compilation of the current function.
75 Used for nested functions. */
77 struct language_function
78 GTY(())
80 /* struct gfc_language_function base; */
81 struct binding_level *binding_level;
84 /* We don't have a lex/yacc lexer/parser, but toplev expects these to
85 exist anyway. */
86 void yyerror (const char *str);
87 int yylex (void);
89 static void gfc_init_decl_processing (void);
90 static void gfc_init_builtin_functions (void);
92 /* Each front end provides its own. */
93 static bool gfc_init (void);
94 static void gfc_finish (void);
95 static void gfc_print_identifier (FILE *, tree, int);
96 static bool gfc_mark_addressable (tree);
97 void do_function_end (void);
98 int global_bindings_p (void);
99 static void clear_binding_stack (void);
100 static void gfc_be_parse_file (int);
101 static alias_set_type gfc_get_alias_set (tree);
103 #undef LANG_HOOKS_NAME
104 #undef LANG_HOOKS_INIT
105 #undef LANG_HOOKS_FINISH
106 #undef LANG_HOOKS_INIT_OPTIONS
107 #undef LANG_HOOKS_HANDLE_OPTION
108 #undef LANG_HOOKS_POST_OPTIONS
109 #undef LANG_HOOKS_PRINT_IDENTIFIER
110 #undef LANG_HOOKS_PARSE_FILE
111 #undef LANG_HOOKS_MARK_ADDRESSABLE
112 #undef LANG_HOOKS_TYPE_FOR_MODE
113 #undef LANG_HOOKS_TYPE_FOR_SIZE
114 #undef LANG_HOOKS_GET_ALIAS_SET
115 #undef LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE
116 #undef LANG_HOOKS_OMP_PREDETERMINED_SHARING
117 #undef LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR
118 #undef LANG_HOOKS_OMP_CLAUSE_COPY_CTOR
119 #undef LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP
120 #undef LANG_HOOKS_OMP_CLAUSE_DTOR
121 #undef LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR
122 #undef LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE
123 #undef LANG_HOOKS_OMP_PRIVATE_OUTER_REF
124 #undef LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES
125 #undef LANG_HOOKS_BUILTIN_FUNCTION
126 #undef LANG_HOOKS_GET_ARRAY_DESCR_INFO
128 /* Define lang hooks. */
129 #define LANG_HOOKS_NAME "GNU Fortran"
130 #define LANG_HOOKS_INIT gfc_init
131 #define LANG_HOOKS_FINISH gfc_finish
132 #define LANG_HOOKS_INIT_OPTIONS gfc_init_options
133 #define LANG_HOOKS_HANDLE_OPTION gfc_handle_option
134 #define LANG_HOOKS_POST_OPTIONS gfc_post_options
135 #define LANG_HOOKS_PRINT_IDENTIFIER gfc_print_identifier
136 #define LANG_HOOKS_PARSE_FILE gfc_be_parse_file
137 #define LANG_HOOKS_MARK_ADDRESSABLE gfc_mark_addressable
138 #define LANG_HOOKS_TYPE_FOR_MODE gfc_type_for_mode
139 #define LANG_HOOKS_TYPE_FOR_SIZE gfc_type_for_size
140 #define LANG_HOOKS_GET_ALIAS_SET gfc_get_alias_set
141 #define LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE gfc_omp_privatize_by_reference
142 #define LANG_HOOKS_OMP_PREDETERMINED_SHARING gfc_omp_predetermined_sharing
143 #define LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR gfc_omp_clause_default_ctor
144 #define LANG_HOOKS_OMP_CLAUSE_COPY_CTOR gfc_omp_clause_copy_ctor
145 #define LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP gfc_omp_clause_assign_op
146 #define LANG_HOOKS_OMP_CLAUSE_DTOR gfc_omp_clause_dtor
147 #define LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR gfc_omp_disregard_value_expr
148 #define LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE gfc_omp_private_debug_clause
149 #define LANG_HOOKS_OMP_PRIVATE_OUTER_REF gfc_omp_private_outer_ref
150 #define LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES \
151 gfc_omp_firstprivatize_type_sizes
152 #define LANG_HOOKS_BUILTIN_FUNCTION gfc_builtin_function
153 #define LANG_HOOKS_GET_ARRAY_DESCR_INFO gfc_get_array_descr_info
155 const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
157 #define NULL_BINDING_LEVEL (struct binding_level *) NULL
159 /* A chain of binding_level structures awaiting reuse. */
161 static GTY(()) struct binding_level *free_binding_level;
163 /* The elements of `ridpointers' are identifier nodes
164 for the reserved type names and storage classes.
165 It is indexed by a RID_... value. */
166 tree *ridpointers = NULL;
168 /* Prepare expr to be an argument of a TRUTH_NOT_EXPR,
169 or validate its data type for an `if' or `while' statement or ?..: exp.
171 This preparation consists of taking the ordinary
172 representation of an expression expr and producing a valid tree
173 boolean expression describing whether expr is nonzero. We could
174 simply always do build_binary_op (NE_EXPR, expr, boolean_false_node, 1),
175 but we optimize comparisons, &&, ||, and !.
177 The resulting type should always be `boolean_type_node'.
178 This is much simpler than the corresponding C version because we have a
179 distinct boolean type. */
181 tree
182 gfc_truthvalue_conversion (tree expr)
184 switch (TREE_CODE (TREE_TYPE (expr)))
186 case BOOLEAN_TYPE:
187 if (TREE_TYPE (expr) == boolean_type_node)
188 return expr;
189 else if (COMPARISON_CLASS_P (expr))
191 TREE_TYPE (expr) = boolean_type_node;
192 return expr;
194 else if (TREE_CODE (expr) == NOP_EXPR)
195 return fold_build1 (NOP_EXPR,
196 boolean_type_node, TREE_OPERAND (expr, 0));
197 else
198 return fold_build1 (NOP_EXPR, boolean_type_node, expr);
200 case INTEGER_TYPE:
201 if (TREE_CODE (expr) == INTEGER_CST)
202 return integer_zerop (expr) ? boolean_false_node : boolean_true_node;
203 else
204 return fold_build2 (NE_EXPR, boolean_type_node, expr,
205 build_int_cst (TREE_TYPE (expr), 0));
207 default:
208 internal_error ("Unexpected type in truthvalue_conversion");
213 static void
214 gfc_create_decls (void)
216 /* GCC builtins. */
217 gfc_init_builtin_functions ();
219 /* Runtime/IO library functions. */
220 gfc_build_builtin_function_decls ();
222 gfc_init_constants ();
226 static void
227 gfc_be_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
229 int errors;
230 int warnings;
232 gfc_create_decls ();
233 gfc_parse_file ();
234 gfc_generate_constructors ();
236 cgraph_finalize_compilation_unit ();
237 cgraph_optimize ();
239 /* Tell the frontent about any errors. */
240 gfc_get_errors (&warnings, &errors);
241 errorcount += errors;
242 warningcount += warnings;
244 clear_binding_stack ();
248 /* Initialize everything. */
250 static bool
251 gfc_init (void)
253 if (!gfc_cpp_enabled ())
255 linemap_add (line_table, LC_ENTER, false, gfc_source_file, 1);
256 linemap_add (line_table, LC_RENAME, false, "<built-in>", 0);
258 else
259 gfc_cpp_init_0 ();
261 gfc_init_decl_processing ();
262 gfc_static_ctors = NULL_TREE;
264 if (gfc_cpp_enabled ())
265 gfc_cpp_init ();
267 gfc_init_1 ();
269 if (gfc_new_file () != SUCCESS)
270 fatal_error ("can't open input file: %s", gfc_source_file);
272 return true;
276 static void
277 gfc_finish (void)
279 gfc_cpp_done ();
280 gfc_done_1 ();
281 gfc_release_include_path ();
282 return;
285 static void
286 gfc_print_identifier (FILE * file ATTRIBUTE_UNUSED,
287 tree node ATTRIBUTE_UNUSED,
288 int indent ATTRIBUTE_UNUSED)
290 return;
294 /* These functions and variables deal with binding contours. We only
295 need these functions for the list of PARM_DECLs, but we leave the
296 functions more general; these are a simplified version of the
297 functions from GNAT. */
299 /* For each binding contour we allocate a binding_level structure which
300 records the entities defined or declared in that contour. Contours
301 include:
303 the global one
304 one for each subprogram definition
305 one for each compound statement (declare block)
307 Binding contours are used to create GCC tree BLOCK nodes. */
309 struct binding_level
310 GTY(())
312 /* A chain of ..._DECL nodes for all variables, constants, functions,
313 parameters and type declarations. These ..._DECL nodes are chained
314 through the TREE_CHAIN field. Note that these ..._DECL nodes are stored
315 in the reverse of the order supplied to be compatible with the
316 back-end. */
317 tree names;
318 /* For each level (except the global one), a chain of BLOCK nodes for all
319 the levels that were entered and exited one level down from this one. */
320 tree blocks;
321 /* The binding level containing this one (the enclosing binding level). */
322 struct binding_level *level_chain;
325 /* The binding level currently in effect. */
326 static GTY(()) struct binding_level *current_binding_level = NULL;
328 /* The outermost binding level. This binding level is created when the
329 compiler is started and it will exist through the entire compilation. */
330 static GTY(()) struct binding_level *global_binding_level;
332 /* Binding level structures are initialized by copying this one. */
333 static struct binding_level clear_binding_level = { NULL, NULL, NULL };
336 /* Return nonzero if we are currently in the global binding level. */
339 global_bindings_p (void)
341 return current_binding_level == global_binding_level ? -1 : 0;
344 tree
345 getdecls (void)
347 return current_binding_level->names;
350 /* Enter a new binding level. The input parameter is ignored, but has to be
351 specified for back-end compatibility. */
353 void
354 pushlevel (int ignore ATTRIBUTE_UNUSED)
356 struct binding_level *newlevel
357 = (struct binding_level *) ggc_alloc (sizeof (struct binding_level));
359 *newlevel = clear_binding_level;
361 /* Add this level to the front of the chain (stack) of levels that are
362 active. */
363 newlevel->level_chain = current_binding_level;
364 current_binding_level = newlevel;
367 /* Exit a binding level.
368 Pop the level off, and restore the state of the identifier-decl mappings
369 that were in effect when this level was entered.
371 If KEEP is nonzero, this level had explicit declarations, so
372 and create a "block" (a BLOCK node) for the level
373 to record its declarations and subblocks for symbol table output.
375 If FUNCTIONBODY is nonzero, this level is the body of a function,
376 so create a block as if KEEP were set and also clear out all
377 label names.
379 If REVERSE is nonzero, reverse the order of decls before putting
380 them into the BLOCK. */
382 tree
383 poplevel (int keep, int reverse, int functionbody)
385 /* Points to a BLOCK tree node. This is the BLOCK node constructed for the
386 binding level that we are about to exit and which is returned by this
387 routine. */
388 tree block_node = NULL_TREE;
389 tree decl_chain;
390 tree subblock_chain = current_binding_level->blocks;
391 tree subblock_node;
393 /* Reverse the list of XXXX_DECL nodes if desired. Note that the ..._DECL
394 nodes chained through the `names' field of current_binding_level are in
395 reverse order except for PARM_DECL node, which are explicitly stored in
396 the right order. */
397 decl_chain = (reverse) ? nreverse (current_binding_level->names)
398 : current_binding_level->names;
400 /* If there were any declarations in the current binding level, or if this
401 binding level is a function body, or if there are any nested blocks then
402 create a BLOCK node to record them for the life of this function. */
403 if (keep || functionbody)
404 block_node = build_block (keep ? decl_chain : 0, subblock_chain, 0, 0);
406 /* Record the BLOCK node just built as the subblock its enclosing scope. */
407 for (subblock_node = subblock_chain; subblock_node;
408 subblock_node = TREE_CHAIN (subblock_node))
409 BLOCK_SUPERCONTEXT (subblock_node) = block_node;
411 /* Clear out the meanings of the local variables of this level. */
413 for (subblock_node = decl_chain; subblock_node;
414 subblock_node = TREE_CHAIN (subblock_node))
415 if (DECL_NAME (subblock_node) != 0)
416 /* If the identifier was used or addressed via a local extern decl,
417 don't forget that fact. */
418 if (DECL_EXTERNAL (subblock_node))
420 if (TREE_USED (subblock_node))
421 TREE_USED (DECL_NAME (subblock_node)) = 1;
422 if (TREE_ADDRESSABLE (subblock_node))
423 TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (subblock_node)) = 1;
426 /* Pop the current level. */
427 current_binding_level = current_binding_level->level_chain;
429 if (functionbody)
431 /* This is the top level block of a function. The ..._DECL chain stored
432 in BLOCK_VARS are the function's parameters (PARM_DECL nodes). Don't
433 leave them in the BLOCK because they are found in the FUNCTION_DECL
434 instead. */
435 DECL_INITIAL (current_function_decl) = block_node;
436 BLOCK_VARS (block_node) = 0;
438 else if (block_node)
440 current_binding_level->blocks
441 = chainon (current_binding_level->blocks, block_node);
444 /* If we did not make a block for the level just exited, any blocks made for
445 inner levels (since they cannot be recorded as subblocks in that level)
446 must be carried forward so they will later become subblocks of something
447 else. */
448 else if (subblock_chain)
449 current_binding_level->blocks
450 = chainon (current_binding_level->blocks, subblock_chain);
451 if (block_node)
452 TREE_USED (block_node) = 1;
454 return block_node;
458 /* Records a ..._DECL node DECL as belonging to the current lexical scope.
459 Returns the ..._DECL node. */
461 tree
462 pushdecl (tree decl)
464 /* External objects aren't nested, other objects may be. */
465 if ((DECL_EXTERNAL (decl)) || (decl == current_function_decl))
466 DECL_CONTEXT (decl) = 0;
467 else
468 DECL_CONTEXT (decl) = current_function_decl;
470 /* Put the declaration on the list. The list of declarations is in reverse
471 order. The list will be reversed later if necessary. This needs to be
472 this way for compatibility with the back-end. */
474 TREE_CHAIN (decl) = current_binding_level->names;
475 current_binding_level->names = decl;
477 /* For the declaration of a type, set its name if it is not already set. */
479 if (TREE_CODE (decl) == TYPE_DECL && TYPE_NAME (TREE_TYPE (decl)) == 0)
481 if (DECL_SOURCE_LINE (decl) == 0)
482 TYPE_NAME (TREE_TYPE (decl)) = decl;
483 else
484 TYPE_NAME (TREE_TYPE (decl)) = DECL_NAME (decl);
487 return decl;
491 /* Like pushdecl, only it places X in GLOBAL_BINDING_LEVEL. */
493 tree
494 pushdecl_top_level (tree x)
496 tree t;
497 struct binding_level *b = current_binding_level;
499 current_binding_level = global_binding_level;
500 t = pushdecl (x);
501 current_binding_level = b;
502 return t;
506 /* Clear the binding stack. */
507 static void
508 clear_binding_stack (void)
510 while (!global_bindings_p ())
511 poplevel (0, 0, 0);
515 #ifndef CHAR_TYPE_SIZE
516 #define CHAR_TYPE_SIZE BITS_PER_UNIT
517 #endif
519 #ifndef INT_TYPE_SIZE
520 #define INT_TYPE_SIZE BITS_PER_WORD
521 #endif
523 #undef SIZE_TYPE
524 #define SIZE_TYPE "long unsigned int"
526 /* Create tree nodes for the basic scalar types of Fortran 95,
527 and some nodes representing standard constants (0, 1, (void *) 0).
528 Initialize the global binding level.
529 Make definitions for built-in primitive functions. */
530 static void
531 gfc_init_decl_processing (void)
533 current_function_decl = NULL;
534 current_binding_level = NULL_BINDING_LEVEL;
535 free_binding_level = NULL_BINDING_LEVEL;
537 /* Make the binding_level structure for global names. We move all
538 variables that are in a COMMON block to this binding level. */
539 pushlevel (0);
540 global_binding_level = current_binding_level;
542 /* Build common tree nodes. char_type_node is unsigned because we
543 only use it for actual characters, not for INTEGER(1). Also, we
544 want double_type_node to actually have double precision. */
545 build_common_tree_nodes (false, false);
546 /* x86_64 minw32 has a sizetype of "unsigned long long", most other hosts
547 have a sizetype of "unsigned long". Therefore choose the correct size
548 in mostly target independent way. */
549 if (TYPE_MODE (long_unsigned_type_node) == ptr_mode)
550 set_sizetype (long_unsigned_type_node);
551 else if (TYPE_MODE (long_long_unsigned_type_node) == ptr_mode)
552 set_sizetype (long_long_unsigned_type_node);
553 else
554 set_sizetype (long_unsigned_type_node);
555 build_common_tree_nodes_2 (0);
556 void_list_node = build_tree_list (NULL_TREE, void_type_node);
558 /* Set up F95 type nodes. */
559 gfc_init_kinds ();
560 gfc_init_types ();
564 /* Mark EXP saying that we need to be able to take the
565 address of it; it should not be allocated in a register.
566 In Fortran 95 this is only the case for variables with
567 the TARGET attribute, but we implement it here for a
568 likely future Cray pointer extension.
569 Value is 1 if successful. */
570 /* TODO: Check/fix mark_addressable. */
572 bool
573 gfc_mark_addressable (tree exp)
575 register tree x = exp;
576 while (1)
577 switch (TREE_CODE (x))
579 case COMPONENT_REF:
580 case ADDR_EXPR:
581 case ARRAY_REF:
582 case REALPART_EXPR:
583 case IMAGPART_EXPR:
584 x = TREE_OPERAND (x, 0);
585 break;
587 case CONSTRUCTOR:
588 TREE_ADDRESSABLE (x) = 1;
589 return true;
591 case VAR_DECL:
592 case CONST_DECL:
593 case PARM_DECL:
594 case RESULT_DECL:
595 if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x) && DECL_NONLOCAL (x))
597 if (TREE_PUBLIC (x))
599 error ("global register variable %qs used in nested function",
600 IDENTIFIER_POINTER (DECL_NAME (x)));
601 return false;
603 pedwarn ("register variable %qs used in nested function",
604 IDENTIFIER_POINTER (DECL_NAME (x)));
606 else if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x))
608 if (TREE_PUBLIC (x))
610 error ("address of global register variable %qs requested",
611 IDENTIFIER_POINTER (DECL_NAME (x)));
612 return true;
615 #if 0
616 /* If we are making this addressable due to its having
617 volatile components, give a different error message. Also
618 handle the case of an unnamed parameter by not trying
619 to give the name. */
621 else if (C_TYPE_FIELDS_VOLATILE (TREE_TYPE (x)))
623 error ("cannot put object with volatile field into register");
624 return false;
626 #endif
628 pedwarn ("address of register variable %qs requested",
629 IDENTIFIER_POINTER (DECL_NAME (x)));
632 /* drops in */
633 case FUNCTION_DECL:
634 TREE_ADDRESSABLE (x) = 1;
636 default:
637 return true;
642 /* Return the typed-based alias set for T, which may be an expression
643 or a type. Return -1 if we don't do anything special. */
645 static alias_set_type
646 gfc_get_alias_set (tree t)
648 tree u;
650 /* Permit type-punning when accessing an EQUIVALENCEd variable or
651 mixed type entry master's return value. */
652 for (u = t; handled_component_p (u); u = TREE_OPERAND (u, 0))
653 if (TREE_CODE (u) == COMPONENT_REF
654 && TREE_CODE (TREE_TYPE (TREE_OPERAND (u, 0))) == UNION_TYPE)
655 return 0;
657 return -1;
661 /* press the big red button - garbage (ggc) collection is on */
663 int ggc_p = 1;
665 /* Builtin function initialization. */
667 tree
668 gfc_builtin_function (tree decl)
670 make_decl_rtl (decl);
671 pushdecl (decl);
672 return decl;
676 static void
677 gfc_define_builtin (const char *name,
678 tree type,
679 int code,
680 const char *library_name,
681 bool const_p)
683 tree decl;
685 decl = add_builtin_function (name, type, code, BUILT_IN_NORMAL,
686 library_name, NULL_TREE);
687 if (const_p)
688 TREE_READONLY (decl) = 1;
690 built_in_decls[code] = decl;
691 implicit_built_in_decls[code] = decl;
695 #define DO_DEFINE_MATH_BUILTIN(code, name, argtype, tbase) \
696 gfc_define_builtin ("__builtin_" name "l", tbase##longdouble[argtype], \
697 BUILT_IN_ ## code ## L, name "l", true); \
698 gfc_define_builtin ("__builtin_" name, tbase##double[argtype], \
699 BUILT_IN_ ## code, name, true); \
700 gfc_define_builtin ("__builtin_" name "f", tbase##float[argtype], \
701 BUILT_IN_ ## code ## F, name "f", true);
703 #define DEFINE_MATH_BUILTIN(code, name, argtype) \
704 DO_DEFINE_MATH_BUILTIN (code, name, argtype, mfunc_)
706 #define DEFINE_MATH_BUILTIN_C(code, name, argtype) \
707 DO_DEFINE_MATH_BUILTIN (code, name, argtype, mfunc_) \
708 DO_DEFINE_MATH_BUILTIN (C##code, "c" name, argtype, mfunc_c)
711 /* Create function types for builtin functions. */
713 static void
714 build_builtin_fntypes (tree *fntype, tree type)
716 tree tmp;
718 /* type (*) (type) */
719 tmp = tree_cons (NULL_TREE, type, void_list_node);
720 fntype[0] = build_function_type (type, tmp);
721 /* type (*) (type, type) */
722 tmp = tree_cons (NULL_TREE, type, tmp);
723 fntype[1] = build_function_type (type, tmp);
724 /* type (*) (int, type) */
725 tmp = tree_cons (NULL_TREE, integer_type_node, void_list_node);
726 tmp = tree_cons (NULL_TREE, type, tmp);
727 fntype[2] = build_function_type (type, tmp);
728 /* type (*) (void) */
729 fntype[3] = build_function_type (type, void_list_node);
730 /* type (*) (type, &int) */
731 tmp = tree_cons (NULL_TREE, type, void_list_node);
732 tmp = tree_cons (NULL_TREE, build_pointer_type (integer_type_node), tmp);
733 fntype[4] = build_function_type (type, tmp);
734 /* type (*) (type, int) */
735 tmp = tree_cons (NULL_TREE, type, void_list_node);
736 tmp = tree_cons (NULL_TREE, integer_type_node, tmp);
737 fntype[5] = build_function_type (type, tmp);
741 static tree
742 builtin_type_for_size (int size, bool unsignedp)
744 tree type = lang_hooks.types.type_for_size (size, unsignedp);
745 return type ? type : error_mark_node;
748 /* Initialization of builtin function nodes. */
750 static void
751 gfc_init_builtin_functions (void)
753 enum builtin_type
755 #define DEF_PRIMITIVE_TYPE(NAME, VALUE) NAME,
756 #define DEF_FUNCTION_TYPE_0(NAME, RETURN) NAME,
757 #define DEF_FUNCTION_TYPE_1(NAME, RETURN, ARG1) NAME,
758 #define DEF_FUNCTION_TYPE_2(NAME, RETURN, ARG1, ARG2) NAME,
759 #define DEF_FUNCTION_TYPE_3(NAME, RETURN, ARG1, ARG2, ARG3) NAME,
760 #define DEF_FUNCTION_TYPE_4(NAME, RETURN, ARG1, ARG2, ARG3, ARG4) NAME,
761 #define DEF_FUNCTION_TYPE_5(NAME, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5) NAME,
762 #define DEF_FUNCTION_TYPE_6(NAME, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) NAME,
763 #define DEF_FUNCTION_TYPE_7(NAME, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) NAME,
764 #define DEF_FUNCTION_TYPE_VAR_0(NAME, RETURN) NAME,
765 #define DEF_POINTER_TYPE(NAME, TYPE) NAME,
766 #include "types.def"
767 #undef DEF_PRIMITIVE_TYPE
768 #undef DEF_FUNCTION_TYPE_0
769 #undef DEF_FUNCTION_TYPE_1
770 #undef DEF_FUNCTION_TYPE_2
771 #undef DEF_FUNCTION_TYPE_3
772 #undef DEF_FUNCTION_TYPE_4
773 #undef DEF_FUNCTION_TYPE_5
774 #undef DEF_FUNCTION_TYPE_6
775 #undef DEF_FUNCTION_TYPE_7
776 #undef DEF_FUNCTION_TYPE_VAR_0
777 #undef DEF_POINTER_TYPE
778 BT_LAST
780 typedef enum builtin_type builtin_type;
781 enum
783 /* So far we need just these 2 attribute types. */
784 ATTR_NOTHROW_LIST,
785 ATTR_CONST_NOTHROW_LIST
788 tree mfunc_float[6];
789 tree mfunc_double[6];
790 tree mfunc_longdouble[6];
791 tree mfunc_cfloat[6];
792 tree mfunc_cdouble[6];
793 tree mfunc_clongdouble[6];
794 tree func_cfloat_float, func_float_cfloat;
795 tree func_cdouble_double, func_double_cdouble;
796 tree func_clongdouble_longdouble, func_longdouble_clongdouble;
797 tree func_float_floatp_floatp;
798 tree func_double_doublep_doublep;
799 tree func_longdouble_longdoublep_longdoublep;
800 tree ftype, ptype;
801 tree tmp, type;
802 tree builtin_types[(int) BT_LAST + 1];
804 build_builtin_fntypes (mfunc_float, float_type_node);
805 build_builtin_fntypes (mfunc_double, double_type_node);
806 build_builtin_fntypes (mfunc_longdouble, long_double_type_node);
807 build_builtin_fntypes (mfunc_cfloat, complex_float_type_node);
808 build_builtin_fntypes (mfunc_cdouble, complex_double_type_node);
809 build_builtin_fntypes (mfunc_clongdouble, complex_long_double_type_node);
811 tmp = tree_cons (NULL_TREE, complex_float_type_node, void_list_node);
812 func_cfloat_float = build_function_type (float_type_node, tmp);
814 tmp = tree_cons (NULL_TREE, float_type_node, void_list_node);
815 func_float_cfloat = build_function_type (complex_float_type_node, tmp);
817 tmp = tree_cons (NULL_TREE, complex_double_type_node, void_list_node);
818 func_cdouble_double = build_function_type (double_type_node, tmp);
820 tmp = tree_cons (NULL_TREE, double_type_node, void_list_node);
821 func_double_cdouble = build_function_type (complex_double_type_node, tmp);
823 tmp = tree_cons (NULL_TREE, complex_long_double_type_node, void_list_node);
824 func_clongdouble_longdouble =
825 build_function_type (long_double_type_node, tmp);
827 tmp = tree_cons (NULL_TREE, long_double_type_node, void_list_node);
828 func_longdouble_clongdouble =
829 build_function_type (complex_long_double_type_node, tmp);
831 ptype = build_pointer_type (float_type_node);
832 tmp = tree_cons (NULL_TREE, float_type_node,
833 tree_cons (NULL_TREE, ptype,
834 tree_cons (NULL_TREE, ptype, void_list_node)));
835 func_float_floatp_floatp =
836 build_function_type (void_type_node, tmp);
838 ptype = build_pointer_type (double_type_node);
839 tmp = tree_cons (NULL_TREE, double_type_node,
840 tree_cons (NULL_TREE, ptype,
841 tree_cons (NULL_TREE, ptype, void_list_node)));
842 func_double_doublep_doublep =
843 build_function_type (void_type_node, tmp);
845 ptype = build_pointer_type (long_double_type_node);
846 tmp = tree_cons (NULL_TREE, long_double_type_node,
847 tree_cons (NULL_TREE, ptype,
848 tree_cons (NULL_TREE, ptype, void_list_node)));
849 func_longdouble_longdoublep_longdoublep =
850 build_function_type (void_type_node, tmp);
852 #include "mathbuiltins.def"
854 /* We define these separately as the fortran versions have different
855 semantics (they return an integer type) */
856 gfc_define_builtin ("__builtin_roundl", mfunc_longdouble[0],
857 BUILT_IN_ROUNDL, "roundl", true);
858 gfc_define_builtin ("__builtin_round", mfunc_double[0],
859 BUILT_IN_ROUND, "round", true);
860 gfc_define_builtin ("__builtin_roundf", mfunc_float[0],
861 BUILT_IN_ROUNDF, "roundf", true);
863 gfc_define_builtin ("__builtin_truncl", mfunc_longdouble[0],
864 BUILT_IN_TRUNCL, "truncl", true);
865 gfc_define_builtin ("__builtin_trunc", mfunc_double[0],
866 BUILT_IN_TRUNC, "trunc", true);
867 gfc_define_builtin ("__builtin_truncf", mfunc_float[0],
868 BUILT_IN_TRUNCF, "truncf", true);
870 gfc_define_builtin ("__builtin_cabsl", func_clongdouble_longdouble,
871 BUILT_IN_CABSL, "cabsl", true);
872 gfc_define_builtin ("__builtin_cabs", func_cdouble_double,
873 BUILT_IN_CABS, "cabs", true);
874 gfc_define_builtin ("__builtin_cabsf", func_cfloat_float,
875 BUILT_IN_CABSF, "cabsf", true);
877 gfc_define_builtin ("__builtin_copysignl", mfunc_longdouble[1],
878 BUILT_IN_COPYSIGNL, "copysignl", true);
879 gfc_define_builtin ("__builtin_copysign", mfunc_double[1],
880 BUILT_IN_COPYSIGN, "copysign", true);
881 gfc_define_builtin ("__builtin_copysignf", mfunc_float[1],
882 BUILT_IN_COPYSIGNF, "copysignf", true);
884 gfc_define_builtin ("__builtin_nextafterl", mfunc_longdouble[1],
885 BUILT_IN_NEXTAFTERL, "nextafterl", true);
886 gfc_define_builtin ("__builtin_nextafter", mfunc_double[1],
887 BUILT_IN_NEXTAFTER, "nextafter", true);
888 gfc_define_builtin ("__builtin_nextafterf", mfunc_float[1],
889 BUILT_IN_NEXTAFTERF, "nextafterf", true);
891 gfc_define_builtin ("__builtin_frexpl", mfunc_longdouble[4],
892 BUILT_IN_FREXPL, "frexpl", false);
893 gfc_define_builtin ("__builtin_frexp", mfunc_double[4],
894 BUILT_IN_FREXP, "frexp", false);
895 gfc_define_builtin ("__builtin_frexpf", mfunc_float[4],
896 BUILT_IN_FREXPF, "frexpf", false);
898 gfc_define_builtin ("__builtin_fabsl", mfunc_longdouble[0],
899 BUILT_IN_FABSL, "fabsl", true);
900 gfc_define_builtin ("__builtin_fabs", mfunc_double[0],
901 BUILT_IN_FABS, "fabs", true);
902 gfc_define_builtin ("__builtin_fabsf", mfunc_float[0],
903 BUILT_IN_FABSF, "fabsf", true);
905 gfc_define_builtin ("__builtin_scalbnl", mfunc_longdouble[5],
906 BUILT_IN_SCALBNL, "scalbnl", true);
907 gfc_define_builtin ("__builtin_scalbn", mfunc_double[5],
908 BUILT_IN_SCALBN, "scalbn", true);
909 gfc_define_builtin ("__builtin_scalbnf", mfunc_float[5],
910 BUILT_IN_SCALBNF, "scalbnf", true);
912 gfc_define_builtin ("__builtin_fmodl", mfunc_longdouble[1],
913 BUILT_IN_FMODL, "fmodl", true);
914 gfc_define_builtin ("__builtin_fmod", mfunc_double[1],
915 BUILT_IN_FMOD, "fmod", true);
916 gfc_define_builtin ("__builtin_fmodf", mfunc_float[1],
917 BUILT_IN_FMODF, "fmodf", true);
919 gfc_define_builtin ("__builtin_infl", mfunc_longdouble[3],
920 BUILT_IN_INFL, "__builtin_infl", true);
921 gfc_define_builtin ("__builtin_inf", mfunc_double[3],
922 BUILT_IN_INF, "__builtin_inf", true);
923 gfc_define_builtin ("__builtin_inff", mfunc_float[3],
924 BUILT_IN_INFF, "__builtin_inff", true);
926 /* lround{f,,l} and llround{f,,l} */
927 type = tree_cons (NULL_TREE, float_type_node, void_list_node);
928 tmp = build_function_type (long_integer_type_node, type);
929 gfc_define_builtin ("__builtin_lroundf", tmp, BUILT_IN_LROUNDF,
930 "lroundf", true);
931 tmp = build_function_type (long_long_integer_type_node, type);
932 gfc_define_builtin ("__builtin_llroundf", tmp, BUILT_IN_LLROUNDF,
933 "llroundf", true);
935 type = tree_cons (NULL_TREE, double_type_node, void_list_node);
936 tmp = build_function_type (long_integer_type_node, type);
937 gfc_define_builtin ("__builtin_lround", tmp, BUILT_IN_LROUND,
938 "lround", true);
939 tmp = build_function_type (long_long_integer_type_node, type);
940 gfc_define_builtin ("__builtin_llround", tmp, BUILT_IN_LLROUND,
941 "llround", true);
943 type = tree_cons (NULL_TREE, long_double_type_node, void_list_node);
944 tmp = build_function_type (long_integer_type_node, type);
945 gfc_define_builtin ("__builtin_lroundl", tmp, BUILT_IN_LROUNDL,
946 "lroundl", true);
947 tmp = build_function_type (long_long_integer_type_node, type);
948 gfc_define_builtin ("__builtin_llroundl", tmp, BUILT_IN_LLROUNDL,
949 "llroundl", true);
951 /* These are used to implement the ** operator. */
952 gfc_define_builtin ("__builtin_powl", mfunc_longdouble[1],
953 BUILT_IN_POWL, "powl", true);
954 gfc_define_builtin ("__builtin_pow", mfunc_double[1],
955 BUILT_IN_POW, "pow", true);
956 gfc_define_builtin ("__builtin_powf", mfunc_float[1],
957 BUILT_IN_POWF, "powf", true);
958 gfc_define_builtin ("__builtin_cpowl", mfunc_clongdouble[1],
959 BUILT_IN_CPOWL, "cpowl", true);
960 gfc_define_builtin ("__builtin_cpow", mfunc_cdouble[1],
961 BUILT_IN_CPOW, "cpow", true);
962 gfc_define_builtin ("__builtin_cpowf", mfunc_cfloat[1],
963 BUILT_IN_CPOWF, "cpowf", true);
964 gfc_define_builtin ("__builtin_powil", mfunc_longdouble[2],
965 BUILT_IN_POWIL, "powil", true);
966 gfc_define_builtin ("__builtin_powi", mfunc_double[2],
967 BUILT_IN_POWI, "powi", true);
968 gfc_define_builtin ("__builtin_powif", mfunc_float[2],
969 BUILT_IN_POWIF, "powif", true);
972 if (TARGET_C99_FUNCTIONS)
974 gfc_define_builtin ("__builtin_cbrtl", mfunc_longdouble[0],
975 BUILT_IN_CBRTL, "cbrtl", true);
976 gfc_define_builtin ("__builtin_cbrt", mfunc_double[0],
977 BUILT_IN_CBRT, "cbrt", true);
978 gfc_define_builtin ("__builtin_cbrtf", mfunc_float[0],
979 BUILT_IN_CBRTF, "cbrtf", true);
980 gfc_define_builtin ("__builtin_cexpil", func_longdouble_clongdouble,
981 BUILT_IN_CEXPIL, "cexpil", true);
982 gfc_define_builtin ("__builtin_cexpi", func_double_cdouble,
983 BUILT_IN_CEXPI, "cexpi", true);
984 gfc_define_builtin ("__builtin_cexpif", func_float_cfloat,
985 BUILT_IN_CEXPIF, "cexpif", true);
988 if (TARGET_HAS_SINCOS)
990 gfc_define_builtin ("__builtin_sincosl",
991 func_longdouble_longdoublep_longdoublep,
992 BUILT_IN_SINCOSL, "sincosl", false);
993 gfc_define_builtin ("__builtin_sincos", func_double_doublep_doublep,
994 BUILT_IN_SINCOS, "sincos", false);
995 gfc_define_builtin ("__builtin_sincosf", func_float_floatp_floatp,
996 BUILT_IN_SINCOSF, "sincosf", false);
999 /* Other builtin functions we use. */
1001 tmp = tree_cons (NULL_TREE, long_integer_type_node, void_list_node);
1002 tmp = tree_cons (NULL_TREE, long_integer_type_node, tmp);
1003 ftype = build_function_type (long_integer_type_node, tmp);
1004 gfc_define_builtin ("__builtin_expect", ftype, BUILT_IN_EXPECT,
1005 "__builtin_expect", true);
1007 tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node);
1008 ftype = build_function_type (void_type_node, tmp);
1009 gfc_define_builtin ("__builtin_free", ftype, BUILT_IN_FREE,
1010 "free", false);
1012 tmp = tree_cons (NULL_TREE, size_type_node, void_list_node);
1013 ftype = build_function_type (pvoid_type_node, tmp);
1014 gfc_define_builtin ("__builtin_malloc", ftype, BUILT_IN_MALLOC,
1015 "malloc", false);
1016 DECL_IS_MALLOC (built_in_decls[BUILT_IN_MALLOC]) = 1;
1018 tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node);
1019 tmp = tree_cons (NULL_TREE, size_type_node, tmp);
1020 ftype = build_function_type (pvoid_type_node, tmp);
1021 gfc_define_builtin ("__builtin_realloc", ftype, BUILT_IN_REALLOC,
1022 "realloc", false);
1024 tmp = tree_cons (NULL_TREE, void_type_node, void_list_node);
1025 ftype = build_function_type (integer_type_node, tmp);
1026 gfc_define_builtin ("__builtin_isnan", ftype, BUILT_IN_ISNAN,
1027 "__builtin_isnan", true);
1029 #define DEF_PRIMITIVE_TYPE(ENUM, VALUE) \
1030 builtin_types[(int) ENUM] = VALUE;
1031 #define DEF_FUNCTION_TYPE_0(ENUM, RETURN) \
1032 builtin_types[(int) ENUM] \
1033 = build_function_type (builtin_types[(int) RETURN], \
1034 void_list_node);
1035 #define DEF_FUNCTION_TYPE_1(ENUM, RETURN, ARG1) \
1036 builtin_types[(int) ENUM] \
1037 = build_function_type (builtin_types[(int) RETURN], \
1038 tree_cons (NULL_TREE, \
1039 builtin_types[(int) ARG1], \
1040 void_list_node));
1041 #define DEF_FUNCTION_TYPE_2(ENUM, RETURN, ARG1, ARG2) \
1042 builtin_types[(int) ENUM] \
1043 = build_function_type \
1044 (builtin_types[(int) RETURN], \
1045 tree_cons (NULL_TREE, \
1046 builtin_types[(int) ARG1], \
1047 tree_cons (NULL_TREE, \
1048 builtin_types[(int) ARG2], \
1049 void_list_node)));
1050 #define DEF_FUNCTION_TYPE_3(ENUM, RETURN, ARG1, ARG2, ARG3) \
1051 builtin_types[(int) ENUM] \
1052 = build_function_type \
1053 (builtin_types[(int) RETURN], \
1054 tree_cons (NULL_TREE, \
1055 builtin_types[(int) ARG1], \
1056 tree_cons (NULL_TREE, \
1057 builtin_types[(int) ARG2], \
1058 tree_cons (NULL_TREE, \
1059 builtin_types[(int) ARG3], \
1060 void_list_node))));
1061 #define DEF_FUNCTION_TYPE_4(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4) \
1062 builtin_types[(int) ENUM] \
1063 = build_function_type \
1064 (builtin_types[(int) RETURN], \
1065 tree_cons (NULL_TREE, \
1066 builtin_types[(int) ARG1], \
1067 tree_cons (NULL_TREE, \
1068 builtin_types[(int) ARG2], \
1069 tree_cons \
1070 (NULL_TREE, \
1071 builtin_types[(int) ARG3], \
1072 tree_cons (NULL_TREE, \
1073 builtin_types[(int) ARG4], \
1074 void_list_node)))));
1075 #define DEF_FUNCTION_TYPE_5(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5) \
1076 builtin_types[(int) ENUM] \
1077 = build_function_type \
1078 (builtin_types[(int) RETURN], \
1079 tree_cons (NULL_TREE, \
1080 builtin_types[(int) ARG1], \
1081 tree_cons (NULL_TREE, \
1082 builtin_types[(int) ARG2], \
1083 tree_cons \
1084 (NULL_TREE, \
1085 builtin_types[(int) ARG3], \
1086 tree_cons (NULL_TREE, \
1087 builtin_types[(int) ARG4], \
1088 tree_cons (NULL_TREE, \
1089 builtin_types[(int) ARG5],\
1090 void_list_node))))));
1091 #define DEF_FUNCTION_TYPE_6(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, \
1092 ARG6) \
1093 builtin_types[(int) ENUM] \
1094 = build_function_type \
1095 (builtin_types[(int) RETURN], \
1096 tree_cons (NULL_TREE, \
1097 builtin_types[(int) ARG1], \
1098 tree_cons (NULL_TREE, \
1099 builtin_types[(int) ARG2], \
1100 tree_cons \
1101 (NULL_TREE, \
1102 builtin_types[(int) ARG3], \
1103 tree_cons \
1104 (NULL_TREE, \
1105 builtin_types[(int) ARG4], \
1106 tree_cons (NULL_TREE, \
1107 builtin_types[(int) ARG5], \
1108 tree_cons (NULL_TREE, \
1109 builtin_types[(int) ARG6],\
1110 void_list_node)))))));
1111 #define DEF_FUNCTION_TYPE_7(ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, \
1112 ARG6, ARG7) \
1113 builtin_types[(int) ENUM] \
1114 = build_function_type \
1115 (builtin_types[(int) RETURN], \
1116 tree_cons (NULL_TREE, \
1117 builtin_types[(int) ARG1], \
1118 tree_cons (NULL_TREE, \
1119 builtin_types[(int) ARG2], \
1120 tree_cons \
1121 (NULL_TREE, \
1122 builtin_types[(int) ARG3], \
1123 tree_cons \
1124 (NULL_TREE, \
1125 builtin_types[(int) ARG4], \
1126 tree_cons (NULL_TREE, \
1127 builtin_types[(int) ARG5], \
1128 tree_cons (NULL_TREE, \
1129 builtin_types[(int) ARG6],\
1130 tree_cons (NULL_TREE, \
1131 builtin_types[(int) ARG6], \
1132 void_list_node))))))));
1133 #define DEF_FUNCTION_TYPE_VAR_0(ENUM, RETURN) \
1134 builtin_types[(int) ENUM] \
1135 = build_function_type (builtin_types[(int) RETURN], NULL_TREE);
1136 #define DEF_POINTER_TYPE(ENUM, TYPE) \
1137 builtin_types[(int) ENUM] \
1138 = build_pointer_type (builtin_types[(int) TYPE]);
1139 #include "types.def"
1140 #undef DEF_PRIMITIVE_TYPE
1141 #undef DEF_FUNCTION_TYPE_1
1142 #undef DEF_FUNCTION_TYPE_2
1143 #undef DEF_FUNCTION_TYPE_3
1144 #undef DEF_FUNCTION_TYPE_4
1145 #undef DEF_FUNCTION_TYPE_5
1146 #undef DEF_FUNCTION_TYPE_6
1147 #undef DEF_FUNCTION_TYPE_VAR_0
1148 #undef DEF_POINTER_TYPE
1149 builtin_types[(int) BT_LAST] = NULL_TREE;
1151 /* Initialize synchronization builtins. */
1152 #undef DEF_SYNC_BUILTIN
1153 #define DEF_SYNC_BUILTIN(code, name, type, attr) \
1154 gfc_define_builtin (name, builtin_types[type], code, name, \
1155 attr == ATTR_CONST_NOTHROW_LIST);
1156 #include "../sync-builtins.def"
1157 #undef DEF_SYNC_BUILTIN
1159 if (gfc_option.flag_openmp || flag_tree_parallelize_loops)
1161 #undef DEF_GOMP_BUILTIN
1162 #define DEF_GOMP_BUILTIN(code, name, type, attr) \
1163 gfc_define_builtin ("__builtin_" name, builtin_types[type], \
1164 code, name, attr == ATTR_CONST_NOTHROW_LIST);
1165 #include "../omp-builtins.def"
1166 #undef DEF_GOMP_BUILTIN
1169 gfc_define_builtin ("__builtin_trap", builtin_types[BT_FN_VOID],
1170 BUILT_IN_TRAP, NULL, false);
1171 TREE_THIS_VOLATILE (built_in_decls[BUILT_IN_TRAP]) = 1;
1173 gfc_define_builtin ("__emutls_get_address",
1174 builtin_types[BT_FN_PTR_PTR], BUILT_IN_EMUTLS_GET_ADDRESS,
1175 "__emutls_get_address", true);
1176 gfc_define_builtin ("__emutls_register_common",
1177 builtin_types[BT_FN_VOID_PTR_WORD_WORD_PTR],
1178 BUILT_IN_EMUTLS_REGISTER_COMMON,
1179 "__emutls_register_common", false);
1181 build_common_builtin_nodes ();
1182 targetm.init_builtins ();
1185 #undef DEFINE_MATH_BUILTIN_C
1186 #undef DEFINE_MATH_BUILTIN
1188 #include "gt-fortran-f95-lang.h"
1189 #include "gtype-fortran.h"