46 lines · c
1// Check handling -mhard-float / -msoft-float options2// when build for SystemZ platforms.3//4// Default5// RUN: %clang -c %s -### -o %t.o 2>&1 \6// RUN: -target s390x-linux-gnu \7// RUN: | FileCheck --check-prefix=CHECK-DEF %s8// CHECK-DEF-NOT: "-msoft-float"9// CHECK-DEF-NOT: "-mfloat-abi" "soft"10//11// -mhard-float12// RUN: %clang -c %s -### -o %t.o 2>&1 \13// RUN: -target s390x-linux-gnu -mhard-float \14// RUN: | FileCheck --check-prefix=CHECK-HARD %s15// CHECK-HARD-NOT: "-msoft-float"16// CHECK-HARD-NOT: "-mfloat-abi" "soft"17//18// -msoft-float19// RUN: %clang -c %s -### -o %t.o 2>&1 \20// RUN: -target s390x-linux-gnu -msoft-float \21// RUN: | FileCheck --check-prefix=CHECK-SOFT %s22// CHECK-SOFT: "-msoft-float" "-mfloat-abi" "soft"23//24// -mfloat-abi=soft25// RUN: not %clang -c %s -### -o %t.o 2>&1 \26// RUN: -target s390x-linux-gnu -mfloat-abi=soft \27// RUN: | FileCheck --check-prefix=CHECK-FLOATABISOFT %s28// CHECK-FLOATABISOFT: error: unsupported option '-mfloat-abi=soft'29//30// -mfloat-abi=hard31// RUN: not %clang -c %s -### -o %t.o 2>&1 \32// RUN: -target s390x-linux-gnu -mfloat-abi=hard \33// RUN: | FileCheck --check-prefix=CHECK-FLOATABIHARD %s34// CHECK-FLOATABIHARD: error: unsupported option '-mfloat-abi=hard'35//36// check invalid -mfloat-abi37// RUN: not %clang -c %s -### -o %t.o 2>&1 \38// RUN: -target s390x-linux-gnu -mfloat-abi=x \39// RUN: | FileCheck --check-prefix=CHECK-ERRMSG %s40// CHECK-ERRMSG: error: unsupported option '-mfloat-abi=x'41 42int foo(void) {43 return 0;44}45 46