https://gcc.gnu.org/g:9316d021ebb95062f5e3ed9d67734863279671fe

commit r14-9521-g9316d021ebb95062f5e3ed9d67734863279671fe
Author: Thiago Jung Bauermann <thiago.bauerm...@linaro.org>
Date:   Fri Mar 15 12:13:29 2024 -0300

    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.

Diff:
---
 .../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 5b777482544..0f605083c5c 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 *-*-* } 
.-1 } */
   accum += __arm_vcx1qa (0, accum, "");               /* { dg-error {argument 
3 to '__builtin_arm_vcx1qav16qi' must be a constant immediate in range 
\[0-4095\]} } */
-  /* { dg-warning {passing argument 3 of '__builtin_arm_vcx1qav16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
119 } */
+  /* { dg-warning {passing argument 3 of '__builtin_arm_vcx1qav16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx2q (0, n, "");                    /* { dg-error {argument 
3 to '__builtin_arm_vcx2qv16qi' must be a constant immediate in range 
\[0-127\]} } */
-  /* { dg-warning {passing argument 3 of '__builtin_arm_vcx2qv16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
121 } */
+  /* { dg-warning {passing argument 3 of '__builtin_arm_vcx2qv16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx2q_u8 (0, n, "x");                /* { dg-error {argument 
3 to '__builtin_arm_vcx2qv16qi' must be a constant immediate in range 
\[0-127\]} } */
-  /* { dg-warning {passing argument 3 of '__builtin_arm_vcx2qv16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
123 } */
+  /* { dg-warning {passing argument 3 of '__builtin_arm_vcx2qv16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx2qa (0, accum, n, "");            /* { dg-error {argument 
4 to '__builtin_arm_vcx2qav16qi' must be a constant immediate in range 
\[0-127\]} } */
-  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx2qav16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
125 } */
+  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx2qav16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx3q_u8 (0, n, m, "");              /* { dg-error {argument 
4 to '__builtin_arm_vcx3qv16qi' must be a constant immediate in range \[0-15\]} 
} */
-  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx3qv16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
127 } */
+  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx3qv16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx3q (0, n, m, "x");                /* { dg-error {argument 
4 to '__builtin_arm_vcx3qv16qi' must be a constant immediate in range \[0-15\]} 
} */
-  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx3qv16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
129 } */
+  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx3qv16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx3qa (0, accum, n, m, "");         /* { dg-error {argument 
5 to '__builtin_arm_vcx3qav16qi' must be a constant immediate in range 
\[0-15\]} } */
-  /* { dg-warning {passing argument 5 of '__builtin_arm_vcx3qav16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
131 } */
+  /* { dg-warning {passing argument 5 of '__builtin_arm_vcx3qav16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
 
   accum += __arm_vcx1q_m (0, accum, "", pred);        /* { dg-error {argument 
3 to '__builtin_arm_vcx1q_p_v16qi' must be a constant immediate in range 
\[0-4095\]} } */
-  /* { dg-warning {passing argument 3 of '__builtin_arm_vcx1q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
134 } */
+  /* { dg-warning {passing argument 3 of '__builtin_arm_vcx1q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx1qa_m (0, accum, "", pred);       /* { dg-error {argument 
3 to '__builtin_arm_vcx1qa_p_v16qi' must be a constant immediate in range 
\[0-4095\]} } */
-  /* { dg-warning {passing argument 3 of '__builtin_arm_vcx1qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
136 } */
+  /* { dg-warning {passing argument 3 of '__builtin_arm_vcx1qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx2q_m (0, accum, n, "", pred);     /* { dg-error {argument 
4 to '__builtin_arm_vcx2q_p_v16qi' must be a constant immediate in range 
\[0-127\]} } */
-  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx2q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
138 } */
+  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx2q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx2qa_m (0, accum, n, "", pred);    /* { dg-error {argument 
4 to '__builtin_arm_vcx2qa_p_v16qi' must be a constant immediate in range 
\[0-127\]} } */
-  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx2qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
140 } */
+  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx2qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx3q_m (0, accum, n, m, "x", pred); /* { dg-error {argument 
5 to '__builtin_arm_vcx3q_p_v16qi' must be a constant immediate in range 
\[0-15\]} } */
-  /* { dg-warning {passing argument 5 of '__builtin_arm_vcx3q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
142 } */
+  /* { dg-warning {passing argument 5 of '__builtin_arm_vcx3q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx3qa_m (0, accum, n, m, "", pred); /* { dg-error {argument 
5 to '__builtin_arm_vcx3qa_p_v16qi' must be a constant immediate in range 
\[0-15\]} } */
-  /* { dg-warning {passing argument 5 of '__builtin_arm_vcx3qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
144 } */
+  /* { dg-warning {passing argument 5 of '__builtin_arm_vcx3qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
 
   /* `coproc' is of wrong type.  */
   accum += __arm_vcx1qa ("", accum, 4095);      /* { dg-error {coproc must be 
a constant immediate in range \[0-7\] enabled with .\+cdecp<N>.} } */
-  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx1qav16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
148 } */
+  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx1qav16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx2q ("", n, 126);            /* { dg-error {coproc must be 
a constant immediate in range \[0-7\] enabled with .\+cdecp<N>.} } */
-  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx2qv16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
150 } */
+  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx2qv16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx2qa ("", accum, n, 127);    /* { dg-error {coproc must be 
a constant immediate in range \[0-7\] enabled with .\+cdecp<N>.} } */
-  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx2qav16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
152 } */
+  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx2qav16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx3q ("", n, m, 15);          /* { dg-error {coproc must be 
a constant immediate in range \[0-7\] enabled with .\+cdecp<N>.} } */
-  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx3qv16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
154 } */
+  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx3qv16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx3qa ("", accum, n, m, 15);  /* { dg-error {coproc must be 
a constant immediate in range \[0-7\] enabled with .\+cdecp<N>.} } */
-  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx3qav16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
156 } */
+  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx3qav16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
 
   accum += __arm_vcx1q_m ("", accum, 4094, pred);      /* { dg-error {coproc 
must be a constant immediate in range \[0-7\] enabled with .\+cdecp<N>.} } */
-  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx1q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
159 } */
+  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx1q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx1qa_m ("", accum, 4095, pred);     /* { dg-error {coproc 
must be a constant immediate in range \[0-7\] enabled with .\+cdecp<N>.} } */
-  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx1qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
161 } */
+  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx1qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx2q_m ("", accum, n, 126, pred);    /* { dg-error {coproc 
must be a constant immediate in range \[0-7\] enabled with .\+cdecp<N>.} } */
-  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx2q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
163 } */
+  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx2q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx2qa_m ("", accum, n, 127, pred);   /* { dg-error {coproc 
must be a constant immediate in range \[0-7\] enabled with .\+cdecp<N>.} } */
-  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx2qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
165 } */
+  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx2qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx3q_m ("", accum, n, m, 15, pred);  /* { dg-error {coproc 
must be a constant immediate in range \[0-7\] enabled with .\+cdecp<N>.} } */
-  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx3q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
167 } */
+  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx3q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx3qa_m ("", accum, n, m, 15, pred); /* { dg-error {coproc 
must be a constant immediate in range \[0-7\] enabled with .\+cdecp<N>.} } */
-  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx3qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
169 } */
+  /* { dg-warning {passing argument 1 of '__builtin_arm_vcx3qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
 
   /* `pred" is of wrong type.  */
   accum += __arm_vcx1q_m (0, accum, 4094, "");
-  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx1q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
173 } */
+  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx1q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx1qa_m (0, accum, 4095, "");
-  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx1qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
175 } */
+  /* { dg-warning {passing argument 4 of '__builtin_arm_vcx1qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx2q_m (0, accum, n, 126, "");
-  /* { dg-warning {passing argument 5 of '__builtin_arm_vcx2q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
177 } */
+  /* { dg-warning {passing argument 5 of '__builtin_arm_vcx2q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx2qa_m (0, accum, n, 127, "");
-  /* { dg-warning {passing argument 5 of '__builtin_arm_vcx2qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
179 } */
+  /* { dg-warning {passing argument 5 of '__builtin_arm_vcx2qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx3q_m (0, accum, n, m, 15, "");
-  /* { dg-warning {passing argument 6 of '__builtin_arm_vcx3q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
181 } */
+  /* { dg-warning {passing argument 6 of '__builtin_arm_vcx3q_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
   accum += __arm_vcx3qa_m (0, accum, n, m, 15, "");
-  /* { dg-warning {passing argument 6 of '__builtin_arm_vcx3qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
183 } */
+  /* { dg-warning {passing argument 6 of '__builtin_arm_vcx3qa_p_v16qi' makes 
integer from pointer without a cast \[-Wint-conversion\]} "" { target *-*-* } 
.-1 } */
 
   return accum;
 }

Reply via email to