Commit 6368f166 by Daniel Franke Committed by Tobias Burnus

re PR fortran/43665 (INTENT(IN) etc. optimization of calls: function annotations…

re PR fortran/43665 (INTENT(IN) etc. optimization of calls: function annotations for noclobber/noescape arguments)

2010-07-13  Daniel Franke  <franke.daniel@gmail.com>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/43665
        * trans-decl.c (gfc_build_intrinsic_function_decls): Add
        noclobber/noescape annotations to function calls.
        (gfc_build_builtin_function_decls): Likewise.


Co-Authored-By: Tobias Burnus <burnus@net-b.de>

From-SVN: r162140
parent 135d47df
2010-07-13 Daniel Franke <franke.daniel@gmail.com>
Tobias Burnus <burnus@net-b.de>
PR fortran/43665
* trans-decl.c (gfc_build_intrinsic_function_decls): Add
noclobber/noescape annotations to function calls.
(gfc_build_builtin_function_decls): Likewise.
2010-07-13 Janus Weil <janus@gcc.gnu.org> 2010-07-13 Janus Weil <janus@gcc.gnu.org>
PR fortran/44434 PR fortran/44434
......
...@@ -2411,212 +2411,161 @@ gfc_build_intrinsic_function_decls (void) ...@@ -2411,212 +2411,161 @@ gfc_build_intrinsic_function_decls (void)
tree pchar4_type_node = gfc_get_pchar_type (4); tree pchar4_type_node = gfc_get_pchar_type (4);
/* String functions. */ /* String functions. */
gfor_fndecl_compare_string = gfor_fndecl_compare_string = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier (PREFIX("compare_string")), get_identifier (PREFIX("compare_string")), "..R.R",
integer_type_node, 4, integer_type_node, 4, gfc_charlen_type_node, pchar1_type_node,
gfc_charlen_type_node, pchar1_type_node, gfc_charlen_type_node, pchar1_type_node);
gfc_charlen_type_node, pchar1_type_node);
gfor_fndecl_concat_string = gfc_build_library_function_decl_with_spec (
gfor_fndecl_concat_string = get_identifier (PREFIX("concat_string")), "..W.R.R",
gfc_build_library_function_decl (get_identifier (PREFIX("concat_string")), void_type_node, 6, gfc_charlen_type_node, pchar1_type_node,
void_type_node, 6, gfc_charlen_type_node, pchar1_type_node,
gfc_charlen_type_node, pchar1_type_node, gfc_charlen_type_node, pchar1_type_node);
gfc_charlen_type_node, pchar1_type_node,
gfc_charlen_type_node, pchar1_type_node); gfor_fndecl_string_len_trim = gfc_build_library_function_decl_with_spec (
get_identifier (PREFIX("string_len_trim")), "..R",
gfor_fndecl_string_len_trim = gfc_charlen_type_node, 2, gfc_charlen_type_node, pchar1_type_node);
gfc_build_library_function_decl (get_identifier (PREFIX("string_len_trim")),
gfc_charlen_type_node, 2, gfor_fndecl_string_index = gfc_build_library_function_decl_with_spec (
gfc_charlen_type_node, pchar1_type_node); get_identifier (PREFIX("string_index")), "..R.R.",
gfc_charlen_type_node, 5, gfc_charlen_type_node, pchar1_type_node,
gfor_fndecl_string_index = gfc_charlen_type_node, pchar1_type_node, gfc_logical4_type_node);
gfc_build_library_function_decl (get_identifier (PREFIX("string_index")),
gfc_charlen_type_node, 5, gfor_fndecl_string_scan = gfc_build_library_function_decl_with_spec (
gfc_charlen_type_node, pchar1_type_node, get_identifier (PREFIX("string_scan")), "..R.R.",
gfc_charlen_type_node, pchar1_type_node, gfc_charlen_type_node, 5, gfc_charlen_type_node, pchar1_type_node,
gfc_logical4_type_node); gfc_charlen_type_node, pchar1_type_node, gfc_logical4_type_node);
gfor_fndecl_string_scan = gfor_fndecl_string_verify = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier (PREFIX("string_scan")), get_identifier (PREFIX("string_verify")), "..R.R.",
gfc_charlen_type_node, 5, gfc_charlen_type_node, 5, gfc_charlen_type_node, pchar1_type_node,
gfc_charlen_type_node, pchar1_type_node, gfc_charlen_type_node, pchar1_type_node, gfc_logical4_type_node);
gfc_charlen_type_node, pchar1_type_node,
gfc_logical4_type_node); gfor_fndecl_string_trim = gfc_build_library_function_decl_with_spec (
get_identifier (PREFIX("string_trim")), ".Ww.R",
gfor_fndecl_string_verify = void_type_node, 4, build_pointer_type (gfc_charlen_type_node),
gfc_build_library_function_decl (get_identifier (PREFIX("string_verify")), build_pointer_type (pchar1_type_node), gfc_charlen_type_node,
gfc_charlen_type_node, 5, pchar1_type_node);
gfc_charlen_type_node, pchar1_type_node,
gfc_charlen_type_node, pchar1_type_node, gfor_fndecl_string_minmax = gfc_build_library_function_decl_with_spec (
gfc_logical4_type_node); get_identifier (PREFIX("string_minmax")), ".Ww.R",
void_type_node, -4, build_pointer_type (gfc_charlen_type_node),
gfor_fndecl_string_trim = build_pointer_type (pchar1_type_node), integer_type_node,
gfc_build_library_function_decl (get_identifier (PREFIX("string_trim")), integer_type_node);
void_type_node, 4,
build_pointer_type (gfc_charlen_type_node), gfor_fndecl_adjustl = gfc_build_library_function_decl_with_spec (
build_pointer_type (pchar1_type_node), get_identifier (PREFIX("adjustl")), ".W.R",
gfc_charlen_type_node, pchar1_type_node); void_type_node, 3, pchar1_type_node, gfc_charlen_type_node,
pchar1_type_node);
gfor_fndecl_string_minmax =
gfc_build_library_function_decl (get_identifier (PREFIX("string_minmax")), gfor_fndecl_adjustr = gfc_build_library_function_decl_with_spec (
void_type_node, -4, get_identifier (PREFIX("adjustr")), ".W.R",
build_pointer_type (gfc_charlen_type_node), void_type_node, 3, pchar1_type_node, gfc_charlen_type_node,
build_pointer_type (pchar1_type_node), pchar1_type_node);
integer_type_node, integer_type_node);
gfor_fndecl_select_string = gfc_build_library_function_decl_with_spec (
gfor_fndecl_adjustl = get_identifier (PREFIX("select_string")), ".R.R.",
gfc_build_library_function_decl (get_identifier (PREFIX("adjustl")), integer_type_node, 4, pvoid_type_node, integer_type_node,
void_type_node, 3, pchar1_type_node, pchar1_type_node, gfc_charlen_type_node);
gfc_charlen_type_node, pchar1_type_node);
gfor_fndecl_compare_string_char4 = gfc_build_library_function_decl_with_spec (
gfor_fndecl_adjustr = get_identifier (PREFIX("compare_string_char4")), "..R.R",
gfc_build_library_function_decl (get_identifier (PREFIX("adjustr")), integer_type_node, 4, gfc_charlen_type_node, pchar4_type_node,
void_type_node, 3, pchar1_type_node, gfc_charlen_type_node, pchar4_type_node);
gfc_charlen_type_node, pchar1_type_node);
gfor_fndecl_concat_string_char4 = gfc_build_library_function_decl_with_spec (
gfor_fndecl_select_string = get_identifier (PREFIX("concat_string_char4")), "..W.R.R",
gfc_build_library_function_decl (get_identifier (PREFIX("select_string")), void_type_node, 6, gfc_charlen_type_node, pchar4_type_node,
integer_type_node, 4, pvoid_type_node, gfc_charlen_type_node, pchar4_type_node, gfc_charlen_type_node,
integer_type_node, pchar1_type_node, pchar4_type_node);
gfc_charlen_type_node);
gfor_fndecl_string_len_trim_char4 = gfc_build_library_function_decl_with_spec (
gfor_fndecl_compare_string_char4 = get_identifier (PREFIX("string_len_trim_char4")), "..R",
gfc_build_library_function_decl (get_identifier gfc_charlen_type_node, 2, gfc_charlen_type_node, pchar4_type_node);
(PREFIX("compare_string_char4")),
integer_type_node, 4, gfor_fndecl_string_index_char4 = gfc_build_library_function_decl_with_spec (
gfc_charlen_type_node, pchar4_type_node, get_identifier (PREFIX("string_index_char4")), "..R.R.",
gfc_charlen_type_node, pchar4_type_node); gfc_charlen_type_node, 5, gfc_charlen_type_node, pchar4_type_node,
gfc_charlen_type_node, pchar4_type_node, gfc_logical4_type_node);
gfor_fndecl_concat_string_char4 =
gfc_build_library_function_decl (get_identifier gfor_fndecl_string_scan_char4 = gfc_build_library_function_decl_with_spec (
(PREFIX("concat_string_char4")), get_identifier (PREFIX("string_scan_char4")), "..R.R.",
void_type_node, 6, gfc_charlen_type_node, 5, gfc_charlen_type_node, pchar4_type_node,
gfc_charlen_type_node, pchar4_type_node, gfc_charlen_type_node, pchar4_type_node, gfc_logical4_type_node);
gfc_charlen_type_node, pchar4_type_node,
gfc_charlen_type_node, pchar4_type_node); gfor_fndecl_string_verify_char4 = gfc_build_library_function_decl_with_spec (
get_identifier (PREFIX("string_verify_char4")), "..R.R.",
gfor_fndecl_string_len_trim_char4 = gfc_charlen_type_node, 5, gfc_charlen_type_node, pchar4_type_node,
gfc_build_library_function_decl (get_identifier gfc_charlen_type_node, pchar4_type_node, gfc_logical4_type_node);
(PREFIX("string_len_trim_char4")),
gfc_charlen_type_node, 2, gfor_fndecl_string_trim_char4 = gfc_build_library_function_decl_with_spec (
gfc_charlen_type_node, pchar4_type_node); get_identifier (PREFIX("string_trim_char4")), ".Ww.R",
void_type_node, 4, build_pointer_type (gfc_charlen_type_node),
gfor_fndecl_string_index_char4 = build_pointer_type (pchar4_type_node), gfc_charlen_type_node,
gfc_build_library_function_decl (get_identifier pchar4_type_node);
(PREFIX("string_index_char4")),
gfc_charlen_type_node, 5, gfor_fndecl_string_minmax_char4 = gfc_build_library_function_decl_with_spec (
gfc_charlen_type_node, pchar4_type_node, get_identifier (PREFIX("string_minmax_char4")), ".Ww.R",
gfc_charlen_type_node, pchar4_type_node, void_type_node, -4, build_pointer_type (gfc_charlen_type_node),
gfc_logical4_type_node); build_pointer_type (pchar4_type_node), integer_type_node,
integer_type_node);
gfor_fndecl_string_scan_char4 =
gfc_build_library_function_decl (get_identifier gfor_fndecl_adjustl_char4 = gfc_build_library_function_decl_with_spec (
(PREFIX("string_scan_char4")), get_identifier (PREFIX("adjustl_char4")), ".W.R",
gfc_charlen_type_node, 5, void_type_node, 3, pchar4_type_node, gfc_charlen_type_node,
gfc_charlen_type_node, pchar4_type_node, pchar4_type_node);
gfc_charlen_type_node, pchar4_type_node,
gfc_logical4_type_node); gfor_fndecl_adjustr_char4 = gfc_build_library_function_decl_with_spec (
get_identifier (PREFIX("adjustr_char4")), ".W.R",
gfor_fndecl_string_verify_char4 = void_type_node, 3, pchar4_type_node, gfc_charlen_type_node,
gfc_build_library_function_decl (get_identifier pchar4_type_node);
(PREFIX("string_verify_char4")),
gfc_charlen_type_node, 5, gfor_fndecl_select_string_char4 = gfc_build_library_function_decl_with_spec (
gfc_charlen_type_node, pchar4_type_node, get_identifier (PREFIX("select_string_char4")), ".R.R.",
gfc_charlen_type_node, pchar4_type_node, integer_type_node, 4, pvoid_type_node, integer_type_node,
gfc_logical4_type_node); pvoid_type_node, gfc_charlen_type_node);
gfor_fndecl_string_trim_char4 =
gfc_build_library_function_decl (get_identifier
(PREFIX("string_trim_char4")),
void_type_node, 4,
build_pointer_type (gfc_charlen_type_node),
build_pointer_type (pchar4_type_node),
gfc_charlen_type_node, pchar4_type_node);
gfor_fndecl_string_minmax_char4 =
gfc_build_library_function_decl (get_identifier
(PREFIX("string_minmax_char4")),
void_type_node, -4,
build_pointer_type (gfc_charlen_type_node),
build_pointer_type (pchar4_type_node),
integer_type_node, integer_type_node);
gfor_fndecl_adjustl_char4 =
gfc_build_library_function_decl (get_identifier (PREFIX("adjustl_char4")),
void_type_node, 3, pchar4_type_node,
gfc_charlen_type_node, pchar4_type_node);
gfor_fndecl_adjustr_char4 =
gfc_build_library_function_decl (get_identifier (PREFIX("adjustr_char4")),
void_type_node, 3, pchar4_type_node,
gfc_charlen_type_node, pchar4_type_node);
gfor_fndecl_select_string_char4 =
gfc_build_library_function_decl (get_identifier
(PREFIX("select_string_char4")),
integer_type_node, 4, pvoid_type_node,
integer_type_node, pvoid_type_node,
gfc_charlen_type_node);
/* Conversion between character kinds. */ /* Conversion between character kinds. */
gfor_fndecl_convert_char1_to_char4 = gfor_fndecl_convert_char1_to_char4 = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier get_identifier (PREFIX("convert_char1_to_char4")), ".w.R",
(PREFIX("convert_char1_to_char4")), void_type_node, 3, build_pointer_type (pchar4_type_node),
void_type_node, 3, gfc_charlen_type_node, pchar1_type_node);
build_pointer_type (pchar4_type_node),
gfc_charlen_type_node, pchar1_type_node);
gfor_fndecl_convert_char4_to_char1 = gfor_fndecl_convert_char4_to_char1 = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier get_identifier (PREFIX("convert_char4_to_char1")), ".w.R",
(PREFIX("convert_char4_to_char1")), void_type_node, 3, build_pointer_type (pchar1_type_node),
void_type_node, 3, gfc_charlen_type_node, pchar4_type_node);
build_pointer_type (pchar1_type_node),
gfc_charlen_type_node, pchar4_type_node);
/* Misc. functions. */ /* Misc. functions. */
gfor_fndecl_ttynam = gfor_fndecl_ttynam = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier (PREFIX("ttynam")), get_identifier (PREFIX("ttynam")), ".W",
void_type_node, void_type_node, 3, pchar_type_node, gfc_charlen_type_node,
3, integer_type_node);
pchar_type_node,
gfc_charlen_type_node, gfor_fndecl_fdate = gfc_build_library_function_decl_with_spec (
integer_type_node); get_identifier (PREFIX("fdate")), ".W",
void_type_node, 2, pchar_type_node, gfc_charlen_type_node);
gfor_fndecl_fdate =
gfc_build_library_function_decl (get_identifier (PREFIX("fdate")), gfor_fndecl_ctime = gfc_build_library_function_decl_with_spec (
void_type_node, get_identifier (PREFIX("ctime")), ".W",
2, void_type_node, 3, pchar_type_node, gfc_charlen_type_node,
pchar_type_node, gfc_int8_type_node);
gfc_charlen_type_node);
gfor_fndecl_sc_kind = gfc_build_library_function_decl_with_spec (
gfor_fndecl_ctime = get_identifier (PREFIX("selected_char_kind")), "..R",
gfc_build_library_function_decl (get_identifier (PREFIX("ctime")), gfc_int4_type_node, 2, gfc_charlen_type_node, pchar_type_node);
void_type_node,
3, gfor_fndecl_si_kind = gfc_build_library_function_decl_with_spec (
pchar_type_node, get_identifier (PREFIX("selected_int_kind")), ".R",
gfc_charlen_type_node, gfc_int4_type_node, 1, pvoid_type_node);
gfc_int8_type_node);
gfor_fndecl_sr_kind = gfc_build_library_function_decl_with_spec (
gfor_fndecl_sc_kind = get_identifier (PREFIX("selected_real_kind2008")), ".RR",
gfc_build_library_function_decl (get_identifier gfc_int4_type_node, 3, pvoid_type_node, pvoid_type_node,
(PREFIX("selected_char_kind")), pvoid_type_node);
gfc_int4_type_node, 2,
gfc_charlen_type_node, pchar_type_node);
gfor_fndecl_si_kind =
gfc_build_library_function_decl (get_identifier
(PREFIX("selected_int_kind")),
gfc_int4_type_node, 1, pvoid_type_node);
gfor_fndecl_sr_kind =
gfc_build_library_function_decl (get_identifier
(PREFIX("selected_real_kind2008")),
gfc_int4_type_node, 3,
pvoid_type_node, pvoid_type_node,
pvoid_type_node);
/* Power functions. */ /* Power functions. */
{ {
...@@ -2675,23 +2624,21 @@ gfc_build_intrinsic_function_decls (void) ...@@ -2675,23 +2624,21 @@ gfc_build_intrinsic_function_decls (void)
#undef NRKINDS #undef NRKINDS
} }
gfor_fndecl_math_ishftc4 = gfor_fndecl_math_ishftc4 = gfc_build_library_function_decl (
gfc_build_library_function_decl (get_identifier (PREFIX("ishftc4")), get_identifier (PREFIX("ishftc4")),
gfc_int4_type_node, gfc_int4_type_node, 3, gfc_int4_type_node, gfc_int4_type_node,
3, gfc_int4_type_node, gfc_int4_type_node);
gfc_int4_type_node, gfc_int4_type_node);
gfor_fndecl_math_ishftc8 = gfor_fndecl_math_ishftc8 = gfc_build_library_function_decl (
gfc_build_library_function_decl (get_identifier (PREFIX("ishftc8")), get_identifier (PREFIX("ishftc8")),
gfc_int8_type_node, gfc_int8_type_node, 3, gfc_int8_type_node, gfc_int4_type_node,
3, gfc_int8_type_node, gfc_int4_type_node);
gfc_int4_type_node, gfc_int4_type_node);
if (gfc_int16_type_node) if (gfc_int16_type_node)
gfor_fndecl_math_ishftc16 = gfor_fndecl_math_ishftc16 = gfc_build_library_function_decl (
gfc_build_library_function_decl (get_identifier (PREFIX("ishftc16")), get_identifier (PREFIX("ishftc16")),
gfc_int16_type_node, 3, gfc_int16_type_node, 3, gfc_int16_type_node, gfc_int4_type_node,
gfc_int16_type_node, gfc_int4_type_node);
gfc_int4_type_node,
gfc_int4_type_node);
/* BLAS functions. */ /* BLAS functions. */
{ {
...@@ -2737,32 +2684,26 @@ gfc_build_intrinsic_function_decls (void) ...@@ -2737,32 +2684,26 @@ gfc_build_intrinsic_function_decls (void)
} }
/* Other functions. */ /* Other functions. */
gfor_fndecl_size0 = gfor_fndecl_size0 = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier (PREFIX("size0")), get_identifier (PREFIX("size0")), ".R",
gfc_array_index_type, gfc_array_index_type, 1, pvoid_type_node);
1, pvoid_type_node);
gfor_fndecl_size1 = gfor_fndecl_size1 = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier (PREFIX("size1")), get_identifier (PREFIX("size1")), ".R",
gfc_array_index_type, gfc_array_index_type, 2, pvoid_type_node, gfc_array_index_type);
2, pvoid_type_node,
gfc_array_index_type); gfor_fndecl_iargc = gfc_build_library_function_decl (
get_identifier (PREFIX ("iargc")), gfc_int4_type_node, 0);
gfor_fndecl_iargc =
gfc_build_library_function_decl (get_identifier (PREFIX ("iargc")),
gfc_int4_type_node,
0);
if (gfc_type_for_size (128, true)) if (gfc_type_for_size (128, true))
{ {
tree uint128 = gfc_type_for_size (128, true); tree uint128 = gfc_type_for_size (128, true);
gfor_fndecl_clz128 = gfor_fndecl_clz128 = gfc_build_library_function_decl (
gfc_build_library_function_decl (get_identifier (PREFIX ("clz128")), get_identifier (PREFIX ("clz128")), integer_type_node, 1, uint128);
integer_type_node, 1, uint128);
gfor_fndecl_ctz128 = gfor_fndecl_ctz128 = gfc_build_library_function_decl (
gfc_build_library_function_decl (get_identifier (PREFIX ("ctz128")), get_identifier (PREFIX ("ctz128")), integer_type_node, 1, uint128);
integer_type_node, 1, uint128);
} }
} }
...@@ -2774,113 +2715,103 @@ gfc_build_builtin_function_decls (void) ...@@ -2774,113 +2715,103 @@ gfc_build_builtin_function_decls (void)
{ {
tree gfc_int4_type_node = gfc_get_int_type (4); tree gfc_int4_type_node = gfc_get_int_type (4);
gfor_fndecl_stop_numeric = gfor_fndecl_stop_numeric = gfc_build_library_function_decl (
gfc_build_library_function_decl (get_identifier (PREFIX("stop_numeric")), get_identifier (PREFIX("stop_numeric")),
void_type_node, 1, gfc_int4_type_node); void_type_node, 1, gfc_int4_type_node);
/* STOP doesn't return. */ /* STOP doesn't return. */
TREE_THIS_VOLATILE (gfor_fndecl_stop_numeric) = 1; TREE_THIS_VOLATILE (gfor_fndecl_stop_numeric) = 1;
gfor_fndecl_stop_string = gfc_build_library_function_decl_with_spec (
gfor_fndecl_stop_string = get_identifier (PREFIX("stop_string")), ".R.",
gfc_build_library_function_decl (get_identifier (PREFIX("stop_string")), void_type_node, 2, pchar_type_node, gfc_int4_type_node);
void_type_node, 2, pchar_type_node,
gfc_int4_type_node);
/* STOP doesn't return. */ /* STOP doesn't return. */
TREE_THIS_VOLATILE (gfor_fndecl_stop_string) = 1;
TREE_THIS_VOLATILE (gfor_fndecl_stop_string) = 1;
gfor_fndecl_error_stop_numeric = gfor_fndecl_error_stop_numeric = gfc_build_library_function_decl (
gfc_build_library_function_decl (get_identifier (PREFIX("error_stop_numeric")), get_identifier (PREFIX("error_stop_numeric")),
void_type_node, 1, gfc_int4_type_node); void_type_node, 1, gfc_int4_type_node);
/* ERROR STOP doesn't return. */ /* ERROR STOP doesn't return. */
TREE_THIS_VOLATILE (gfor_fndecl_error_stop_numeric) = 1; TREE_THIS_VOLATILE (gfor_fndecl_error_stop_numeric) = 1;
gfor_fndecl_error_stop_string = gfc_build_library_function_decl_with_spec (
gfor_fndecl_error_stop_string = get_identifier (PREFIX("error_stop_string")), ".R.",
gfc_build_library_function_decl (get_identifier (PREFIX("error_stop_string")), void_type_node, 2, pchar_type_node, gfc_int4_type_node);
void_type_node, 2, pchar_type_node,
gfc_int4_type_node);
/* ERROR STOP doesn't return. */ /* ERROR STOP doesn't return. */
TREE_THIS_VOLATILE (gfor_fndecl_error_stop_string) = 1; TREE_THIS_VOLATILE (gfor_fndecl_error_stop_string) = 1;
gfor_fndecl_pause_numeric = gfc_build_library_function_decl (
get_identifier (PREFIX("pause_numeric")),
void_type_node, 1, gfc_int4_type_node);
gfor_fndecl_pause_numeric = gfor_fndecl_pause_string = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier (PREFIX("pause_numeric")), get_identifier (PREFIX("pause_string")), ".R.",
void_type_node, 1, gfc_int4_type_node); void_type_node, 2, pchar_type_node, gfc_int4_type_node);
gfor_fndecl_pause_string =
gfc_build_library_function_decl (get_identifier (PREFIX("pause_string")),
void_type_node, 2, pchar_type_node,
gfc_int4_type_node);
gfor_fndecl_runtime_error = gfor_fndecl_runtime_error = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier (PREFIX("runtime_error")), get_identifier (PREFIX("runtime_error")), ".R",
void_type_node, -1, pchar_type_node); void_type_node, -1, pchar_type_node);
/* The runtime_error function does not return. */ /* The runtime_error function does not return. */
TREE_THIS_VOLATILE (gfor_fndecl_runtime_error) = 1; TREE_THIS_VOLATILE (gfor_fndecl_runtime_error) = 1;
gfor_fndecl_runtime_error_at = gfor_fndecl_runtime_error_at = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier (PREFIX("runtime_error_at")), get_identifier (PREFIX("runtime_error_at")), ".RR",
void_type_node, -2, pchar_type_node, void_type_node, -2, pchar_type_node, pchar_type_node);
pchar_type_node);
/* The runtime_error_at function does not return. */ /* The runtime_error_at function does not return. */
TREE_THIS_VOLATILE (gfor_fndecl_runtime_error_at) = 1; TREE_THIS_VOLATILE (gfor_fndecl_runtime_error_at) = 1;
gfor_fndecl_runtime_warning_at = gfor_fndecl_runtime_warning_at = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier (PREFIX("runtime_warning_at")), get_identifier (PREFIX("runtime_warning_at")), ".RR",
void_type_node, -2, pchar_type_node, void_type_node, -2, pchar_type_node, pchar_type_node);
pchar_type_node);
gfor_fndecl_generate_error = gfor_fndecl_generate_error = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier (PREFIX("generate_error")), get_identifier (PREFIX("generate_error")), ".R.R",
void_type_node, 3, pvoid_type_node, void_type_node, 3, pvoid_type_node, integer_type_node,
integer_type_node, pchar_type_node); pchar_type_node);
gfor_fndecl_os_error = gfor_fndecl_os_error = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier (PREFIX("os_error")), get_identifier (PREFIX("os_error")), ".R",
void_type_node, 1, pchar_type_node); void_type_node, 1, pchar_type_node);
/* The runtime_error function does not return. */ /* The runtime_error function does not return. */
TREE_THIS_VOLATILE (gfor_fndecl_os_error) = 1; TREE_THIS_VOLATILE (gfor_fndecl_os_error) = 1;
gfor_fndecl_set_args = gfor_fndecl_set_args = gfc_build_library_function_decl (
gfc_build_library_function_decl (get_identifier (PREFIX("set_args")), get_identifier (PREFIX("set_args")),
void_type_node, 2, integer_type_node, void_type_node, 2, integer_type_node,
build_pointer_type (pchar_type_node)); build_pointer_type (pchar_type_node));
gfor_fndecl_set_fpe = gfor_fndecl_set_fpe = gfc_build_library_function_decl (
gfc_build_library_function_decl (get_identifier (PREFIX("set_fpe")), get_identifier (PREFIX("set_fpe")),
void_type_node, 1, integer_type_node); void_type_node, 1, integer_type_node);
/* Keep the array dimension in sync with the call, later in this file. */ /* Keep the array dimension in sync with the call, later in this file. */
gfor_fndecl_set_options = gfor_fndecl_set_options = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl (get_identifier (PREFIX("set_options")), get_identifier (PREFIX("set_options")), "..R",
void_type_node, 2, integer_type_node, void_type_node, 2, integer_type_node,
build_pointer_type (integer_type_node)); build_pointer_type (integer_type_node));
gfor_fndecl_set_convert = gfor_fndecl_set_convert = gfc_build_library_function_decl (
gfc_build_library_function_decl (get_identifier (PREFIX("set_convert")), get_identifier (PREFIX("set_convert")),
void_type_node, 1, integer_type_node); void_type_node, 1, integer_type_node);
gfor_fndecl_set_record_marker = gfor_fndecl_set_record_marker = gfc_build_library_function_decl (
gfc_build_library_function_decl (get_identifier (PREFIX("set_record_marker")), get_identifier (PREFIX("set_record_marker")),
void_type_node, 1, integer_type_node); void_type_node, 1, integer_type_node);
gfor_fndecl_set_max_subrecord_length = gfor_fndecl_set_max_subrecord_length = gfc_build_library_function_decl (
gfc_build_library_function_decl (get_identifier (PREFIX("set_max_subrecord_length")), get_identifier (PREFIX("set_max_subrecord_length")),
void_type_node, 1, integer_type_node); void_type_node, 1, integer_type_node);
gfor_fndecl_in_pack = gfc_build_library_function_decl_with_spec ( gfor_fndecl_in_pack = gfc_build_library_function_decl_with_spec (
get_identifier (PREFIX("internal_pack")), ".r", get_identifier (PREFIX("internal_pack")), ".r",
pvoid_type_node, 1, pvoid_type_node); pvoid_type_node, 1, pvoid_type_node);
gfor_fndecl_in_unpack = gfc_build_library_function_decl_with_spec ( gfor_fndecl_in_unpack = gfc_build_library_function_decl_with_spec (
get_identifier (PREFIX("internal_unpack")), ".wR", get_identifier (PREFIX("internal_unpack")), ".wR",
void_type_node, 2, pvoid_type_node, pvoid_type_node); void_type_node, 2, pvoid_type_node, pvoid_type_node);
gfor_fndecl_associated = gfor_fndecl_associated = gfc_build_library_function_decl_with_spec (
gfc_build_library_function_decl ( get_identifier (PREFIX("associated")), ".RR",
get_identifier (PREFIX("associated")), integer_type_node, 2, ppvoid_type_node, ppvoid_type_node);
integer_type_node, 2, ppvoid_type_node,
ppvoid_type_node);
gfc_build_intrinsic_function_decls (); gfc_build_intrinsic_function_decls ();
gfc_build_intrinsic_lib_fndecls (); gfc_build_intrinsic_lib_fndecls ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment