summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/pr64744-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/arm/pr64744-2.c')
-rw-r--r--gcc/testsuite/gcc.target/arm/pr64744-2.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/arm/pr64744-2.c b/gcc/testsuite/gcc.target/arm/pr64744-2.c
new file mode 100644
index 00000000000..d33ea7bd5fe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr64744-2.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target naked_functions } */
+/* { dg-options "-O0" } */
+
+struct s {
+ char a;
+ int b;
+};
+
+__attribute__((naked))
+void foo () {
+ struct s x = {}; /* { dg-error "cannot allocate stack for variable" } */
+}