diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2011-04-05 14:25:32 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2011-04-05 14:25:32 +0000 |
commit | a4437d18b92884c401e0a21ffdef0b8398201b4b (patch) | |
tree | aab36b4c9aff8f3113da4cb53c5643f27c7398a5 /gcc | |
parent | 6e66d62daed88ad256f1ff4d5b9eca0eca423b7f (diff) | |
download | gcc-a4437d18b92884c401e0a21ffdef0b8398201b4b.zip gcc-a4437d18b92884c401e0a21ffdef0b8398201b4b.tar.gz gcc-a4437d18b92884c401e0a21ffdef0b8398201b4b.tar.bz2 |
trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use build_function_type_list instead of build_function_type.
* trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use
build_function_type_list instead of build_function_type. Correct
argument order for func_frexp and func_scalbn.
From-SVN: r171987
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-intrinsic.c | 37 |
2 files changed, 26 insertions, 17 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 5d3a799..0206ba9 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-04-05 Nathan Froyd <froydnj@codesourcery.com> + + * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use + build_function_type_list instead of build_function_type. Correct + argument order for func_frexp and func_scalbn. + 2011-04-05 Duncan Sands <baldrick@free.fr> * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types. diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index a3c2ecd..9a69632 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -621,35 +621,38 @@ gfc_build_intrinsic_lib_fndecls (void) C99-like library functions. For now, we only handle __float128 q-suffixed functions. */ - tree tmp, func_1, func_2, func_cabs, func_frexp; + tree type, complex_type, func_1, func_2, func_cabs, func_frexp; tree func_lround, func_llround, func_scalbn, func_cpow; memset (quad_decls, 0, sizeof(tree) * (END_BUILTINS + 1)); + type = float128_type_node; + complex_type = complex_float128_type_node; /* type (*) (type) */ - tmp = tree_cons (NULL_TREE, float128_type_node, void_list_node); - func_1 = build_function_type (float128_type_node, tmp); + func_1 = build_function_type_list (type, type, NULL_TREE); /* long (*) (type) */ - func_lround = build_function_type (long_integer_type_node, tmp); + func_lround = build_function_type_list (long_integer_type_node, + type, NULL_TREE); /* long long (*) (type) */ - func_llround = build_function_type (long_long_integer_type_node, tmp); + func_llround = build_function_type_list (long_long_integer_type_node, + type, NULL_TREE); /* type (*) (type, type) */ - tmp = tree_cons (NULL_TREE, float128_type_node, tmp); - func_2 = build_function_type (float128_type_node, tmp); + func_2 = build_function_type_list (type, type, type, NULL_TREE); /* type (*) (type, &int) */ - tmp = tree_cons (NULL_TREE, float128_type_node, void_list_node); - tmp = tree_cons (NULL_TREE, build_pointer_type (integer_type_node), tmp); - func_frexp = build_function_type (float128_type_node, tmp); + func_frexp + = build_function_type_list (type, + type, + build_pointer_type (integer_type_node), + NULL_TREE); /* type (*) (type, int) */ - tmp = tree_cons (NULL_TREE, float128_type_node, void_list_node); - tmp = tree_cons (NULL_TREE, integer_type_node, tmp); - func_scalbn = build_function_type (float128_type_node, tmp); + func_scalbn = build_function_type_list (type, + type, integer_type_node, NULL_TREE); /* type (*) (complex type) */ - tmp = tree_cons (NULL_TREE, complex_float128_type_node, void_list_node); - func_cabs = build_function_type (float128_type_node, tmp); + func_cabs = build_function_type_list (type, complex_type, NULL_TREE); /* complex type (*) (complex type, complex type) */ - tmp = tree_cons (NULL_TREE, complex_float128_type_node, tmp); - func_cpow = build_function_type (complex_float128_type_node, tmp); + func_cpow + = build_function_type_list (complex_type, + complex_type, complex_type, NULL_TREE); #define DEFINE_MATH_BUILTIN(ID, NAME, ARGTYPE) #define DEFINE_MATH_BUILTIN_C(ID, NAME, ARGTYPE) |