aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/g++.dg/pch/pr98343.C6
-rw-r--r--gcc/testsuite/g++.dg/pch/pr98343.Hs18
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/pch/pr98343.C b/gcc/testsuite/g++.dg/pch/pr98343.C
new file mode 100644
index 0000000..095a4f1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pch/pr98343.C
@@ -0,0 +1,6 @@
+// PR c++/98343
+// { dg-options "-std=c++2a" }
+
+#include "pr98343.H"
+
+const void *ptr2 = __builtin_source_location ();
diff --git a/gcc/testsuite/g++.dg/pch/pr98343.Hs b/gcc/testsuite/g++.dg/pch/pr98343.Hs
new file mode 100644
index 0000000..33c8542
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pch/pr98343.Hs
@@ -0,0 +1,18 @@
+// PR c++/98343
+// { dg-options "-std=c++2a" }
+
+namespace std
+{
+ struct source_location
+ {
+ struct __impl
+ {
+ const char* _M_file_name;
+ const char* _M_function_name;
+ unsigned _M_line;
+ unsigned _M_column;
+ };
+ const __impl* _M_impl;
+ };
+}
+const void *ptr = __builtin_source_location ();