Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Driver / ps4ps5base.c
blob294283d0bdcf54dc246364bfbe6a067a35c07b82
1 // Test that the driver always emits -fno-use-init-array on the PS4/PS5 targets
2 // since their ABI does not support the .init_array section.
4 // RUN: %clang -c %s -target x86_64-scei-ps4 -### 2>&1 \
5 // RUN: | FileCheck %s
6 // RUN: %clang -c %s -target x86_64-sie-ps5 -### 2>&1 \
7 // RUN: | FileCheck %s
8 // RUN: %clang -c %s -target x86_64-scei-ps4 -fno-use-init-array -### 2>&1 \
9 // RUN: | FileCheck %s
10 // RUN: %clang -c %s -target x86_64-sie-ps5 -fno-use-init-array -### 2>&1 \
11 // RUN: | FileCheck %s
12 // RUN: not %clang -c %s --target=x86_64-scei-ps4 -fuse-init-array -### 2>&1 \
13 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
14 // RUN: not %clang -c %s --target=x86_64-sie-ps5 -fuse-init-array -### 2>&1 \
15 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
17 // CHECK: "-fno-use-init-array"
18 // CHECK-NOT: "-fuse-init-array"
20 // CHECK-ERROR: unsupported option '-fuse-init-array' for target 'x86_64-{{(scei|sie)}}-ps{{[45]}}'