Tested x86_64-pc-linux-gnu, applying to trunk.
-- >8 --
We already compile this code.
DR 3110
gcc/testsuite/ChangeLog:
* g++.dg/DRs/dr3110.C: New test.
---
gcc/testsuite/g++.dg/DRs/dr3110.C | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 gcc/testsuite/g++.dg/DRs/dr3110.C
diff --git a/gcc/testsuite/g++.dg/DRs/dr3110.C
b/gcc/testsuite/g++.dg/DRs/dr3110.C
new file mode 100644
index 00000000000..933a9b27abc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/DRs/dr3110.C
@@ -0,0 +1,11 @@
+// DR 3110, Constexpr allocation for literal types
+// { dg-do compile { target c++20 } }
+
+#include <locale>
+#include <memory>
+
+static_assert([]{
+ auto a = std::allocator<std::locale>{};
+ a.deallocate(a.allocate(42), 42);
+ return true;
+}());
base-commit: 2953061a0e7c99b39812a809ffcb789e0808d74f
--
2.53.0