aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-01-11 10:40:54 +0100
committerJakub Jelinek <jakub@redhat.com>2023-01-11 10:40:54 +0100
commit0986c351aa8a9f08b3cb614baec13564dd62c114 (patch)
tree4054efed35f3b80b1d51331762de90fd7cf37306 /gcc/function.h
parent8d96a7fc27f3561f984e50feb316d3e472ed9d14 (diff)
downloadgcc-0986c351aa8a9f08b3cb614baec13564dd62c114.zip
gcc-0986c351aa8a9f08b3cb614baec13564dd62c114.tar.gz
gcc-0986c351aa8a9f08b3cb614baec13564dd62c114.tar.bz2
fortran: Fix up function types for realloc and sincos{,f,l} builtins [PR108349]
As reported in the PR, the FUNCTION_TYPE for __builtin_realloc in the Fortran FE is wrong since r0-100026-gb64fca63690ad which changed -  tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node); -  tmp = tree_cons (NULL_TREE, size_type_node, tmp); -  ftype = build_function_type (pvoid_type_node, tmp); +  ftype = build_function_type_list (pvoid_type_node, +                                    size_type_node, pvoid_type_node, +                                    NULL_TREE);    gfc_define_builtin ("__builtin_realloc", ftype, BUILT_IN_REALLOC,                       "realloc", false); The return type is correct, void *, but the first argument should be void * too and only second one size_t, while the above change changed realloc to be void *__builtin_realloc (size_t, void *); I went through all other changes from that commit and found that __builtin_sincos{,f,l} got broken as well, instead of the former void __builtin_sincos{,f,l} (ftype, ftype *, ftype *); where ftype is {double,float,long double} it is now incorrectly void __builtin_sincos{,f,l} (ftype *, ftype *); The following patch fixes that, plus some formatting issues around the spots I've changed. 2023-01-11 Jakub Jelinek <jakub@redhat.com> PR fortran/108349 * f95-lang.cc (gfc_init_builtin_function): Fix up function types for BUILT_IN_REALLOC and BUILT_IN_SINCOS{F,,L}. Formatting fixes.
Diffstat (limited to 'gcc/function.h')
0 files changed, 0 insertions, 0 deletions