Files
clang-p2996/clang/test/CodeGen/address-space.c
Chris Lattner d71f83a8cb this started failing because a GEP was constant folded,
improve the robustness of the test.

llvm-svn: 49618
2008-04-13 19:54:28 +00:00

10 lines
367 B
C

// RUN: clang -emit-llvm < %s 2>&1 | grep '@foo.*global.*addrspace(1)'
// RUN: clang -emit-llvm < %s 2>&1 | grep '@ban.*global.*addrspace(1)'
// RUN: clang -emit-llvm < %s 2>&1 | grep 'load.*addrspace(1)' | count 2
int foo __attribute__((address_space(1)));
int ban[10] __attribute__((address_space(1)));
int bar() { return foo; }
int baz(int i) { return ban[i]; }