aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-12-01 08:11:34 +0100
committerJakub Jelinek <jakub@redhat.com>2023-12-01 08:15:25 +0100
commit28944a016bb5eef9a99691b3c55b124882375180 (patch)
treed0250f17bc55e8a702d0c1f26fd85dec6910963b /gcc
parentff9efa3fc48baa1dee7ed376c25ecfcfbc28d35c (diff)
downloadgcc-28944a016bb5eef9a99691b3c55b124882375180.zip
gcc-28944a016bb5eef9a99691b3c55b124882375180.tar.gz
gcc-28944a016bb5eef9a99691b3c55b124882375180.tar.bz2
s390: Fix builtin-classify-type-1.c on s390 too [PR112725]
s390 suffers from the same issue with __builtin_classify_type vector arguments, the target hook diagnoses those because it thinks a vector is passed to an unprototyped function, but in this case it is a type-generic builtin which can support vector types just fine, by folding into the appropriate constant. This fixes -FAIL: c-c++-common/builtin-classify-type-1.c -Wc++-compat (test for excess errors) -UNRESOLVED: c-c++-common/builtin-classify-type-1.c -Wc++-compat compilation failed to produce executable on s390x-linux. 2023-12-01 Jakub Jelinek <jakub@redhat.com> PR target/112725 * config/s390/s390.cc (s390_invalid_arg_for_unprototyped_fn): Return NULL for __builtin_classify_type calls with vector arguments.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/s390/s390.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc
index 29b5dc9..4b16a75 100644
--- a/gcc/config/s390/s390.cc
+++ b/gcc/config/s390/s390.cc
@@ -12650,7 +12650,8 @@ s390_invalid_arg_for_unprototyped_fn (const_tree typelist, const_tree funcdecl,
&& VECTOR_TYPE_P (TREE_TYPE (val))
&& (funcdecl == NULL_TREE
|| (TREE_CODE (funcdecl) == FUNCTION_DECL
- && DECL_BUILT_IN_CLASS (funcdecl) != BUILT_IN_MD)))
+ && DECL_BUILT_IN_CLASS (funcdecl) != BUILT_IN_MD
+ && !fndecl_built_in_p (funcdecl, BUILT_IN_CLASSIFY_TYPE))))
? N_("vector argument passed to unprototyped function")
: NULL);
}