1 /* RUN: %clang_cc1 -std=c89 -emit-llvm -o - %s | FileCheck %s
2 RUN: %clang_cc1 -std=c99 -emit-llvm -o - %s | FileCheck %s
3 RUN: %clang_cc1 -std=c11 -emit-llvm -o - %s | FileCheck %s
4 RUN: %clang_cc1 -std=c17 -emit-llvm -o - %s | FileCheck %s
5 RUN: %clang_cc1 -std=c2x -emit-llvm -o - %s | FileCheck %s
9 * Are constraints on function return the same as assignment?
12 float func(void) { return 1.0f
; }
13 void other_func(void) {
17 /* Test that there's been a conversion from float to int. */
19 // CHECK: %call = call float @func()
20 // CHECK-NEXT: %conv = fptosi float %call to i32
21 // CHECK-NEXT: store i32 %conv, ptr %i, align 4
23 /* Test that the conversion looks the same as an assignment. */
25 // CHECK: %0 = load float, ptr %f, align 4
26 // CHECK-NEXT: %conv1 = fptosi float %0 to i32
27 // CHECK-NEXT: store i32 %conv1, ptr %i, align 4