public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/112725] New: [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function'
@ 2023-11-27 10:23 tschwinge at gcc dot gnu.org
2023-11-27 14:39 ` [Bug target/112725] " rguenth at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2023-11-27 10:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112725
Bug ID: 112725
Summary: [14 Regression] powerpc64le-linux-gnu:
'c-c++-common/builtin-classify-type-1.c:113:3: error:
AltiVec argument passed to unprototyped function'
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: testsuite-fail
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: tschwinge at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
Target Milestone: ---
Test run for powerpc64le-linux-gnu, very likely commit
r14-5615-g509b470dcee9795887a60ddb32ab454f22e74411 "c, c++: Add new value for
vector types for __builtin_classify_type":
[-PASS:-]{+FAIL:+} c-c++-common/builtin-classify-type-1.c -Wc++-compat
(test for excess errors)
[-PASS:-]{+UNRESOLVED:+} c-c++-common/builtin-classify-type-1.c
-Wc++-compat [-execution test-]{+compilation failed to produce executable+}
[...]/c-c++-common/builtin-classify-type-1.c: In function 'main':
[...]/c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument
passed to unprototyped function
[...]/c-c++-common/builtin-classify-type-1.c:115:3: error: AltiVec argument
passed to unprototyped function
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/112725] [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function'
2023-11-27 10:23 [Bug target/112725] New: [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function' tschwinge at gcc dot gnu.org
@ 2023-11-27 14:39 ` rguenth at gcc dot gnu.org
2023-11-27 18:31 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-11-27 14:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112725
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
Target| |powerpc64le
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/112725] [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function'
2023-11-27 10:23 [Bug target/112725] New: [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function' tschwinge at gcc dot gnu.org
2023-11-27 14:39 ` [Bug target/112725] " rguenth at gcc dot gnu.org
@ 2023-11-27 18:31 ` pinskia at gcc dot gnu.org
2023-11-29 8:32 ` linkw at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-27 18:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112725
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |seurer at gcc dot gnu.org
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 112731 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/112725] [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function'
2023-11-27 10:23 [Bug target/112725] New: [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function' tschwinge at gcc dot gnu.org
2023-11-27 14:39 ` [Bug target/112725] " rguenth at gcc dot gnu.org
2023-11-27 18:31 ` pinskia at gcc dot gnu.org
@ 2023-11-29 8:32 ` linkw at gcc dot gnu.org
2023-11-29 8:43 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-11-29 8:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112725
Kewen Lin <linkw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
CC| |bergner at gcc dot gnu.org,
| |gnu@the-meissners.org,
| |linkw at gcc dot gnu.org,
| |segher at gcc dot gnu.org
Last reconfirmed| |2023-11-29
Ever confirmed|0 |1
--- Comment #2 from Kewen Lin <linkw at gcc dot gnu.org> ---
Confirmed, thanks for reporting.
It looks we need to special-case __builtin_classify_type in the hook
invalid_arg_for_unprototyped_fn, the __builtin_classify_type invocation will
conclude to be a integer in the end, so no actual call.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/112725] [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function'
2023-11-27 10:23 [Bug target/112725] New: [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function' tschwinge at gcc dot gnu.org
` (2 preceding siblings ...)
2023-11-29 8:32 ` linkw at gcc dot gnu.org
@ 2023-11-29 8:43 ` jakub at gcc dot gnu.org
2023-11-29 8:50 ` linkw at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-11-29 8:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112725
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Agreed, so like this?
2023-11-29 Jakub Jelinek <jakub@redhat.com>
PR target/112725
* config/rs6000/rs6000.cc (invalid_arg_for_unprototyped_fn): Return
NULL for __builtin_classify_type calls with vector arguments.
* config/s390/s390.cc (s390_invalid_arg_for_unprototyped_fn):
Likewise.
--- gcc/config/rs6000/rs6000.cc.jj 2023-11-17 15:08:20.816961466 +0100
+++ gcc/config/rs6000/rs6000.cc 2023-11-29 09:40:35.782955603 +0100
@@ -24389,7 +24389,8 @@ invalid_arg_for_unprototyped_fn (const_t
&& 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_("AltiVec argument passed to unprototyped function")
: NULL;
}
--- gcc/config/s390/s390.cc.jj 2023-11-27 17:34:25.684287136 +0100
+++ gcc/config/s390/s390.cc 2023-11-29 09:41:08.569491077 +0100
@@ -12650,7 +12650,8 @@ s390_invalid_arg_for_unprototyped_fn (co
&& 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);
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/112725] [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function'
2023-11-27 10:23 [Bug target/112725] New: [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function' tschwinge at gcc dot gnu.org
` (3 preceding siblings ...)
2023-11-29 8:43 ` jakub at gcc dot gnu.org
@ 2023-11-29 8:50 ` linkw at gcc dot gnu.org
2023-11-29 18:21 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-11-29 8:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112725
--- Comment #4 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Agreed, so like this?
Yes, thanks for the prompt fix! The rs6000 part is OK for trunk!
> 2023-11-29 Jakub Jelinek <jakub@redhat.com>
>
> PR target/112725
> * config/rs6000/rs6000.cc (invalid_arg_for_unprototyped_fn): Return
> NULL for __builtin_classify_type calls with vector arguments.
> * config/s390/s390.cc (s390_invalid_arg_for_unprototyped_fn):
> Likewise.
>
> --- gcc/config/rs6000/rs6000.cc.jj 2023-11-17 15:08:20.816961466 +0100
> +++ gcc/config/rs6000/rs6000.cc 2023-11-29 09:40:35.782955603 +0100
> @@ -24389,7 +24389,8 @@ invalid_arg_for_unprototyped_fn (const_t
> && 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_("AltiVec argument passed to unprototyped function")
> : NULL;
> }
> --- gcc/config/s390/s390.cc.jj 2023-11-27 17:34:25.684287136 +0100
> +++ gcc/config/s390/s390.cc 2023-11-29 09:41:08.569491077 +0100
> @@ -12650,7 +12650,8 @@ s390_invalid_arg_for_unprototyped_fn (co
> && 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);
> }
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/112725] [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function'
2023-11-27 10:23 [Bug target/112725] New: [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function' tschwinge at gcc dot gnu.org
` (4 preceding siblings ...)
2023-11-29 8:50 ` linkw at gcc dot gnu.org
@ 2023-11-29 18:21 ` cvs-commit at gcc dot gnu.org
2023-12-01 7:15 ` cvs-commit at gcc dot gnu.org
2023-12-01 7:16 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-29 18:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112725
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:259bb7a45a26b76cbde2131a62926d4419c1cc1b
commit r14-5974-g259bb7a45a26b76cbde2131a62926d4419c1cc1b
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Nov 29 19:19:07 2023 +0100
rs6000: Fix up c-c++-common/builtin-classify-type-1.c failure [PR112725]
The rs6000 backend (and s390 one as well) diagnoses passing vector types
to unprototyped functions, which breaks the builtin-classify-type-1.c test.
The builtin isn't really unprototyped, it is just type-generic and
accepting
vector types is just fine there, all it does is categorize the vector type.
The following patch makes sure we don't diagnose it for this builtin.
2023-11-29 Jakub Jelinek <jakub@redhat.com>
PR target/112725
* config/rs6000/rs6000.cc (invalid_arg_for_unprototyped_fn): Return
NULL for __builtin_classify_type calls with vector arguments.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/112725] [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function'
2023-11-27 10:23 [Bug target/112725] New: [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function' tschwinge at gcc dot gnu.org
` (5 preceding siblings ...)
2023-11-29 18:21 ` cvs-commit at gcc dot gnu.org
@ 2023-12-01 7:15 ` cvs-commit at gcc dot gnu.org
2023-12-01 7:16 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-01 7:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112725
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:28944a016bb5eef9a99691b3c55b124882375180
commit r14-6039-g28944a016bb5eef9a99691b3c55b124882375180
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Dec 1 08:11:34 2023 +0100
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/112725] [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function'
2023-11-27 10:23 [Bug target/112725] New: [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function' tschwinge at gcc dot gnu.org
` (6 preceding siblings ...)
2023-12-01 7:15 ` cvs-commit at gcc dot gnu.org
@ 2023-12-01 7:16 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-12-01 7:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112725
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on both powerpc and s390.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-12-01 7:16 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-27 10:23 [Bug target/112725] New: [14 Regression] powerpc64le-linux-gnu: 'c-c++-common/builtin-classify-type-1.c:113:3: error: AltiVec argument passed to unprototyped function' tschwinge at gcc dot gnu.org
2023-11-27 14:39 ` [Bug target/112725] " rguenth at gcc dot gnu.org
2023-11-27 18:31 ` pinskia at gcc dot gnu.org
2023-11-29 8:32 ` linkw at gcc dot gnu.org
2023-11-29 8:43 ` jakub at gcc dot gnu.org
2023-11-29 8:50 ` linkw at gcc dot gnu.org
2023-11-29 18:21 ` cvs-commit at gcc dot gnu.org
2023-12-01 7:15 ` cvs-commit at gcc dot gnu.org
2023-12-01 7:16 ` jakub at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).