aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20040726-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20040726-2.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20040726-2.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20040726-2.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20040726-2.c
new file mode 100644
index 000000000..ce60095fd
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20040726-2.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* From a failure after the global ccp pass. */
+typedef struct
+{
+ char n[129];
+} A;
+
+const A C = {
+ 0,
+ 0
+};
+
+extern const A *const B;
+
+void bar(const char *);
+
+void foo ()
+{
+ bar (B->n);
+}
+
+const A *const B = &C;