Daniel Dunbar | b401e07 | 2010-06-28 17:43:18 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -O3 -emit-llvm -o - %s | FileCheck %s |
Fariborz Jahanian | 7ef2565 | 2010-06-25 21:08:10 +0000 | [diff] [blame] | 2 | // PR7490 |
| 3 | |
Daniel Dunbar | b401e07 | 2010-06-28 17:43:18 +0000 | [diff] [blame] | 4 | // CHECK: define signext i8 @_Z2f0v |
| 5 | // CHECK: ret i8 0 |
| 6 | // CHECK: } |
| 7 | inline void* operator new[](unsigned long, void* __p) { return __p; } |
| 8 | static void f0_a(char *a) { |
| 9 | new (a) char[4](); |
| 10 | } |
| 11 | char f0() { |
| 12 | char a[4]; |
| 13 | f0_a(a); |
| 14 | return a[0] + a[1] + a[2] + a[3]; |
Fariborz Jahanian | 7ef2565 | 2010-06-25 21:08:10 +0000 | [diff] [blame] | 15 | } |