https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108348
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Kewen Lin <li...@gcc.gnu.org>: https://gcc.gnu.org/g:5d9529687deb9ed009361a16c02a7f6c3e2ebbf3 commit r13-5236-g5d9529687deb9ed009361a16c02a7f6c3e2ebbf3 Author: Kewen Lin <li...@linux.ibm.com> Date: Wed Jan 18 02:34:19 2023 -0600 rs6000: Teach rs6000_opaque_type_invalid_use_p about gcall [PR108348] PR108348 shows one special case that MMA opaque types are used in function arguments and treated as pass by reference, it results in one copying from argument to a temp variable, since this copying happens before rs6000_function_arg check, it can cause ICE without MMA support then. This patch is to teach function rs6000_opaque_type_invalid_use_p to check if any function argument in a gcall stmt has the invalid use of MMA opaque types. btw, I checked the handling on return value, it doesn't have this kind of issue as its checking and error emission is quite early, so this doesn't handle function return value. PR target/108348 gcc/ChangeLog: * config/rs6000/rs6000.cc (rs6000_opaque_type_invalid_use_p): Add the support for invalid uses of MMA opaque type in function arguments. gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr108348-1.c: New test. * gcc.target/powerpc/pr108348-2.c: New test.