brintos

brintos / llvm-project-archived public Read only

0
0
Text · 731 B · 7cd72a3 Raw
25 lines · c
1// RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -emit-llvm \2// RUN:     -fno-use-cxa-atexit < %s |\3// RUN:   FileCheck %s4// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -emit-llvm \5// RUN:     -fno-use-cxa-atexit < %s | \6// RUN:   FileCheck %s7 8// CHECK: @llvm.global_ctors = appending global [3 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @foo3, ptr null }, { i32, ptr, ptr } { i32 180, ptr @foo2, ptr null }, { i32, ptr, ptr } { i32 180, ptr @foo, ptr null }]9 10int foo(void) __attribute__((constructor(180)));11int foo2(void) __attribute__((constructor(180)));12int foo3(void) __attribute__((constructor(65535)));13 14int foo3(void) {15  return 3;16}17 18int foo2(void) {19  return 2;20}21 22int foo(void) {23  return 1;24}25