1 // RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-ibm-aix-xcoff -emit-llvm \
2 // RUN:     -fno-use-cxa-atexit < %s |\
3 // RUN:   FileCheck %s
4 // RUN: %clang_cc1 -no-opaque-pointers -triple powerpc64-ibm-aix-xcoff -emit-llvm \
5 // RUN:     -fno-use-cxa-atexit < %s | \
6 // RUN:   FileCheck %s
7 
8 // CHECK: @llvm.global_ctors = appending global [3 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* bitcast (i32 ()* @foo3 to void ()*), i8* null }, { i32, void ()*, i8* } { i32 180, void ()* bitcast (i32 ()* @foo2 to void ()*), i8* null }, { i32, void ()*, i8* } { i32 180, void ()* bitcast (i32 ()* @foo to void ()*), i8* null }]
9 
10 int foo(void) __attribute__((constructor(180)));
11 int foo2(void) __attribute__((constructor(180)));
12 int foo3(void) __attribute__((constructor(65535)));
13 
foo3(void)14 int foo3(void) {
15   return 3;
16 }
17 
foo2(void)18 int foo2(void) {
19   return 2;
20 }
21 
foo(void)22 int foo(void) {
23   return 1;
24 }
25