brintos

brintos / llvm-project-archived public Read only

0
0
Text · 767 B · ca8f83c Raw
21 lines · c
1// REQUIRES: host-supports-jit2 3// RUN: cat %s | clang-repl -Xcc -xc -Xcc -Xclang -Xcc -verify | FileCheck %s4// RUN: cat %s | clang-repl -Xcc -xc -Xcc -O2 -Xcc -Xclang -Xcc -verify| FileCheck %s5int printf(const char *, ...);6int i = 42; err // expected-error{{use of undeclared identifier}}7int i = 42;8struct S { float f; struct S *m;} s = {1.0, 0};9// FIXME: Making foo inline fails to emit the function.10int foo() { return 42; }11void 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}16run();17// CHECK: i = 4218// CHECK-NEXT: S[f=1.000000, m=0x0]19 20%quit21