]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree.cc: Add tree_builtin_call_types_compatible_p [PR105150]
authorJakub Jelinek <jakub@redhat.com>
Thu, 7 Apr 2022 07:10:58 +0000 (09:10 +0200)
committerJakub Jelinek <jakub@redhat.com>
Thu, 7 Apr 2022 07:10:58 +0000 (09:10 +0200)
commit973a2ce71f8dab559fbbfc34b59e39e047df74a6
treed64131cc4473fd71c8a1a1a06fb344f5f164baf2
parent54ed6563d22694aa3e1935f89641a4f696a3a9f7
tree.cc: Add tree_builtin_call_types_compatible_p [PR105150]

And here is the follow-up patch that does the argument checking
on GENERIC.  It ensures TYPE_MAIN_VARIANT == TYPE_MAIN_VARIANT
compatibility on the arguments, except for pointer arguments
where both builtin's prototype and actual arguments have to be
pointers and satisfy tree_nop_conversion_p, and for promoted
char/short arguments where argument need to have integral
signed type tree_nop_conversion_p compatible with integer_type_node.

2022-04-07  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/105150
* tree.cc (tree_builtin_call_types_compatible_p): New function.
(get_call_combined_fn): Use it.

* gcc.dg/pr105150.c: New test.
gcc/testsuite/gcc.dg/pr105150.c [new file with mode: 0644]
gcc/tree.cc