1*8bcb0737SPetr Hosek // REQUIRES: x86-registered-target
2*8bcb0737SPetr Hosek
3*8bcb0737SPetr Hosek // RUN: %clang_cc1 -triple x86_64-pc-linux -S -o - < %s | FileCheck %s
4*8bcb0737SPetr Hosek // RUN: %clang_cc1 -triple x86_64-pc-linux -S -fseparate-named-sections -o - < %s | FileCheck %s --check-prefix=SEPARATE
5*8bcb0737SPetr Hosek
f(void)6*8bcb0737SPetr Hosek __attribute__((section("custom_text"))) void f(void) {}
g(void)7*8bcb0737SPetr Hosek __attribute__((section("custom_text"))) void g(void) {}
8*8bcb0737SPetr Hosek
9*8bcb0737SPetr Hosek // CHECK: .section custom_text,"ax",@progbits{{$}}
10*8bcb0737SPetr Hosek // CHECK: f:
11*8bcb0737SPetr Hosek // CHECK: g:
12*8bcb0737SPetr Hosek
13*8bcb0737SPetr Hosek // SEPARATE: .section custom_text,"ax",@progbits,unique,1{{$}}
14*8bcb0737SPetr Hosek // SEPARATE: f:
15*8bcb0737SPetr Hosek // SEPARATE: .section custom_text,"ax",@progbits,unique,2{{$}}
16*8bcb0737SPetr Hosek // SEPARATE: g:
17*8bcb0737SPetr Hosek
18*8bcb0737SPetr Hosek __attribute__((section("custom_data"))) int i = 0;
19*8bcb0737SPetr Hosek __attribute__((section("custom_data"))) int j = 0;
20*8bcb0737SPetr Hosek
21*8bcb0737SPetr Hosek // CHECK: .section custom_data,"aw",@progbits{{$}}
22*8bcb0737SPetr Hosek // CHECK: i:
23*8bcb0737SPetr Hosek // CHECK: j:
24*8bcb0737SPetr Hosek
25*8bcb0737SPetr Hosek // SEPARATE: .section custom_data,"aw",@progbits,unique,3{{$}}
26*8bcb0737SPetr Hosek // SEPARATE: i:
27*8bcb0737SPetr Hosek // SEPARATE: .section custom_data,"aw",@progbits,unique,4{{$}}
28*8bcb0737SPetr Hosek // SEPARATE: j:
29