https://gcc.gnu.org/g:d76e9dd80bf6c80623c09cbe7583f0f046ed3e76

commit r17-4963-gd76e9dd80bf6c80623c09cbe7583f0f046ed3e76
Author: Jason Merrill <[email protected]>
Date:   Wed Oct 7 10:42:21 2026 -0400

    c++: add testcase for PR122774
    
    This was fixed by the pushdecl hunk of r17-4959 (PR99000).
    
            PR c++/122774
    
    gcc/testsuite/ChangeLog:
    
            * g++.dg/modules/gmf-7_a.C: New test.
            * g++.dg/modules/gmf-7_b.C: New test.

Diff:
---
 gcc/testsuite/g++.dg/modules/gmf-7_a.C | 5 +++++
 gcc/testsuite/g++.dg/modules/gmf-7_b.C | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/gcc/testsuite/g++.dg/modules/gmf-7_a.C 
b/gcc/testsuite/g++.dg/modules/gmf-7_a.C
new file mode 100644
index 000000000000..21db8a445946
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/gmf-7_a.C
@@ -0,0 +1,5 @@
+// PR c++/122774
+// { dg-additional-options "-fmodules" }
+
+export module M;
+export extern "C" int scanf(const char *, ...);
diff --git a/gcc/testsuite/g++.dg/modules/gmf-7_b.C 
b/gcc/testsuite/g++.dg/modules/gmf-7_b.C
new file mode 100644
index 000000000000..18f79a42b767
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/gmf-7_b.C
@@ -0,0 +1,5 @@
+// { dg-additional-options "-fmodules" }
+import M;
+extern "C" int scanf(const char *, ...);
+int scanf(const char *, ...);
+using ::scanf;

Reply via email to