diff options
author | Alex Coplan <alex.coplan@arm.com> | 2021-03-04 14:36:39 +0000 |
---|---|---|
committer | Alex Coplan <alex.coplan@arm.com> | 2021-03-04 14:36:39 +0000 |
commit | a6bc1680a493de356d6a381718021c6a44401201 (patch) | |
tree | b0d6a3b1f47d3c4b7f161cc6ab945754e04ad639 /gcc/config/aarch64 | |
parent | 9553c8a1b9dd2ca2f0f30d8b23fc6844c7e4a223 (diff) | |
download | gcc-a6bc1680a493de356d6a381718021c6a44401201.zip gcc-a6bc1680a493de356d6a381718021c6a44401201.tar.gz gcc-a6bc1680a493de356d6a381718021c6a44401201.tar.bz2 |
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.
Diffstat (limited to 'gcc/config/aarch64')
-rw-r--r-- | gcc/config/aarch64/aarch64-sve-builtins.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc index 6270b51..25612d2 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins.cc +++ b/gcc/config/aarch64/aarch64-sve-builtins.cc @@ -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" |