1 // Check that -stack-protector doesn't get passed down to device-side
4 // REQUIRES: clang-driver
6 // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \
7 // RUN: -fstack-protector-all %s 2>&1 | \
10 // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \
11 // RUN: -fstack-protector-strong %s 2>&1 | \
14 // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \
15 // RUN: -fstack-protector %s 2>&1 | \
18 // CHECK-NOT: error: unsupported option '-fstack-protector
19 // CHECK-DAG: "-fcuda-is-device"
20 // CHECK-NOT: "-stack-protector"
21 // CHECK-NOT: "-stack-protector-buffer-size"
22 // CHECK-DAG: "-triple" "x86_64-unknown-linux-gnu"
23 // CHECK: "-stack-protector"