diff options
Diffstat (limited to 'clang/test/CodeGen/init.c')
| -rw-r--r-- | clang/test/CodeGen/init.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGen/init.c b/clang/test/CodeGen/init.c index 9924662cddf..8403320ec69 100644 --- a/clang/test/CodeGen/init.c +++ b/clang/test/CodeGen/init.c @@ -72,6 +72,16 @@ struct a7 { struct a7 test7 = { .b = 0, .v = "bar" }; +// CHECK-DAG: @huge_array = global {{.*}} <{ i32 1, i32 0, i32 2, i32 0, i32 3, [999999995 x i32] zeroinitializer }> +int huge_array[1000000000] = {1, 0, 2, 0, 3, 0, 0, 0}; + +// CHECK-DAG: @huge_struct = global {{.*}} { i32 1, <{ i32, [999999999 x i32] }> <{ i32 2, [999999999 x i32] zeroinitializer }> } +struct Huge { + int a; + int arr[1000 * 1000 * 1000]; +} huge_struct = {1, {2, 0, 0, 0}}; + + // PR279 comment #3 char test8(int X) { char str[100000] = "abc"; // tail should be memset. |

