1 | // RUN: %clang_cc1 -std=c++11 -S -emit-llvm -o %t-c++11.ll %s -triple x86_64-apple-darwin10 |
2 | // RUN: FileCheck %s < %t-c++11.ll |
3 | // RUN: %clang_cc1 -std=c++98 -S -emit-llvm -o %t.ll %s -triple x86_64-apple-darwin10 |
4 | // RUN: diff %t.ll %t-c++11.ll |
5 | |
6 | // rdar://12897704 |
7 | |
8 | struct sAFSearchPos { |
9 | unsigned char *pos; |
10 | unsigned char count; |
11 | }; |
12 | |
13 | static volatile struct sAFSearchPos testPositions; |
14 | // CHECK: @_ZL13testPositions = internal global %struct.sAFSearchPos zeroinitializer |
15 | |
16 | static volatile struct sAFSearchPos arrayPositions[100][10][5]; |
17 | // CHECK: @_ZL14arrayPositions = internal global [100 x [10 x [5 x %struct.sAFSearchPos]]] zeroinitializer |
18 | |
19 | int main() { |
20 | return testPositions.count + arrayPositions[10][4][3].count; |
21 | } |
22 | |