aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@baylibre.com>2024-12-11 15:22:06 +0100
committerThomas Schwinge <tschwinge@baylibre.com>2025-01-08 22:33:10 +0100
commitaae1db742a1766365c0c7023be55ebef67b70bf4 (patch)
tree8ba283b8eb88b7f09d1777cc15b07920bd8889b2 /gcc
parent21ee71afa72746367cab7847f950448f04607dd2 (diff)
downloadgcc-aae1db742a1766365c0c7023be55ebef67b70bf4.zip
gcc-aae1db742a1766365c0c7023be55ebef67b70bf4.tar.gz
gcc-aae1db742a1766365c0c7023be55ebef67b70bf4.tar.bz2
nvptx: Add 'sorry, unimplemented: target cannot support alloca' test cases [PR65181]
Documenting the status quo. PR target/65181 gcc/testsuite/ * gcc.target/nvptx/alloca-1.c: New. * gcc.target/nvptx/vla-1.c: Likewise.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.target/nvptx/alloca-1.c10
-rw-r--r--gcc/testsuite/gcc.target/nvptx/vla-1.c11
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/nvptx/alloca-1.c b/gcc/testsuite/gcc.target/nvptx/alloca-1.c
new file mode 100644
index 0000000..0aa6f10
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/alloca-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options -mno-soft-stack } */
+
+void sink(void *);
+
+void f(void)
+{
+ sink(__builtin_alloca(123));
+ /* { dg-message {sorry, unimplemented: target cannot support alloca} {} { target *-*-* } .-1 } */
+}
diff --git a/gcc/testsuite/gcc.target/nvptx/vla-1.c b/gcc/testsuite/gcc.target/nvptx/vla-1.c
new file mode 100644
index 0000000..5baf95c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/vla-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options -mno-soft-stack } */
+
+void sink(void *);
+
+void f(int s)
+{
+ char a[s];
+ /* { dg-message {sorry, unimplemented: target cannot support alloca} {} { target *-*-* } .-1 } */
+ sink(a);
+}