public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] s390: Fix builtin-classify-type-1.c on s390 too [PR112725]
@ 2023-11-29 18:27 Jakub Jelinek
  2023-11-30 16:34 ` Jakub Jelinek
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2023-11-29 18:27 UTC (permalink / raw)
  To: Ulrich Weigand, Andreas Krebbel; +Cc: gcc-patches

Hi!

Given that the s390 backend defines pretty much the same target hook
as rs6000, I believe it suffers (at least when using -mvx?) the same
problem as rs6000, though admittedly this is so far completely
untested.

Ok for trunk if it passes bootstrap/regtest there?

2023-11-29  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.

--- 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);
 }

	Jakub


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] s390: Fix builtin-classify-type-1.c on s390 too [PR112725]
  2023-11-29 18:27 [PATCH] s390: Fix builtin-classify-type-1.c on s390 too [PR112725] Jakub Jelinek
@ 2023-11-30 16:34 ` Jakub Jelinek
  2023-12-01  6:50   ` Andreas Krebbel
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Jelinek @ 2023-11-30 16:34 UTC (permalink / raw)
  To: Ulrich Weigand, Andreas Krebbel, gcc-patches

On Wed, Nov 29, 2023 at 07:27:20PM +0100, Jakub Jelinek wrote:
> Given that the s390 backend defines pretty much the same target hook
> as rs6000, I believe it suffers (at least when using -mvx?) the same
> problem as rs6000, though admittedly this is so far completely
> untested.
> 
> Ok for trunk if it passes bootstrap/regtest there?

Now successfully bootstrapped/regtested on s390x-linux and indeed it
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
there as well.

> 2023-11-29  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.
> 
> --- 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);
>  }

	Jakub


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] s390: Fix builtin-classify-type-1.c on s390 too [PR112725]
  2023-11-30 16:34 ` Jakub Jelinek
@ 2023-12-01  6:50   ` Andreas Krebbel
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Krebbel @ 2023-12-01  6:50 UTC (permalink / raw)
  To: Jakub Jelinek, Ulrich Weigand, gcc-patches

On 11/30/23 17:34, Jakub Jelinek wrote:
> On Wed, Nov 29, 2023 at 07:27:20PM +0100, Jakub Jelinek wrote:
>> Given that the s390 backend defines pretty much the same target hook
>> as rs6000, I believe it suffers (at least when using -mvx?) the same
>> problem as rs6000, though admittedly this is so far completely
>> untested.
>>
>> Ok for trunk if it passes bootstrap/regtest there?
> 
> Now successfully bootstrapped/regtested on s390x-linux and indeed it
> 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
> there as well.
> 
>> 2023-11-29  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.

Ok. Thank you, Jakub!

Andreas


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-01  6:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 18:27 [PATCH] s390: Fix builtin-classify-type-1.c on s390 too [PR112725] Jakub Jelinek
2023-11-30 16:34 ` Jakub Jelinek
2023-12-01  6:50   ` Andreas Krebbel

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).