C++: Avoid ICE with [[trivial_abi]]
Fixes an internal compiler error (ICE) when using the [[trivial_abi]] attribute in C++ templates.
The compiler was crashing when the [[trivial_abi]] attribute was used in C++ template code. This commit fixes the issue by ensuring that the trivial_abi related logic is only applied when not processing a template declaration. This prevents the compiler from trying to perform cleanup operations at template parsing time, which is not necessary.
In Details
The store_parm_decls function was attempting to perform trivial_abi related operations during template parsing, leading to an ICE. This commit adds a check for !processing_template_decl to avoid this. Search terms: GCC C++ trivial_abi template.
For Context
The [[trivial_abi]] attribute in C++ can be used to specify that a function's arguments and return type have a simple, predictable ABI (Application Binary Interface). This allows the compiler to generate more efficient code for certain function calls. This commit fixes a bug that caused the compiler to crash when using this attribute with C++ templates. Search terms: GCC C++ trivial_abi template.