Debian Codegraph @

gcc/testsuite/g++.dg/modules/global-2_a.C

raw
1 // { dg-module-do run }
2 // { dg-additional-options "-fmodules-ts -fdump-lang-module-graph" }
3 module;
4 #include <stdio.h>
5 #include <stdarg.h>
6 export module logger;
7 // { dg-module-cmi logger }
8
9 export void Log (char const *fmt, ...)
10 {
11 va_list args;
12 va_start (args, fmt);
13 printf ("Logging:");
14 vprintf (fmt, args);
15 printf ("\n");
16 va_end (args);
17 }
18
19 // { dg-final { scan-lang-dump {Dependencies of decl function_decl:'::Log'} module } }
20 // not reachable (body not inline)
21 // { dg-final { scan-lang-dump-not {Reachable GMF '::printf[^\n']*' added} module } }
22