1 // REQUIRES: powerpc-registered-target
2 // RUN: %clang_cc1 -triple=powerpc-ibm-aix-xcoff -mxcoff-roptr -fdata-sections \
3 // RUN: -S <%s | FileCheck %s --check-prefix=CHECK32
4 // RUN: %clang_cc1 -triple=powerpc64-ibm-aix-xcoff -mxcoff-roptr -fdata-sections \
5 // RUN: -S <%s | FileCheck %s --check-prefix=CHECK64
6 // RUN: not %clang_cc1 -triple=powerpc-ibm-aix-xcoff -mxcoff-roptr \
7 // RUN: -S <%s 2>&1 | FileCheck %s --check-prefix=DATA_SECTION_ERR
8 // RUN: not %clang_cc1 -triple=powerpc64-ibm-aix-xcoff -mxcoff-roptr \
9 // RUN: -S <%s 2>&1 | FileCheck %s --check-prefix=DATA_SECTION_ERR
10 // RUN: not %clang_cc1 -triple=powerpc64le-unknown-linux-gnu -mxcoff-roptr \
11 // RUN: %s 2>&1 | FileCheck %s --check-prefix=TARGET_ROPTR_ERR
14 char* const c1_ptr
= &c1
;
15 // CHECK32: .csect c1_ptr[RO],2
16 // CHECK32-NEXT: .globl c1_ptr[RO]
17 // CHECK32-NEXT: .align 2
18 // CHECK32-NEXT: .vbyte 4, c1[RW]
20 // CHECK64: .csect c1_ptr[RO],3
21 // CHECK64-NEXT: .globl c1_ptr[RO]
22 // CHECK64-NEXT: .align 3
23 // CHECK64-NEXT: .vbyte 8, c1[RW]
25 // DATA_SECTION_ERR: error: -mxcoff-roptr is supported only with -fdata-sections
26 // TARGET_ROPTR_ERR: error: unsupported option '-mxcoff-roptr' for target 'powerpc64le-unknown-linux-gnu'