summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/new-operator-phi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/new-operator-phi.cpp')
-rw-r--r--clang/test/CodeGenCXX/new-operator-phi.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/new-operator-phi.cpp b/clang/test/CodeGenCXX/new-operator-phi.cpp
new file mode 100644
index 0000000..49859ac
--- /dev/null
+++ b/clang/test/CodeGenCXX/new-operator-phi.cpp
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -emit-llvm-only -verify %s
+// PR5454
+#include <stddef.h>
+
+struct X {static void * operator new(size_t size) throw(); X(int); };
+int a(), b();
+void b(int x)
+{
+ new X(x ? a() : b());
+}
+