diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-02-24 18:41:57 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-24 18:41:57 +0000 |
commit | d01b669f26703663da3515638e254fa7a987e860 (patch) | |
tree | 9678f7e64df56cdb6295b50d9ad1af0b65d3c7e9 /test/CodeGen/const-init.c | |
parent | 8ecbaf25c1373be6fb5a9d332b08b6be16d9fd4e (diff) |
Fix IRgen of constant expressions referring to external/static
variables.
- PR3657.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65381 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/const-init.c')
-rw-r--r-- | test/CodeGen/const-init.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGen/const-init.c b/test/CodeGen/const-init.c index 0ca7c24f0b..65a59e869a 100644 --- a/test/CodeGen/const-init.c +++ b/test/CodeGen/const-init.c @@ -79,4 +79,11 @@ long long g16 = (long long) ((void*) 0xFFFFFFFF); // RUN: grep '@g17 = global i32\* @g15' %t && int *g17 = (int *) ((long) &g15); +// RUN: grep '@g18.p = internal global \[1 x i32\*\] \[i32\* @g19\]' %t && +// FIXME: Should we really accept this in Sema? +void g18(void) { + extern int g19; + static int *p[] = { &g19 }; +} + // RUN: true |