aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr23237.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr23237.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr23237.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr23237.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr23237.c
new file mode 100644
index 000000000..f3f917d0d
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr23237.c
@@ -0,0 +1,16 @@
+/* Don't assemble, as this section syntax may not be valid on all platforms
+ (e.g., Darwin). */
+/* { dg-do compile } */
+
+/* { dg-require-effective-target named_sections } */
+
+static __attribute__ ((__section__ (".init.data"))) char *message;
+static __attribute__ ((__section__ (".init.data"))) int (*actions[])(void) = {};
+void unpack_to_rootfs(void)
+{
+ while (!message)
+ {
+ if(!actions[0])
+ return;
+ }
+}