@@ -925,8 +925,8 @@ aarch64_simd_expand_args (rtx target, int icode, int have_retval,
if (!(*insn_data[icode].operand[argc + have_retval].predicate)
(op[argc], mode[argc]))
{
- error_at (EXPR_LOCATION (exp), "incompatible type for argument %d, "
- "expected %<const int%>", argc + 1);
+ error ("%Kargument %d must be a constant immediate",
+ exp, argc + 1);
return const0_rtx;
}
break;
@@ -3,13 +3,16 @@
#include "arm_neon.h"
-void foo ()
+void foo (int a)
{
- int a;
int32x2_t arg1;
int32x2_t arg2;
int32x2_t result;
arg1 = vcreate_s32 (UINT64_C (0x0000ffffffffffff));
arg2 = vcreate_s32 (UINT64_C (0x16497fffffffffff));
- result = __builtin_aarch64_srsra_nv2si (arg1, arg2, a); /* { dg-error "incompatible type for argument" } */
+ /* The correct line number is in the preamble to the error message,
+ not in the final line (which is all that dg-error inspects). Hence,
+ we have to tell dg-error to ignore the line number. */
+ result = vrsra_n_s32 (arg1, arg2, a);
+ /* { dg-error "must be a constant immediate" "" { target *-*-* } 0 } */
}