]> git.ipfire.org Git - thirdparty/gcc.git/commit
s390: Accept array arguments for builtins
authorStefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
Fri, 12 Dec 2025 19:44:45 +0000 (20:44 +0100)
committerStefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
Fri, 12 Dec 2025 19:44:45 +0000 (20:44 +0100)
commitb0f6292efa384cc535b4c860d8ebcc99d0bc090a
tree36aeb4803307d5100ce07c738527c1fcbf71354c
parent6b78e97a0cbc60dea937f3bf67c5d47033cf4731
s390: Accept array arguments for builtins

A difference in front ends is that in contrast to C the C++ FE does no
array-to-pointer conversion prior calling resolve_overloaded_builtin().
However, we depend on this for finding the proper overloaded builtin or
in case of direct expansion.  Therefore, do the conversion manually.

gcc/ChangeLog:

* config/s390/s390-c.cc (s390_resolve_overloaded_builtin):
Perform array-to-pointer conversion for C++.

gcc/testsuite/ChangeLog:

* g++.target/s390/builtin-array-arg-1.C: New test.
* gcc.target/s390/builtin-array-arg-1.c: New test.
gcc/config/s390/s390-c.cc
gcc/testsuite/g++.target/s390/builtin-array-arg-1.C [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/builtin-array-arg-1.c [new file with mode: 0644]