On 13/01/2024 20:46, Thiago Jung Bauermann wrote: > Since commit 2c3db94d9fd ("c: Turn int-conversion warnings into > permerrors") the test fails with errors such as: > > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 (test for errors, line > 32) > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 (test for errors, line > 33) > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 (test for errors, line > 34) > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 (test for errors, line > 35) > ⋮ > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 at line 118 (test for > warnings, line 117) > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 (test for errors, line > 119) > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 at line 120 (test for > warnings, line 119) > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 (test for errors, line > 121) > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 at line 122 (test for > warnings, line 121) > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 (test for errors, line > 123) > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 at line 124 (test for > warnings, line 123) > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 (test for errors, line > 125) > ⋮ > FAIL: gcc.target/arm/acle/cde-mve-error-2.c -O0 (test for excess errors) > > There's a total of 1016 errors. Here's a sample of the excess errors: > > Excess errors: > /path/gcc.git/gcc/testsuite/gcc.target/arm/acle/cde-mve-error-2.c:117:31: > error: passing argument 2 of '__builtin_arm_vcx1qv16qi' makes integer from > pointer without a cast [-Wint-conversion] > /path/gcc.git/gcc/testsuite/gcc.target/arm/acle/cde-mve-error-2.c:119:3: > error: passing argument 3 of '__builtin_arm_vcx1qav16qi' makes integer from > pointer without a cast [-Wint-conversion] > /path/gcc.git/gcc/testsuite/gcc.target/arm/acle/cde-mve-error-2.c:121:3: > error: passing argument 3 of '__builtin_arm_vcx2qv16qi' makes integer from > pointer without a cast [-Wint-conversion] > /path/gcc.git/gcc/testsuite/gcc.target/arm/acle/cde-mve-error-2.c:123:3: > error: passing argument 3 of '__builtin_arm_vcx2qv16qi' makes integer from > pointer without a cast [-Wint-conversion] > > The test expects these messages to be warnings, not errors. My first try > was to change it to expect them as errors instead. This didn't work, IIUC > because the error prevents the compiler from continuing processing the file > and thus other errors which are expected by the test don't get emitted. > > Therefore, add -fpermissive so that the test behaves as it did previously. > Because of the additional line in the header, I had to adjust the line > numbers of the expected warnings. > > Tested on armv8l-linux-gnueabihf. > > gcc/testsuite/ChangeLog: > * gcc.target/arm/acle/cde-mve-error-2.c: Add -fpermissive. > --- > .../gcc.target/arm/acle/cde-mve-error-2.c | 63 ++++++++++--------- > 1 file changed, 32 insertions(+), 31 deletions(-) > > diff --git a/gcc/testsuite/gcc.target/arm/acle/cde-mve-error-2.c > b/gcc/testsuite/gcc.target/arm/acle/cde-mve-error-2.c > index 5b7774825442..da283a06a54d 100644 > --- a/gcc/testsuite/gcc.target/arm/acle/cde-mve-error-2.c > +++ b/gcc/testsuite/gcc.target/arm/acle/cde-mve-error-2.c > @@ -2,6 +2,7 @@ > > /* { dg-do assemble } */ > /* { dg-require-effective-target arm_v8_1m_main_cde_mve_fp_ok } */ > +/* { dg-options "-fpermissive" } */ > /* { dg-add-options arm_v8_1m_main_cde_mve_fp } */ > > /* The error checking files are split since there are three kinds of > @@ -115,73 +116,73 @@ uint8x16_t test_bad_immediates (uint8x16_t n, > uint8x16_t m, int someval, > > /* `imm' is of wrong type. */ > accum += __arm_vcx1q_u8 (0, ""); /* { dg-error > {argument 2 to '__builtin_arm_vcx1qv16qi' must be a constant immediate in > range \[0-4095\]} } */ > - /* { dg-warning {passing argument 2 of '__builtin_arm_vcx1qv16qi' makes > integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } > 117 } */ > + /* { dg-warning {passing argument 2 of '__builtin_arm_vcx1qv16qi' makes > integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } > 118 } */
Absolute line numbers are a pain, but I think we can use '.-1' (without the quotes) in these cases to minimize the churn. If that works, ok with that change. R.