Eli Friedman | 8fef47e | 2008-12-20 23:11:59 +0000 | [diff] [blame] | 1 | // RUN: clang %s -emit-llvm -o %t |
2 | |||||
3 | int b(char* x); | ||||
4 | |||||
5 | // Extremely basic VLA test | ||||
6 | void a(int x) { | ||||
7 | char arry[x]; | ||||
8 | arry[0] = 10; | ||||
9 | b(arry); | ||||
10 | } | ||||
Anders Carlsson | 6cb99b7 | 2008-12-21 03:33:21 +0000 | [diff] [blame^] | 11 | |
12 | void b(int n) | ||||
13 | { | ||||
14 | sizeof(int[n]); | ||||
15 | } |