summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGen/tentative-array.c4
-rw-r--r--clang/test/CodeGen/tentative-decls.c28
-rw-r--r--clang/test/PCH/external-defs.c2
3 files changed, 30 insertions, 4 deletions
diff --git a/clang/test/CodeGen/tentative-array.c b/clang/test/CodeGen/tentative-array.c
deleted file mode 100644
index 6879d0f07d7..00000000000
--- a/clang/test/CodeGen/tentative-array.c
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: clang-cc -emit-llvm < %s -triple=i686-apple-darwin9 | grep "global \[1 x i32\]"
-
-int r[];
-int (*a)[] = &r;
diff --git a/clang/test/CodeGen/tentative-decls.c b/clang/test/CodeGen/tentative-decls.c
new file mode 100644
index 00000000000..4604f2f4297
--- /dev/null
+++ b/clang/test/CodeGen/tentative-decls.c
@@ -0,0 +1,28 @@
+// RUN: clang-cc -emit-llvm -o %t %s &&
+
+// RUN: grep '@r = common global \[1 x .*\] zeroinitializer' %t &&
+
+int r[];
+int (*a)[] = &r;
+
+struct s0;
+struct s0 x;
+// RUN: grep '@x = common global .struct.s0 zeroinitializer' %t &&
+
+struct s0 y;
+// RUN: grep '@y = common global .struct.s0 zeroinitializer' %t &&
+struct s0 *f0() {
+ return &y;
+}
+
+struct s0 {
+ int x;
+};
+
+// RUN: grep '@b = common global \[1 x .*\] zeroinitializer' %t &&
+int b[];
+int *f1() {
+ return b;
+}
+
+// RUN: true
diff --git a/clang/test/PCH/external-defs.c b/clang/test/PCH/external-defs.c
index 6a46f45cc1e..251a10d9ce6 100644
--- a/clang/test/PCH/external-defs.c
+++ b/clang/test/PCH/external-defs.c
@@ -19,3 +19,5 @@ int incomplete_array3[];
struct S {
int x, y;
};
+
+// XFAIL
OpenPOWER on IntegriCloud