diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-02 19:28:05 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-02 19:28:05 +0000 |
commit | 9d63dbe6b454a33381a73e1ca93aff85b0594f05 (patch) | |
tree | f8a1cb507af3e7ceb424d8056fc0f50558e9cd28 /gcc/fortran/f95-lang.c | |
parent | f98abc094eceacf320655d4f16c9f71243455544 (diff) | |
download | gcc-9d63dbe6b454a33381a73e1ca93aff85b0594f05.tar.gz |
2008-03-02 Basile Starynkevitch <basile@starynkevitch.net>
merged with trunk 132817
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@132818 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/f95-lang.c')
-rw-r--r-- | gcc/fortran/f95-lang.c | 59 |
1 files changed, 51 insertions, 8 deletions
diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index ea795b24f74..7a3e413caf3 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -276,10 +276,8 @@ gfc_be_parse_file (int set_yydebug ATTRIBUTE_UNUSED) static bool gfc_init (void) { -#ifdef USE_MAPPED_LOCATION linemap_add (line_table, LC_ENTER, false, gfc_source_file, 1); linemap_add (line_table, LC_RENAME, false, "<built-in>", 0); -#endif /* First initialize the backend. */ gfc_init_decl_processing (); @@ -758,6 +756,16 @@ build_builtin_fntypes (tree *fntype, tree type) tmp = tree_cons (NULL_TREE, integer_type_node, void_list_node); tmp = tree_cons (NULL_TREE, type, tmp); fntype[2] = build_function_type (type, tmp); + /* type (*) (void) */ + fntype[3] = build_function_type (type, void_list_node); + /* type (*) (type, &int) */ + tmp = tree_cons (NULL_TREE, type, void_list_node); + tmp = tree_cons (NULL_TREE, build_pointer_type (integer_type_node), tmp); + fntype[4] = build_function_type (type, tmp); + /* type (*) (type, int) */ + tmp = tree_cons (NULL_TREE, type, void_list_node); + tmp = tree_cons (NULL_TREE, integer_type_node, tmp); + fntype[5] = build_function_type (type, tmp); } @@ -808,12 +816,12 @@ gfc_init_builtin_functions (void) ATTR_CONST_NOTHROW_LIST }; - tree mfunc_float[3]; - tree mfunc_double[3]; - tree mfunc_longdouble[3]; - tree mfunc_cfloat[3]; - tree mfunc_cdouble[3]; - tree mfunc_clongdouble[3]; + tree mfunc_float[6]; + tree mfunc_double[6]; + tree mfunc_longdouble[6]; + tree mfunc_cfloat[6]; + tree mfunc_cdouble[6]; + tree mfunc_clongdouble[6]; tree func_cfloat_float, func_float_cfloat; tree func_cdouble_double, func_double_cdouble; tree func_clongdouble_longdouble, func_longdouble_clongdouble; @@ -904,6 +912,34 @@ gfc_init_builtin_functions (void) gfc_define_builtin ("__builtin_copysignf", mfunc_float[1], BUILT_IN_COPYSIGNF, "copysignf", true); + gfc_define_builtin ("__builtin_nextafterl", mfunc_longdouble[1], + BUILT_IN_NEXTAFTERL, "nextafterl", true); + gfc_define_builtin ("__builtin_nextafter", mfunc_double[1], + BUILT_IN_NEXTAFTER, "nextafter", true); + gfc_define_builtin ("__builtin_nextafterf", mfunc_float[1], + BUILT_IN_NEXTAFTERF, "nextafterf", true); + + gfc_define_builtin ("__builtin_frexpl", mfunc_longdouble[4], + BUILT_IN_FREXPL, "frexpl", false); + gfc_define_builtin ("__builtin_frexp", mfunc_double[4], + BUILT_IN_FREXP, "frexp", false); + gfc_define_builtin ("__builtin_frexpf", mfunc_float[4], + BUILT_IN_FREXPF, "frexpf", false); + + gfc_define_builtin ("__builtin_fabsl", mfunc_longdouble[0], + BUILT_IN_FABSL, "fabsl", true); + gfc_define_builtin ("__builtin_fabs", mfunc_double[0], + BUILT_IN_FABS, "fabs", true); + gfc_define_builtin ("__builtin_fabsf", mfunc_float[0], + BUILT_IN_FABSF, "fabsf", true); + + gfc_define_builtin ("__builtin_scalbnl", mfunc_longdouble[5], + BUILT_IN_SCALBNL, "scalbnl", true); + gfc_define_builtin ("__builtin_scalbn", mfunc_double[5], + BUILT_IN_SCALBN, "scalbn", true); + gfc_define_builtin ("__builtin_scalbnf", mfunc_float[5], + BUILT_IN_SCALBNF, "scalbnf", true); + gfc_define_builtin ("__builtin_fmodl", mfunc_longdouble[1], BUILT_IN_FMODL, "fmodl", true); gfc_define_builtin ("__builtin_fmod", mfunc_double[1], @@ -911,6 +947,13 @@ gfc_init_builtin_functions (void) gfc_define_builtin ("__builtin_fmodf", mfunc_float[1], BUILT_IN_FMODF, "fmodf", true); + gfc_define_builtin ("__builtin_infl", mfunc_longdouble[3], + BUILT_IN_INFL, "__builtin_infl", true); + gfc_define_builtin ("__builtin_inf", mfunc_double[3], + BUILT_IN_INF, "__builtin_inf", true); + gfc_define_builtin ("__builtin_inff", mfunc_float[3], + BUILT_IN_INFF, "__builtin_inff", true); + /* lround{f,,l} and llround{f,,l} */ type = tree_cons (NULL_TREE, float_type_node, void_list_node); tmp = build_function_type (long_integer_type_node, type); |