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