On 23/04/2025 16:22, Jakub Jelinek wrote:
On Wed, Apr 23, 2025 at 03:57:58PM +0100, Andre Vieira (lists) wrote:
+++ b/gcc/testsuite/gcc.target/aarch64/pr116479.c
@@ -0,0 +1,20 @@
+/* PR 116479 */
+/* { dg-do run } */
+/* { dg-additional-options "-O -funroll-loops -finline-stringops -fmodulo-sched 
--param=max-iterations-computation-cost=637924687 -static -std=c23" } */
+_BitInt (13577) b;
+
+void
+foo (char *ret)
+{
+  __builtin_memset (&b, 4, 697);
+  *ret = 0;
+}
+
+int
+main ()
+{
+  char x;
+  foo (&x);
+  for (unsigned i = 0; i < sizeof (x); i++)
+    __builtin_printf ("%02x", i[(volatile unsigned char *) &x]);

Shouldn't these 2 lines instead be
   if (x != 0)
     __builtin_abort ();
?


Fair, I copied the testcase verbatim from the PR, the error-mode was a segfault. But I agree a check !=0 with __builtin_abort here seems more appropriate. Any opinions on whether I should move it to dg with a bitint target?


+}


        Jakub


Reply via email to