| 1 |
// REQUIRES: host-supports-jit |
| 2 |
|
| 3 |
// RUN: cat %s | clang-repl -Xcc -xc -Xcc -Xclang -Xcc -verify | FileCheck %s |
| 4 |
// RUN: cat %s | clang-repl -Xcc -xc -Xcc -O2 -Xcc -Xclang -Xcc -verify| FileCheck %s |
| 5 |
int printf(const char *, ...); |
| 6 |
int i = 42; err // expected-error{{use of undeclared identifier}} |
| 7 |
int i = 42; |
| 8 |
struct S { float f; struct S *m;} s = {1.0, 0}; |
| 9 |
// FIXME: Making foo inline fails to emit the function. |
| 10 |
int foo() { return 42; } |
| 11 |
void run() { \ |
| 12 |
printf("i = %d\n", i); \ |
| 13 |
printf("S[f=%f, m=0x%llx]\n", s.f, (unsigned long long)s.m); \ |
| 14 |
int r3 = foo(); \ |
| 15 |
} |
| 16 |
run(); |
| 17 |
// CHECK: i = 42 |
| 18 |
// CHECK-NEXT: S[f=1.000000, m=0x0] |
| 19 |
|
| 20 |
%quit |