public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite: Turn errors back into warnings in arm/acle/cde-mve-error-2.c
@ 2024-01-13 20:46 Thiago Jung Bauermann
  2024-03-01 14:34 ` Richard Earnshaw (lists)
  0 siblings, 1 reply; 4+ messages in thread
From: Thiago Jung Bauermann @ 2024-01-13 20:46 UTC (permalink / raw)
  To: gcc-patches

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 } */
   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 *-*-* } 120 } */
   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 *-*-* } 122 } */
   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 *-*-* } 124 } */
   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 *-*-* } 126 } */
   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 *-*-* } 128 } */
   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 *-*-* } 130 } */
   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 *-*-* } 132 } */
 
   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 *-*-* } 135 } */
   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 *-*-* } 137 } */
   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 *-*-* } 139 } */
   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 *-*-* } 141 } */
   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 *-*-* } 143 } */
   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 *-*-* } 145 } */
 
   /* `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 *-*-* } 149 } */
   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 *-*-* } 151 } */
   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 *-*-* } 153 } */
   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 *-*-* } 155 } */
   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 *-*-* } 157 } */
 
   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 *-*-* } 160 } */
   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 *-*-* } 162 } */
   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 *-*-* } 164 } */
   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 *-*-* } 166 } */
   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 *-*-* } 168 } */
   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 *-*-* } 170 } */
 
   /* `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 *-*-* } 174 } */
   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 *-*-* } 176 } */
   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 *-*-* } 178 } */
   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 *-*-* } 180 } */
   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 *-*-* } 182 } */
   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 *-*-* } 184 } */
 
   return accum;
 }

base-commit: 444a31f3b3542ccbecb67cef3a01df8aa9a43802

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-18 17:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-13 20:46 [PATCH] testsuite: Turn errors back into warnings in arm/acle/cde-mve-error-2.c Thiago Jung Bauermann
2024-03-01 14:34 ` Richard Earnshaw (lists)
2024-03-15 15:13   ` Thiago Jung Bauermann
2024-03-18 17:19     ` Richard Earnshaw (lists)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).