testsuite: Turn errors back into warnings in arm/acle/cde-mve-error-2.c
commit9316d021ebb95062f5e3ed9d67734863279671fe
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Fri, 15 Mar 2024 15:13:29 +0000 (15 12:13 -0300)
committerRichard Earnshaw <rearnsha@arm.com>
Mon, 18 Mar 2024 17:13:52 +0000 (18 17:13 +0000)
tree312dcece128a6017c127309c3eb7ad237210fb58
parentd2029bbc69df7341775faf6cf1aa13d978c223a1
testsuite: Turn errors back into warnings in arm/acle/cde-mve-error-2.c

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  (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, the line
numbers of the expected warnings don't match anymore so replace them
with ".-1" as suggested by Richard Earnshaw.

Tested on armv8l-linux-gnueabihf.

gcc/testsuite/ChangeLog:
* gcc.target/arm/acle/cde-mve-error-2.c: Add -fpermissive.  Use
relative offsets for line numbers.
gcc/testsuite/gcc.target/arm/acle/cde-mve-error-2.c