aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/const-init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/const-init.cpp')
-rw-r--r--test/CodeGenCXX/const-init.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenCXX/const-init.cpp b/test/CodeGenCXX/const-init.cpp
index 9cfce7ace86b..a8c6f304980b 100644
--- a/test/CodeGenCXX/const-init.cpp
+++ b/test/CodeGenCXX/const-init.cpp
@@ -24,3 +24,15 @@ public:
// CHECK: @_ZN6PR55812g0E = global %1 { i32 1 }
C g0 = { C::e1 };
}
+
+namespace test2 {
+ struct A {
+ static const double d = 1.0;
+ static const float f = d / 2;
+ };
+
+ // CHECK: @_ZN5test22t0E = global double {{1\.0+e\+0+}}, align 8
+ // CHECK: @_ZN5test22t1E = global [2 x double] [double {{1\.0+e\+0+}}, double {{5\.0+e-0*}}1], align 16
+ double t0 = A::d;
+ double t1[] = { A::d, A::f };
+}