]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: ctf: make array in ctf-file-scope-1 fixed length
authorDavid Faust <david.faust@oracle.com>
Fri, 1 Mar 2024 18:43:24 +0000 (10:43 -0800)
committerDavid Faust <david.faust@oracle.com>
Fri, 1 Mar 2024 19:07:16 +0000 (11:07 -0800)
The array member of struct SFOO in the ctf-file-scope-1 caused the test
to fail for the BPF target, since BPF does not support dynamic stack
allocation. The array does not need to variable length for the sake of
the test, so make it fixed length instead to allow the test to run
successfully for the bpf-unknown-none target.

gcc/testsuite/

* gcc.dg/debug/ctf/ctf-file-scope-1.c (SFOO): Make array member
fixed-length.

gcc/testsuite/gcc.dg/debug/ctf/ctf-file-scope-1.c

index a683113e505e4cdd49accd0cce619e142b61acc4..ddfb31da4056ca11f05134caa2e7ee9a6bb4ca6a 100644 (file)
@@ -9,7 +9,7 @@
 
 int foo (int n)
 {
-  typedef struct { int a[n]; } SFOO;
+  typedef struct { int a[6]; } SFOO;
 
   SFOO a;
   __attribute__ ((noinline)) SFOO gfoo (void) { return a; }