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 <[email protected]> > > 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); > }
