mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 01:00:56 +08:00
aarch64: Add missing error_mark_node check [PR99381]
We were missing a check in function_resolver::require_vector_type to see if the argument type was already invalid. This was causing us to attempt to emit a diagnostic and subsequently ICE in print_type. Fixed thusly. gcc/ChangeLog: PR target/99381 * config/aarch64/aarch64-sve-builtins.cc (function_resolver::require_vector_type): Handle error_mark_node. gcc/testsuite/ChangeLog: PR target/99381 * gcc.target/aarch64/pr99381.c: New test.
This commit is contained in:
parent
9553c8a1b9
commit
a6bc1680a4
@ -1467,6 +1467,9 @@ function_resolver::require_vector_type (unsigned int argno,
|
||||
{
|
||||
tree expected = acle_vector_types[0][type];
|
||||
tree actual = get_argument_type (argno);
|
||||
if (actual == error_mark_node)
|
||||
return false;
|
||||
|
||||
if (!matches_type_p (expected, actual))
|
||||
{
|
||||
error_at (location, "passing %qT to argument %d of %qE, which"
|
||||
|
10
gcc/testsuite/gcc.target/aarch64/pr99381.c
Normal file
10
gcc/testsuite/gcc.target/aarch64/pr99381.c
Normal file
@ -0,0 +1,10 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-march=armv8-a" } */
|
||||
/* PR99381: we shouldn't ICE if the user forgets -march=armv8.2-a+sve. */
|
||||
|
||||
#include <arm_sve.h>
|
||||
_Bool a;
|
||||
int main()
|
||||
{
|
||||
a = svaddv(svptrue_b8(), svdup_s8(0)); /* { dg-error "ACLE function 'svptrue_b8' requires ISA extension 'sve'" } */
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user