xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/DynArrayInit.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -O3 -emit-llvm -o - %s | FileCheck %s
2*f4a2713aSLionel Sambuc // PR7490
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc // CHECK-LABEL: define signext i8 @_Z2f0v
5*f4a2713aSLionel Sambuc // CHECK: ret i8 0
6*f4a2713aSLionel Sambuc // CHECK: }
operator new[](unsigned long,void * __p)7*f4a2713aSLionel Sambuc inline void* operator new[](unsigned long, void* __p)  { return __p; }
f0_a(char * a)8*f4a2713aSLionel Sambuc static void f0_a(char *a) {
9*f4a2713aSLionel Sambuc   new (a) char[4]();
10*f4a2713aSLionel Sambuc }
f0()11*f4a2713aSLionel Sambuc char f0() {
12*f4a2713aSLionel Sambuc   char a[4];
13*f4a2713aSLionel Sambuc   f0_a(a);
14*f4a2713aSLionel Sambuc   return a[0] + a[1] + a[2] + a[3];
15*f4a2713aSLionel Sambuc }
16