summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/warn-global-constructors.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/warn-global-constructors.cpp')
-rw-r--r--test/SemaCXX/warn-global-constructors.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-global-constructors.cpp b/test/SemaCXX/warn-global-constructors.cpp
index 90d8558..8568264 100644
--- a/test/SemaCXX/warn-global-constructors.cpp
+++ b/test/SemaCXX/warn-global-constructors.cpp
@@ -120,3 +120,9 @@ namespace pr19253 {
};
E e;
}
+
+namespace pr20420 {
+// No warning is expected. This used to crash.
+void *array_storage[1];
+const int &global_reference = *(int *)array_storage;
+}
OpenPOWER on IntegriCloud