testsuite: C++ module tests
This adds most of the modules tests. I do not include the tests that excercise system & C++ library header files. Those will be later. gcc/testsuite/ * g++.dg/modules/access-1_a.C: New.: New. * g++.dg/modules/access-1_b.C: New. * g++.dg/modules/access-1_c.C: New. * g++.dg/modules/adhoc-1_a.C: New. * g++.dg/modules/adhoc-1_b.C: New. * g++.dg/modules/adl-1_a.C: New. * g++.dg/modules/adl-1_b.C: New. * g++.dg/modules/adl-1_c.C: New. * g++.dg/modules/adl-2_a.C: New. * g++.dg/modules/adl-2_b.C: New. * g++.dg/modules/adl-2_c.C: New. * g++.dg/modules/adl-3_a.C: New. * g++.dg/modules/adl-3_b.C: New. * g++.dg/modules/adl-3_c.C: New. * g++.dg/modules/adl-4_a.C: New. * g++.dg/modules/adl-4_b.C: New. * g++.dg/modules/adl-5_a.c: New. * g++.dg/modules/adl-5_b.C: New. * g++.dg/modules/adl-5_c.C: New. * g++.dg/modules/adl-5_d.C: New. * g++.dg/modules/alias-1_a.H: New. * g++.dg/modules/alias-1_b.C: New. * g++.dg/modules/alias-1_c.C: New. * g++.dg/modules/alias-1_d.C: New. * g++.dg/modules/alias-1_e.C: New. * g++.dg/modules/alias-1_f.C: New. * g++.dg/modules/alias-2_a.H: New. * g++.dg/modules/alias-2_b.C: New. * g++.dg/modules/align-type-1_a.C: New. * g++.dg/modules/align-type-1_b.C: New. * g++.dg/modules/ambig-1_a.C: New. * g++.dg/modules/ambig-1_b.C: New. * g++.dg/modules/anon-1_a.C: New. * g++.dg/modules/anon-1_b.C: New. * g++.dg/modules/anon-1_c.C: New. * g++.dg/modules/anon-2.h: New. * g++.dg/modules/anon-2_a.H: New. * g++.dg/modules/anon-2_b.C: New. * g++.dg/modules/atom-decl-0_a.C: New. * g++.dg/modules/atom-decl-0_b.C: New. * g++.dg/modules/atom-decl-0_c.C: New. * g++.dg/modules/atom-decl-2.C: New. * g++.dg/modules/atom-decl-3.C: New. * g++.dg/modules/atom-pragma-1.C: New. * g++.dg/modules/atom-pragma-3.C: New. * g++.dg/modules/atom-preamble-1.C: New. * g++.dg/modules/atom-preamble-2_a.C: New. * g++.dg/modules/atom-preamble-2_b.C: New. * g++.dg/modules/atom-preamble-2_c.C: New. * g++.dg/modules/atom-preamble-2_d.C: New. * g++.dg/modules/atom-preamble-2_e.C: New. * g++.dg/modules/atom-preamble-2_f.C: New. * g++.dg/modules/atom-preamble-3.C: New. * g++.dg/modules/atom-preamble-4.C: New. * g++.dg/modules/auto-1.h: New. * g++.dg/modules/auto-1_a.H: New. * g++.dg/modules/auto-1_b.C: New. * g++.dg/modules/auto-2.h: New. * g++.dg/modules/auto-2_a.H: New. * g++.dg/modules/auto-2_b.C: New. * g++.dg/modules/bad-mapper-1.C: New. * g++.dg/modules/bad-mapper-2.C: New. * g++.dg/modules/bad-mapper-3.C: New. * g++.dg/modules/ben-1.map: New. * g++.dg/modules/ben-1_a.C: New. * g++.dg/modules/ben-1_b.C: New. * g++.dg/modules/bfield-1_a.C: New. * g++.dg/modules/bfield-1_b.C: New. * g++.dg/modules/bfield-2_a.C: New. * g++.dg/modules/bfield-2_b.C: New. * g++.dg/modules/bool-1.h: New. * g++.dg/modules/bool-1_a.H: New. * g++.dg/modules/bool-1_b.H: New. * g++.dg/modules/bool-1_c.C: New. * g++.dg/modules/bug-1_a.C: New. * g++.dg/modules/bug-1_b.C: New. * g++.dg/modules/builtin-1_a.C: New. * g++.dg/modules/builtin-1_b.C: New. * g++.dg/modules/builtin-2.C: New. * g++.dg/modules/builtin-3_b.C: New. * g++.dg/modules/builtin-4_a.H: New. * g++.dg/modules/builtin-4_b.C: New. * g++.dg/modules/builtin-5_a.H: New. * g++.dg/modules/builtin-5_b.C: New. * g++.dg/modules/builtin-6_a.H: New. * g++.dg/modules/builtin-6_b.C: New. * g++.dg/modules/builtin-7_a.H: New. * g++.dg/modules/builtin-7_b.C: New. * g++.dg/modules/by-name-1.C: New. * g++.dg/modules/cexpr-1_a.C: New. * g++.dg/modules/cexpr-1_b.C: New. * g++.dg/modules/cexpr-2_a.C: New. * g++.dg/modules/cexpr-2_b.C: New. * g++.dg/modules/circ-1_a.C: New. * g++.dg/modules/circ-1_b.C: New. * g++.dg/modules/circ-1_c.C: New. * g++.dg/modules/circ-1_d.C: New. * g++.dg/modules/class-1_a.C: New. * g++.dg/modules/class-1_b.C: New. * g++.dg/modules/class-1_c.C: New. * g++.dg/modules/class-2_a.C: New. * g++.dg/modules/class-2_b.C: New. * g++.dg/modules/class-3_a.C: New. * g++.dg/modules/class-3_b.C: New. * g++.dg/modules/class-3_c.C: New. * g++.dg/modules/class-3_d.C: New. * g++.dg/modules/class-4_a.C: New. * g++.dg/modules/class-4_b.C: New. * g++.dg/modules/class-5_a.C: New. * g++.dg/modules/class-5_b.C: New. * g++.dg/modules/class-5_c.C: New. * g++.dg/modules/class-6_a.C: New. * g++.dg/modules/class-6_b.C: New. * g++.dg/modules/class-6_c.C: New. * g++.dg/modules/class-7_a.C: New. * g++.dg/modules/class-7_b.C: New. * g++.dg/modules/class-7_c.C: New. * g++.dg/modules/class-8_a.C: New. * g++.dg/modules/class-8_b.C: New. * g++.dg/modules/clone-1_a.C: New. * g++.dg/modules/clone-1_b.C: New. * g++.dg/modules/concept-1_a.C: New. * g++.dg/modules/concept-1_b.C: New. * g++.dg/modules/concept-2_a.C: New. * g++.dg/modules/concept-2_b.C: New. * g++.dg/modules/concept-3_a.C: New. * g++.dg/modules/concept-3_b.C: New. * g++.dg/modules/concept-4.H: New. * g++.dg/modules/concept-5.h: New. * g++.dg/modules/concept-5_a.H: New. * g++.dg/modules/concept-5_b.C: New. * g++.dg/modules/concept-6.h: New. * g++.dg/modules/concept-6_a.H: New. * g++.dg/modules/concept-6_b.C: New. * g++.dg/modules/constrained-partial-1_a.C: New. * g++.dg/modules/constrained-partial-1_b.C: New. * g++.dg/modules/convop-1_a.C: New. * g++.dg/modules/convop-1_b.C: New. * g++.dg/modules/cpp-1.C: New. * g++.dg/modules/cpp-2_a.H: New. * g++.dg/modules/cpp-2_b.H: New. * g++.dg/modules/cpp-2_c.C: New. * g++.dg/modules/cpp-3.C: New. * g++.dg/modules/cpp-4.C: New. * g++.dg/modules/cpp-4.h: New. * g++.dg/modules/cpp-5_a.H: New. * g++.dg/modules/cpp-5_b.C: New. * g++.dg/modules/cpp-5_c.C: New. * g++.dg/modules/cpp-6_a.H: New. * g++.dg/modules/cpp-6_b.H: New. * g++.dg/modules/cpp-6_c.C: New. * g++.dg/modules/debug-1_a.C: New. * g++.dg/modules/debug-1_b.C: New. * g++.dg/modules/decomp-1_a.C: New. * g++.dg/modules/decomp-1_b.C: New. * g++.dg/modules/deferred-1.h: New. * g++.dg/modules/deferred-1_a.H: New. * g++.dg/modules/deferred-1_b.C: New. * g++.dg/modules/dep-1_a.C: New. * g++.dg/modules/dep-1_b.C: New. * g++.dg/modules/dep-2.C: New. * g++.dg/modules/dep-3.C: New. * g++.dg/modules/dir-only-1.C: New. * g++.dg/modules/dir-only-2_a.H: New. * g++.dg/modules/dir-only-2_b.C: New. * g++.dg/modules/dir-only-3.C: New. * g++.dg/modules/dir-only-4.C: New. * g++.dg/modules/dir-recovery.C: New. * g++.dg/modules/enum-1_a.C: New. * g++.dg/modules/enum-1_b.C: New. * g++.dg/modules/enum-2_a.C: New. * g++.dg/modules/enum-2_b.C: New. * g++.dg/modules/enum-3_a.C: New. * g++.dg/modules/enum-3_b.C: New. * g++.dg/modules/enum-4_a.C: New. * g++.dg/modules/enum-4_b.C: New. * g++.dg/modules/enum-5_a.H: New. * g++.dg/modules/enum-5_b.C: New. * g++.dg/modules/enum-6_a.H: New. * g++.dg/modules/enum-6_b.C: New. * g++.dg/modules/enum-7.C: New. * g++.dg/modules/enum-8_a.H: New. * g++.dg/modules/enum-8_b.H: New. * g++.dg/modules/enum-8_c.C: New. * g++.dg/modules/enum-8_d.C: New. * g++.dg/modules/enum-bad-1_a.H: New. * g++.dg/modules/enum-bad-1_b.C: New. * g++.dg/modules/err-1_a.C: New. * g++.dg/modules/err-1_b.C: New. * g++.dg/modules/err-1_c.C: New. * g++.dg/modules/err-1_d.C: New. * g++.dg/modules/except-1.C: New. * g++.dg/modules/except-2.h: New. * g++.dg/modules/except-2_a.H: New. * g++.dg/modules/except-2_b.C: New. * g++.dg/modules/except-3.h: New. * g++.dg/modules/except-3_a.H: New. * g++.dg/modules/except-3_b.C: New. * g++.dg/modules/exp-xlate-1_a.H: New. * g++.dg/modules/exp-xlate-1_b.C: New. * g++.dg/modules/export-1.C: New. * g++.dg/modules/extern-tpl-1_a.H: New. * g++.dg/modules/extern-tpl-1_b.C: New. * g++.dg/modules/extern-tpl-1_c.C: New. * g++.dg/modules/extern-tpl-2_a.H: New. * g++.dg/modules/extern-tpl-2_b.H: New. * g++.dg/modules/extern-tpl-2_c.C: New. * g++.dg/modules/extern-tpl-2_d.C: New. * g++.dg/modules/flag-1_a.C: New. * g++.dg/modules/flag-1_b.C: New. * g++.dg/modules/fn-inline-1_a.C: New. * g++.dg/modules/fn-inline-1_b.C: New. * g++.dg/modules/fn-inline-1_c.C: New. * g++.dg/modules/freeze-1_a.C: New. * g++.dg/modules/freeze-1_b.C: New. * g++.dg/modules/freeze-1_c.C: New. * g++.dg/modules/freeze-1_d.C: New. * g++.dg/modules/friend-1_a.C: New. * g++.dg/modules/friend-1_b.C: New. * g++.dg/modules/friend-1_c.C: New. * g++.dg/modules/friend-2_a.C: New. * g++.dg/modules/friend-2_b.C: New. * g++.dg/modules/friend-3.C: New. * g++.dg/modules/friend-4_a.C: New. * g++.dg/modules/friend-4_b.C: New. * g++.dg/modules/friend-5_a.C: New. * g++.dg/modules/friend-5_b.C: New. * g++.dg/modules/gc-1_a.C: New. * g++.dg/modules/gc-1_b.C: New. * g++.dg/modules/gc-1_c.C: New. * g++.dg/modules/gc-1_d.C: New. * g++.dg/modules/gc-2.map: New. * g++.dg/modules/gc-2_a.C: New. * g++.dg/modules/global-1_a.C: New. * g++.dg/modules/global-1_b.C: New. * g++.dg/modules/gmf-1_a.C: New. * g++.dg/modules/gmf-1_b.C: New. * g++.dg/modules/gmf-2_a.H: New. * g++.dg/modules/gmf-2_b.C: New. * g++.dg/modules/gmf-2_c.C: New. * g++.dg/modules/gmf-2_d.C: New. * g++.dg/modules/gvar_a.C: New. * g++.dg/modules/gvar_b.C: New. * g++.dg/modules/hdr-1_a.H: New. * g++.dg/modules/hdr-1_b.H: New. * g++.dg/modules/hdr-1_c.C: New. * g++.dg/modules/hdr-init-1_a.H: New. * g++.dg/modules/hdr-init-1_b.H: New. * g++.dg/modules/hdr-init-1_c.C: New. * g++.dg/modules/horcrux-1_a.C: New. * g++.dg/modules/horcrux-1_b.C: New. * g++.dg/modules/ice-1.C: New. * g++.dg/modules/imp-inline-1_a.C: New. * g++.dg/modules/imp-inline-1_b.C: New. * g++.dg/modules/imp-member-1_a.C: New. * g++.dg/modules/imp-member-1_b.C: New. * g++.dg/modules/imp-member-1_c.C: New. * g++.dg/modules/imp-member-1_d.C: New. * g++.dg/modules/imp-member-1_e.C: New. * g++.dg/modules/imp-member-2_a.C: New. * g++.dg/modules/imp-member-2_b.C: New. * g++.dg/modules/imp-member-2_c.C: New. * g++.dg/modules/imp-member-3.H: New. * g++.dg/modules/import-1_a.C: New. * g++.dg/modules/import-1_b.C: New. * g++.dg/modules/import-1_c.C: New. * g++.dg/modules/import-1_d.C: New. * g++.dg/modules/import-1_e.C: New. * g++.dg/modules/import-1_f.C: New. * g++.dg/modules/import-1_g.C: New. * g++.dg/modules/import-2.C: New. * g++.dg/modules/inc-xlate-1.map: New. * g++.dg/modules/inc-xlate-1_a.H: New. * g++.dg/modules/inc-xlate-1_b.H: New. * g++.dg/modules/inc-xlate-1_c.C: New. * g++.dg/modules/inc-xlate-1_e.C: New. * g++.dg/modules/indirect-1_a.C: New. * g++.dg/modules/indirect-1_b.C: New. * g++.dg/modules/indirect-1_c.C: New. * g++.dg/modules/indirect-2_a.C: New. * g++.dg/modules/indirect-2_b.C: New. * g++.dg/modules/indirect-2_c.C: New. * g++.dg/modules/indirect-3_a.C: New. * g++.dg/modules/indirect-3_b.C: New. * g++.dg/modules/indirect-3_c.C: New. * g++.dg/modules/indirect-4_a.C: New. * g++.dg/modules/indirect-4_b.C: New. * g++.dg/modules/indirect-4_c.C: New. * g++.dg/modules/inext-1.H: New. * g++.dg/modules/inh-tmpl-ctor-1.h: New. * g++.dg/modules/inh-tmpl-ctor-1_a.H: New. * g++.dg/modules/inh-tmpl-ctor-1_b.C: New. * g++.dg/modules/init-1_a.C: New. * g++.dg/modules/init-1_b.C: New. * g++.dg/modules/init-2_a.C: New. * g++.dg/modules/init-2_b.C: New. * g++.dg/modules/init-2_c.C: New. * g++.dg/modules/inst-1_a.C: New. * g++.dg/modules/inst-1_b.C: New. * g++.dg/modules/inst-2_a.C: New. * g++.dg/modules/inst-2_b.C: New. * g++.dg/modules/inst-3_a.C: New. * g++.dg/modules/inst-3_b.C: New. * g++.dg/modules/inst-4_a.C: New. * g++.dg/modules/inst-4_b.C: New. * g++.dg/modules/inst-5_a.H: New. * g++.dg/modules/inst-5_b.C: New. * g++.dg/modules/internal-1.C: New. * g++.dg/modules/internal-2_a.H: New. * g++.dg/modules/internal-2_b.H: New. * g++.dg/modules/internal-2_c.C: New. * g++.dg/modules/isalnum.H: New. * g++.dg/modules/keyword-1_a.C: New. * g++.dg/modules/keyword-1_b.C: New. * g++.dg/modules/lambda-1_a.C: New. * g++.dg/modules/lambda-1_b.C: New. * g++.dg/modules/lambda-2.h: New. * g++.dg/modules/lambda-2_a.H: New. * g++.dg/modules/lambda-2_b.C: New. * g++.dg/modules/lambda-2_c.C: New. * g++.dg/modules/lambda-3.h: New. * g++.dg/modules/lambda-3_a.H: New. * g++.dg/modules/lambda-3_b.C: New. * g++.dg/modules/lambda-3_c.C: New. * g++.dg/modules/lambda-4.h: New. * g++.dg/modules/lambda-4_a.H: New. * g++.dg/modules/lambda-4_b.C: New. * g++.dg/modules/lang-1_a.H: New. * g++.dg/modules/lang-1_b.C: New. * g++.dg/modules/lang-1_c.C: New. * g++.dg/modules/lang-2_a.C: New. * g++.dg/modules/lang-2_b.C: New. * g++.dg/modules/late-ret-1.H: New. * g++.dg/modules/late-ret-2_a.H: New. * g++.dg/modules/late-ret-2_b.H: New. * g++.dg/modules/late-ret-2_c.C: New. * g++.dg/modules/late-ret-3_a.H: New. * g++.dg/modules/late-ret-3_b.H: New. * g++.dg/modules/late-ret-3_c.C: New. * g++.dg/modules/lazy-1_a.C: New. * g++.dg/modules/lazy-1_b.C: New. * g++.dg/modules/leg-merge-1_a.H: New. * g++.dg/modules/leg-merge-1_b.H: New. * g++.dg/modules/leg-merge-1_c.C: New. * g++.dg/modules/leg-merge-1_d.C: New. * g++.dg/modules/leg-merge-2_a.H: New. * g++.dg/modules/leg-merge-2_b.H: New. * g++.dg/modules/leg-merge-2_c.C: New. * g++.dg/modules/leg-merge-3_a.H: New. * g++.dg/modules/leg-merge-3_b.H: New. * g++.dg/modules/leg-merge-3_c.C: New. * g++.dg/modules/leg-merge-3_d.C: New. * g++.dg/modules/leg-merge-4_a.H: New. * g++.dg/modules/leg-merge-4_b.H: New. * g++.dg/modules/leg-merge-4_c.C: New. * g++.dg/modules/leg-merge-5_a.H: New. * g++.dg/modules/leg-merge-5_b.H: New. * g++.dg/modules/leg-merge-5_c.C: New. * g++.dg/modules/leg-merge-6_a.H: New. * g++.dg/modules/leg-merge-6_b.H: New. * g++.dg/modules/leg-merge-6_c.C: New. * g++.dg/modules/leg-merge-7_a.H: New. * g++.dg/modules/leg-merge-7_b.H: New. * g++.dg/modules/leg-merge-7_c.C: New. * g++.dg/modules/leg-merge-8_a.H: New. * g++.dg/modules/leg-merge-8_b.H: New. * g++.dg/modules/leg-merge-8_c.C: New. * g++.dg/modules/leg-merge-9_a.H: New. * g++.dg/modules/leg-merge-9_b.H: New. * g++.dg/modules/leg-merge-9_c.C: New. * g++.dg/modules/legacy-1_a.H: New. * g++.dg/modules/legacy-1_b.C: New. * g++.dg/modules/legacy-1_c.C: New. * g++.dg/modules/legacy-2.h: New. * g++.dg/modules/legacy-2.map: New. * g++.dg/modules/legacy-2_a.H: New. * g++.dg/modules/legacy-2_b.H: New. * g++.dg/modules/legacy-2_c.C: New. * g++.dg/modules/legacy-2_d.C: New. * g++.dg/modules/legacy-3.h: New. * g++.dg/modules/legacy-3_a.H: New. * g++.dg/modules/legacy-3_b.H: New. * g++.dg/modules/legacy-3_c.H: New. * g++.dg/modules/legacy-6.map: New. * g++.dg/modules/legacy-6_a.H: New. * g++.dg/modules/legacy-6_b.H: New. * g++.dg/modules/legacy-6_c.C: New. * g++.dg/modules/legacy-6_d.C: New. * g++.dg/modules/legacy-6_e.C: New. * g++.dg/modules/legacy-6_f.C: New. * g++.dg/modules/legacy-7_a.H: New. * g++.dg/modules/legacy-7_b.C: New. * g++.dg/modules/legacy-8_a.H: New. * g++.dg/modules/legacy-8_b.H: New. * g++.dg/modules/legacy-8_c.C: New. * g++.dg/modules/legacy-8_d.C: New. * g++.dg/modules/legacy-8_e.C: New. * g++.dg/modules/libfn-1_a.C: New. * g++.dg/modules/libfn-1_b.C: New. * g++.dg/modules/literals-1_a.C: New. * g++.dg/modules/literals-1_b.C: New. * g++.dg/modules/loc-1_a.C: New. * g++.dg/modules/loc-1_b.C: New. * g++.dg/modules/loc-1_c.C: New. * g++.dg/modules/loc-2_a.C: New. * g++.dg/modules/loc-2_b.C: New. * g++.dg/modules/loc-2_c.C: New. * g++.dg/modules/loc-2_d.C: New. * g++.dg/modules/loc-2_e.C: New. * g++.dg/modules/loc-2_f.C: New. * g++.dg/modules/loc-wrapper-1.h: New. * g++.dg/modules/loc-wrapper-1_a.H: New. * g++.dg/modules/loc-wrapper-1_b.C: New. * g++.dg/modules/local-1_a.C: New. * g++.dg/modules/local-1_b.C: New. * g++.dg/modules/local-extern-1.C: New. * g++.dg/modules/local-extern-2.H: New. * g++.dg/modules/local-struct-1_a.C: New. * g++.dg/modules/local-struct-1_b.C: New. * g++.dg/modules/macloc-1_a.C: New. * g++.dg/modules/macloc-1_b.C: New. * g++.dg/modules/macloc-1_c.C: New. * g++.dg/modules/macloc-1_d.C: New. * g++.dg/modules/macloc-2_a.H: New. * g++.dg/modules/macloc-2_b.C: New. * g++.dg/modules/macro-1_a.H: New. * g++.dg/modules/macro-1_b.C: New. * g++.dg/modules/macro-2_a.H: New. * g++.dg/modules/macro-2_b.H: New. * g++.dg/modules/macro-2_c.H: New. * g++.dg/modules/macro-2_d.C: New. * g++.dg/modules/macro-3_a.H: New. * g++.dg/modules/macro-3_b.H: New. * g++.dg/modules/macro-3_c.C: New. * g++.dg/modules/macro-4_a.H: New. * g++.dg/modules/macro-4_b.H: New. * g++.dg/modules/macro-4_c.H: New. * g++.dg/modules/macro-4_d.C: New. * g++.dg/modules/macro-4_e.C: New. * g++.dg/modules/macro-4_f.C: New. * g++.dg/modules/macro-4_g.C: New. * g++.dg/modules/macro-5_a.H: New. * g++.dg/modules/macro-5_b.H: New. * g++.dg/modules/macro-5_c.C: New. * g++.dg/modules/macro-6_a.H: New. * g++.dg/modules/macro-6_b.C: New. * g++.dg/modules/macro-6_c.C: New. * g++.dg/modules/macro-7_a.C: New. * g++.dg/modules/macro-7_b.C: New. * g++.dg/modules/macro-7_c.C: New. * g++.dg/modules/map-1.map: New. * g++.dg/modules/map-1_a.C: New. * g++.dg/modules/map-1_b.C: New. * g++.dg/modules/map-1_b.map: New. * g++.dg/modules/map-2.C: New. * g++.dg/modules/map-2.map: New. * g++.dg/modules/member-def-1_a.C: New. * g++.dg/modules/member-def-1_b.C: New. * g++.dg/modules/member-def-1_c.C: New. * g++.dg/modules/member-def-1_d.C: New. * g++.dg/modules/member-def-2_a.C: New. * g++.dg/modules/member-def-2_b.C: New. * g++.dg/modules/member-def-2_c.C: New. * g++.dg/modules/member-def-2_d.C: New. * g++.dg/modules/memref-1_a.C: New. * g++.dg/modules/memref-1_b.C: New. * g++.dg/modules/merge-10.h: New. * g++.dg/modules/merge-10_a.H: New. * g++.dg/modules/merge-10_b.C: New. * g++.dg/modules/merge-11.h: New. * g++.dg/modules/merge-11_a.H: New. * g++.dg/modules/merge-11_b.C: New. * g++.dg/modules/merge-12.h: New. * g++.dg/modules/merge-12_a.H: New. * g++.dg/modules/merge-12_b.C: New. * g++.dg/modules/merge-13.h: New. * g++.dg/modules/merge-13_a.H: New. * g++.dg/modules/merge-13_b.C: New. * g++.dg/modules/merge-14.h: New. * g++.dg/modules/merge-14_a.H: New. * g++.dg/modules/merge-14_b.C: New. * g++.dg/modules/merge-15.h: New. * g++.dg/modules/merge-15_a.H: New. * g++.dg/modules/merge-15_b.C: New. * g++.dg/modules/merge-1_a.C: New. * g++.dg/modules/merge-1_b.C: New. * g++.dg/modules/merge-2_a.H: New. * g++.dg/modules/merge-2_b.C: New. * g++.dg/modules/merge-3_a.H: New. * g++.dg/modules/merge-3_b.C: New. * g++.dg/modules/merge-4.h: New. * g++.dg/modules/merge-4_a.H: New. * g++.dg/modules/merge-4_b.C: New. * g++.dg/modules/merge-5.h: New. * g++.dg/modules/merge-5_a.H: New. * g++.dg/modules/merge-5_b.C: New. * g++.dg/modules/merge-6.h: New. * g++.dg/modules/merge-6_a.H: New. * g++.dg/modules/merge-6_b.C: New. * g++.dg/modules/merge-7.h: New. * g++.dg/modules/merge-7_a.H: New. * g++.dg/modules/merge-7_b.C: New. * g++.dg/modules/merge-8.h: New. * g++.dg/modules/merge-8_a.H: New. * g++.dg/modules/merge-8_b.C: New. * g++.dg/modules/merge-9.h: New. * g++.dg/modules/merge-9_a.H: New. * g++.dg/modules/merge-9_b.C: New. * g++.dg/modules/mod-exp-1_a.C: New. * g++.dg/modules/mod-exp-1_b.C: New. * g++.dg/modules/mod-imp-1_a.C: New. * g++.dg/modules/mod-imp-1_b.C: New. * g++.dg/modules/mod-imp-1_c.C: New. * g++.dg/modules/mod-imp-1_d.C: New. * g++.dg/modules/mod-impl-1_a.C: New. * g++.dg/modules/mod-impl-1_b.C: New. * g++.dg/modules/mod-impl-1_c.C: New. * g++.dg/modules/mod-impl-1_d.C: New. * g++.dg/modules/mod-indirect-1_a.C: New. * g++.dg/modules/mod-indirect-1_b.C: New. * g++.dg/modules/mod-indirect-1_c.C: New. * g++.dg/modules/mod-indirect-1_d.C: New. * g++.dg/modules/mod-indirect-1_e.C: New. * g++.dg/modules/mod-stamp-1_a.C: New. * g++.dg/modules/mod-stamp-1_b.C: New. * g++.dg/modules/mod-stamp-1_c.C: New. * g++.dg/modules/mod-stamp-1_d.C: New. * g++.dg/modules/mod-sym-1.C: New. * g++.dg/modules/mod-sym-2.C: New. * g++.dg/modules/mod-sym-3.C: New. * g++.dg/modules/mod-tpl-1_a.C: New. * g++.dg/modules/mod-tpl-1_b.C: New. * g++.dg/modules/mod-tpl-2_a.C: New. * g++.dg/modules/mod-tpl-2_b.C: New. * g++.dg/modules/mutual-friend.ii: New. * g++.dg/modules/namespace-1_a.C: New. * g++.dg/modules/namespace-1_b.C: New. * g++.dg/modules/namespace-1_c.C: New. * g++.dg/modules/namespace-2_a.C: New. * g++.dg/modules/namespace-2_b.C: New. * g++.dg/modules/namespace-3_a.C: New. * g++.dg/modules/namespace-3_b.C: New. * g++.dg/modules/namespace-4_a.C: New. * g++.dg/modules/namespace-4_b.C: New. * g++.dg/modules/namespace-4_c.C: New. * g++.dg/modules/nest-1_a.C: New. * g++.dg/modules/nest-1_b.C: New. * g++.dg/modules/nest-1_c.C: New. * g++.dg/modules/nested-1_a.C: New. * g++.dg/modules/nested-1_b.C: New. * g++.dg/modules/nested-1_c.C: New. * g++.dg/modules/nested-2_a.C: New. * g++.dg/modules/nested-2_b.C: New. * g++.dg/modules/nested-constr-1.h: New. * g++.dg/modules/nested-constr-1_a.H: New. * g++.dg/modules/nested-constr-1_b.C: New. * g++.dg/modules/nested-constr-2_a.C: New. * g++.dg/modules/nested-constr-2_b.C: New. * g++.dg/modules/nested-constr-2_c.C: New. * g++.dg/modules/nodes-1_a.C: New. * g++.dg/modules/nodes-1_b.C: New. * g++.dg/modules/noexcept-1.h: New. * g++.dg/modules/noexcept-1_a.H: New. * g++.dg/modules/noexcept-1_b.C: New. * g++.dg/modules/ns-alias-1_a.C: New. * g++.dg/modules/ns-alias-1_b.C: New. * g++.dg/modules/ns-alias-1_c.C: New. * g++.dg/modules/ns-dir-1_a.C: New. * g++.dg/modules/ns-dir-1_b.C: New. * g++.dg/modules/ns-dup-1_a.C: New. * g++.dg/modules/ns-dup-1_b.C: New. * g++.dg/modules/ns-imp-1_a.C: New. * g++.dg/modules/ns-imp-1_b.C: New. * g++.dg/modules/ns-imp-1_c.C: New. * g++.dg/modules/ns-part-1_a.C: New. * g++.dg/modules/ns-part-1_b.C: New. * g++.dg/modules/ns-part-1_c.C: New. * g++.dg/modules/nsdmi-1_a.C: New. * g++.dg/modules/nsdmi-1_b.C: New. * g++.dg/modules/nsdmi-2.C: New. * g++.dg/modules/omp-1_a.C: New. * g++.dg/modules/omp-1_b.C: New. * g++.dg/modules/omp-1_c.C: New. * g++.dg/modules/omp-2_a.C: New. * g++.dg/modules/omp-2_b.C: New. * g++.dg/modules/only-1.C: New. * g++.dg/modules/only-2.C: New. * g++.dg/modules/only-3.C: New. * g++.dg/modules/operator-1_a.C: New. * g++.dg/modules/operator-1_b.C: New. * g++.dg/modules/p0713-1.C: New. * g++.dg/modules/p0713-2.C: New. * g++.dg/modules/p0713-3.C: New. * g++.dg/modules/part-1_a.C: New. * g++.dg/modules/part-1_b.C: New. * g++.dg/modules/part-1_c.C: New. * g++.dg/modules/part-2_a.C: New. * g++.dg/modules/part-2_b.C: New. * g++.dg/modules/part-2_c.C: New. * g++.dg/modules/part-2_d.C: New. * g++.dg/modules/part-2_e.C: New. * g++.dg/modules/part-3_a.C: New. * g++.dg/modules/part-3_b.C: New. * g++.dg/modules/part-3_c.C: New. * g++.dg/modules/part-3_d.C: New. * g++.dg/modules/part-4_a.C: New. * g++.dg/modules/part-4_b.C: New. * g++.dg/modules/part-4_c.C: New. * g++.dg/modules/part-6_a.C: New. * g++.dg/modules/part-6_b.C: New. * g++.dg/modules/part-6_c.C: New. * g++.dg/modules/part-6_d.C: New. * g++.dg/modules/part-6_e.C: New. * g++.dg/modules/part-7_a.C: New. * g++.dg/modules/part-7_b.C: New. * g++.dg/modules/part-7_c.C: New. * g++.dg/modules/part-hdr-1_a.H: New. * g++.dg/modules/part-hdr-1_b.C: New. * g++.dg/modules/part-hdr-1_c.C: New. * g++.dg/modules/part-mac-1_a.H: New. * g++.dg/modules/part-mac-1_b.C: New. * g++.dg/modules/part-mac-1_c.C: New. * g++.dg/modules/partial-1.h: New. * g++.dg/modules/partial-1_a.H: New. * g++.dg/modules/partial-1_b.C: New. * g++.dg/modules/pmf-1.h: New. * g++.dg/modules/pmf-1_a.H: New. * g++.dg/modules/pmf-1_b.C: New. * g++.dg/modules/pmf-2.h: New. * g++.dg/modules/pmf-2_a.H: New. * g++.dg/modules/pmf-2_b.C: New. * g++.dg/modules/pmp-1_a.C: New. * g++.dg/modules/pmp-1_b.C: New. * g++.dg/modules/pmp-2.C: New. * g++.dg/modules/pmp-3.C: New. * g++.dg/modules/pragma-1_a.H: New. * g++.dg/modules/pragma-1_b.C: New. * g++.dg/modules/predef-1.C: New. * g++.dg/modules/predef-1.h: New. * g++.dg/modules/predef-2.h: New. * g++.dg/modules/predef-2_a.C: New. * g++.dg/modules/predef-2_b.C: New. * g++.dg/modules/preproc-1.C: New. * g++.dg/modules/preproc-2_a.H: New. * g++.dg/modules/preproc-2_b.C: New. * g++.dg/modules/printf-1_a.H: New. * g++.dg/modules/printf-1_b.C: New. * g++.dg/modules/reparent-1_a.C: New. * g++.dg/modules/reparent-1_b.C: New. * g++.dg/modules/reparent-1_c.C: New. * g++.dg/modules/scc-1.C: New. * g++.dg/modules/scc-2.C: New. * g++.dg/modules/shadow-1_a.C: New. * g++.dg/modules/shadow-1_b.C: New. * g++.dg/modules/stat-tpl-1_a.H: New. * g++.dg/modules/static-1_a.C: New. * g++.dg/modules/static-1_b.C: New. * g++.dg/modules/static-1_c.C: New. * g++.dg/modules/std-1_a.C: New. * g++.dg/modules/std-1_b.C: New. * g++.dg/modules/stdns_a.C: New. * g++.dg/modules/stdns_b.C: New. * g++.dg/modules/sv-1.h: New. * g++.dg/modules/sv-1_a.C: New. * g++.dg/modules/sv-1_b.C: New. * g++.dg/modules/sym-subst-1.C: New. * g++.dg/modules/sym-subst-2_a.C: New. * g++.dg/modules/sym-subst-2_b.C: New. * g++.dg/modules/sym-subst-3_a.C: New. * g++.dg/modules/sym-subst-3_b.C: New. * g++.dg/modules/sym-subst-4.C: New. * g++.dg/modules/sym-subst-5.C: New. * g++.dg/modules/sym-subst-6.C: New. * g++.dg/modules/sys/alias-2_a.H: New. * g++.dg/modules/sys/inext-1.H: New. * g++.dg/modules/tdef-1_a.C: New. * g++.dg/modules/tdef-1_b.C: New. * g++.dg/modules/tdef-2_a.C: New. * g++.dg/modules/tdef-2_b.C: New. * g++.dg/modules/tdef-2_c.C: New. * g++.dg/modules/tdef-3_a.C: New. * g++.dg/modules/tdef-3_b.C: New. * g++.dg/modules/tdef-3_c.C: New. * g++.dg/modules/tdef-4_a.C: New. * g++.dg/modules/tdef-4_b.C: New. * g++.dg/modules/tdef-4_c.C: New. * g++.dg/modules/tdef-5_a.C: New. * g++.dg/modules/tdef-5_b.C: New. * g++.dg/modules/tdef-6_a.H: New. * g++.dg/modules/tdef-6_b.C: New. * g++.dg/modules/tdef-7.h: New. * g++.dg/modules/tdef-7_a.H: New. * g++.dg/modules/tdef-7_b.C: New. * g++.dg/modules/tdef-8_a.C: New. * g++.dg/modules/tdef-8_b.C: New. * g++.dg/modules/tdef-inst-1.h: New. * g++.dg/modules/tdef-inst-1_a.C: New. * g++.dg/modules/tdef-inst-1_b.C: New. * g++.dg/modules/thunk-1_a.C: New. * g++.dg/modules/thunk-1_b.C: New. * g++.dg/modules/tmpl-part-req-1.h: New. * g++.dg/modules/tmpl-part-req-1_a.H: New. * g++.dg/modules/tmpl-part-req-1_b.C: New. * g++.dg/modules/tmpl-part-req-2.h: New. * g++.dg/modules/tmpl-part-req-2_a.H: New. * g++.dg/modules/tmpl-part-req-2_b.C: New. * g++.dg/modules/token-1.C: New. * g++.dg/modules/token-2_a.C: New. * g++.dg/modules/token-2_b.C: New. * g++.dg/modules/token-3.C: New. * g++.dg/modules/token-4.C: New. * g++.dg/modules/token-5.C: New. * g++.dg/modules/tpl-alias-1.h: New. * g++.dg/modules/tpl-alias-1_a.H: New. * g++.dg/modules/tpl-alias-1_b.C: New. * g++.dg/modules/tpl-ary-1.h: New. * g++.dg/modules/tpl-ary-1_a.H: New. * g++.dg/modules/tpl-ary-1_b.C: New. * g++.dg/modules/tpl-extern-fn-1_a.H: New. * g++.dg/modules/tpl-extern-fn-1_b.C: New. * g++.dg/modules/tpl-extern-var-1_a.H: New. * g++.dg/modules/tpl-extern-var-1_b.C: New. * g++.dg/modules/tpl-friend-1_a.C: New. * g++.dg/modules/tpl-friend-1_b.C: New. * g++.dg/modules/tpl-friend-2_a.C: New. * g++.dg/modules/tpl-friend-2_b.C: New. * g++.dg/modules/tpl-friend-3_a.C: New. * g++.dg/modules/tpl-friend-3_b.C: New. * g++.dg/modules/tpl-friend-4_a.C: New. * g++.dg/modules/tpl-friend-4_b.C: New. * g++.dg/modules/tpl-friend-5_a.C: New. * g++.dg/modules/tpl-friend-5_b.C: New. * g++.dg/modules/tpl-friend-6_a.C: New. * g++.dg/modules/tpl-friend-6_b.C: New. * g++.dg/modules/tpl-friend-7_a.C: New. * g++.dg/modules/tpl-friend-7_b.C: New. * g++.dg/modules/tpl-friend-merge-1.cc: New. * g++.dg/modules/tpl-friend-merge-1.h: New. * g++.dg/modules/tpl-friend-merge-1_a.H: New. * g++.dg/modules/tpl-friend-merge-1_b.H: New. * g++.dg/modules/tpl-friend-merge-1_c.H: New. * g++.dg/modules/tpl-friend-merge-1_d.C: New. * g++.dg/modules/tpl-friend-merge-1_e.C: New. * g++.dg/modules/tpl-friend-merge-1_f.C: New. * g++.dg/modules/tpl-spec-1_a.C: New. * g++.dg/modules/tpl-spec-1_b.C: New. * g++.dg/modules/tpl-spec-2_a.C: New. * g++.dg/modules/tpl-spec-2_b.C: New. * g++.dg/modules/tpl-spec-2_c.C: New. * g++.dg/modules/tpl-spec-2_d.C: New. * g++.dg/modules/tpl-spec-3_a.C: New. * g++.dg/modules/tpl-spec-3_b.C: New. * g++.dg/modules/tpl-spec-4_a.C: New. * g++.dg/modules/tpl-spec-4_b.C: New. * g++.dg/modules/tpl-spec-5_a.C: New. * g++.dg/modules/tpl-spec-5_b.C: New. * g++.dg/modules/tpl-spec-6_a.C: New. * g++.dg/modules/tpl-spec-6_b.C: New. * g++.dg/modules/tpl-spec-7.C: New. * g++.dg/modules/tpl-tpl-friend-1_a.C: New. * g++.dg/modules/tpl-tpl-friend-1_b.C: New. * g++.dg/modules/tpl-tpl-mem-1_a.C: New. * g++.dg/modules/tpl-tpl-mem-1_b.C: New. * g++.dg/modules/tpl-tpl-merge-1.h: New. * g++.dg/modules/tpl-tpl-merge-1_a.H: New. * g++.dg/modules/tpl-tpl-merge-1_b.C: New. * g++.dg/modules/tpl-tpl-merge-2.h: New. * g++.dg/modules/tpl-tpl-merge-2_a.H: New. * g++.dg/modules/tpl-tpl-merge-2_b.C: New. * g++.dg/modules/tpl-tpl-parm-1_a.H: New. * g++.dg/modules/tpl-tpl-parm-1_b.C: New. * g++.dg/modules/tpl-tpl-parm-2.h: New. * g++.dg/modules/tpl-tpl-parm-2_a.H: New. * g++.dg/modules/tpl-tpl-parm-2_b.C: New. * g++.dg/modules/tplmem-1_a.C: New. * g++.dg/modules/tplmem-1_b.C: New. * g++.dg/modules/tplmem-3_a.C: New. * g++.dg/modules/tplmem-3_b.C: New. * g++.dg/modules/ttp-1_a.C: New. * g++.dg/modules/ttp-1_b.C: New. * g++.dg/modules/ttp-2_a.C: New. * g++.dg/modules/ttp-2_b.C: New. * g++.dg/modules/ttp-3_a.C: New. * g++.dg/modules/ttp-3_b.C: New. * g++.dg/modules/typename-1_a.C: New. * g++.dg/modules/typename-1_b.C: New. * g++.dg/modules/unnamed-1_a.C: New. * g++.dg/modules/unnamed-1_b.C: New. * g++.dg/modules/unnamed-2.C: New. * g++.dg/modules/used-1_a.H: New. * g++.dg/modules/used-1_b.H: New. * g++.dg/modules/used-1_c.C: New. * g++.dg/modules/using-1_a.C: New. * g++.dg/modules/using-1_b.C: New. * g++.dg/modules/using-1_c.C: New. * g++.dg/modules/using-2_a.C: New. * g++.dg/modules/using-2_b.C: New. * g++.dg/modules/using-2_c.C: New. * g++.dg/modules/using-3.C: New. * g++.dg/modules/using-4_a.C: New. * g++.dg/modules/using-4_b.C: New. * g++.dg/modules/using-5_a.C: New. * g++.dg/modules/using-5_b.C: New. * g++.dg/modules/using-6_a.C: New. * g++.dg/modules/using-6_b.C: New. * g++.dg/modules/using-7.C: New. * g++.dg/modules/using-8_a.C: New. * g++.dg/modules/using-8_b.C: New. * g++.dg/modules/using-enum-1_a.H: New. * g++.dg/modules/using-enum-1_b.C: New. * g++.dg/modules/var-1_a.C: New. * g++.dg/modules/var-1_b.C: New. * g++.dg/modules/var-tpl-1_a.C: New. * g++.dg/modules/var-tpl-1_b.C: New. * g++.dg/modules/var-tpl-concept-1.h: New. * g++.dg/modules/var-tpl-concept-1_a.C: New. * g++.dg/modules/var-tpl-concept-1_b.C: New. * g++.dg/modules/virt-1_a.C: New. * g++.dg/modules/virt-1_b.C: New. * g++.dg/modules/virt-2_a.C: New. * g++.dg/modules/virt-2_b.C: New. * g++.dg/modules/virt-2_c.C: New. * g++.dg/modules/vmort-1_a.C: New. * g++.dg/modules/vmort-1_b.C: New. * g++.dg/modules/vmort-2_a.C: New. * g++.dg/modules/vmort-2_b.C: New. * g++.dg/modules/vmort-2_c.C: New. * g++.dg/modules/vtt-1_a.C: New. * g++.dg/modules/vtt-1_b.C: New. * g++.dg/modules/vtt-1_c.C: New. * g++.dg/modules/vtt-2.h: New. * g++.dg/modules/vtt-2_a.H: New. * g++.dg/modules/vtt-2_b.C: New.
This commit is contained in:
parent
8be20b9e0d
commit
6aff491f7b
833 changed files with 10400 additions and 0 deletions
10
gcc/testsuite/g++.dg/modules/access-1_a.C
Normal file
10
gcc/testsuite/g++.dg/modules/access-1_a.C
Normal file
|
@ -0,0 +1,10 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
export module Foo;
|
||||
// { dg-module-cmi Foo }
|
||||
|
||||
export class Base
|
||||
{
|
||||
public:
|
||||
int m;
|
||||
};
|
12
gcc/testsuite/g++.dg/modules/access-1_b.C
Normal file
12
gcc/testsuite/g++.dg/modules/access-1_b.C
Normal file
|
@ -0,0 +1,12 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
export module Bar;
|
||||
// { dg-module-cmi Bar }
|
||||
|
||||
import Foo;
|
||||
|
||||
export class Derived : public Base
|
||||
{
|
||||
private:
|
||||
using Base::m;
|
||||
};
|
10
gcc/testsuite/g++.dg/modules/access-1_c.C
Normal file
10
gcc/testsuite/g++.dg/modules/access-1_c.C
Normal file
|
@ -0,0 +1,10 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
import Bar;
|
||||
import Foo;
|
||||
|
||||
void foo (Derived *d)
|
||||
{
|
||||
d->m = 1; // { dg-error "inaccessible within this context" }
|
||||
static_cast<Base *> (d)->m = 1; //ok
|
||||
}
|
6
gcc/testsuite/g++.dg/modules/adhoc-1_a.C
Normal file
6
gcc/testsuite/g++.dg/modules/adhoc-1_a.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
// { dg-module-cmi bob }
|
||||
|
||||
export module bob;
|
||||
export int massivelongnamethatcausesadhoclocationsokeepaddingcharsyourgettheidea (int);
|
||||
export void massivelongnamethatcausesadhoclocationsokeepaddingcharsyourgettheidea (float);
|
13
gcc/testsuite/g++.dg/modules/adhoc-1_b.C
Normal file
13
gcc/testsuite/g++.dg/modules/adhoc-1_b.C
Normal file
|
@ -0,0 +1,13 @@
|
|||
// { dg-additional-options "-fmodules-ts -fdiagnostics-show-caret" }
|
||||
|
||||
import bob;
|
||||
void foo ()
|
||||
{
|
||||
massivelongnamethatcausesadhoclocationsokeepaddingcharsyourgettheidea ();
|
||||
}
|
||||
|
||||
// { dg-regexp "\n\[^\n]*adhoc-1_b.C:6:74: error: no matching function for call to 'massivelongnamethatcausesadhoclocationsokeepaddingcharsyourgettheidea\\(\\)'\n massivelongnamethatcausesadhoclocationsokeepaddingcharsyourgettheidea \\(\\);\n \\^$" }
|
||||
// { dg-regexp "\nIn module bob, imported at \[^\n]*adhoc-1_b.C:3:\n\[^\n]*adhoc-1_a.C:5:12: note: candidate: 'int massivelongnamethatcausesadhoclocationsokeepaddingcharsyourgettheidea@bob\\(int\\)'\n export int massivelongnamethatcausesadhoclocationsokeepaddingcharsyourgettheidea \\(int\\);\n \\^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$" }
|
||||
// { dg-regexp "\nIn module bob, imported at \[^\n]*adhoc-1_b.C:3:\n\[^\n]*adhoc-1_a.C:6:188: note: candidate: 'void massivelongnamethatcausesadhoclocationsokeepaddingcharsyourgettheidea@bob\\(float\\)'\n\[ \t]*export void massivelongnamethatcausesadhoclocationsokeepaddingcharsyourgettheidea \\(float\\);\n\[ \t]*\\^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~?$" }
|
||||
// For some reason dg-regexp inserts a blank line
|
||||
// { dg-allow-blank-lines-in-output 1 }
|
13
gcc/testsuite/g++.dg/modules/adl-1_a.C
Normal file
13
gcc/testsuite/g++.dg/modules/adl-1_a.C
Normal file
|
@ -0,0 +1,13 @@
|
|||
// { dg-module-do run }
|
||||
// { dg-additional-options -fmodules-ts }
|
||||
export module worker;
|
||||
// { dg-module-cmi worker }
|
||||
|
||||
namespace details {
|
||||
|
||||
export int fn (int x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
}
|
18
gcc/testsuite/g++.dg/modules/adl-1_b.C
Normal file
18
gcc/testsuite/g++.dg/modules/adl-1_b.C
Normal file
|
@ -0,0 +1,18 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
export module inter;
|
||||
// { dg-module-cmi inter }
|
||||
|
||||
import worker;
|
||||
|
||||
namespace hidden {
|
||||
export int fn (int x)
|
||||
{
|
||||
return -x;
|
||||
}
|
||||
}
|
||||
|
||||
export template <typename T>
|
||||
int TPL (T &t)
|
||||
{
|
||||
return fn (t);
|
||||
}
|
57
gcc/testsuite/g++.dg/modules/adl-1_c.C
Normal file
57
gcc/testsuite/g++.dg/modules/adl-1_c.C
Normal file
|
@ -0,0 +1,57 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
import inter;
|
||||
|
||||
namespace details
|
||||
{
|
||||
|
||||
struct X
|
||||
{
|
||||
|
||||
int m;
|
||||
X (int m) : m(m)
|
||||
{
|
||||
}
|
||||
|
||||
operator int () const
|
||||
{
|
||||
return m;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace hidden
|
||||
{
|
||||
|
||||
struct Y
|
||||
{
|
||||
|
||||
int m;
|
||||
Y (int m) : m(m)
|
||||
{
|
||||
}
|
||||
|
||||
operator int () const
|
||||
{
|
||||
return m;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
details::X x(2);
|
||||
hidden::Y y(2);
|
||||
|
||||
// details::fn@worker is visible from TPL@inter
|
||||
if (TPL (x) != 2) // instantiate TPL<details::X>(T&)
|
||||
return 1;
|
||||
|
||||
// hidden::fn@inter is visible from TPL@inter
|
||||
if (TPL (y) != -2) // instantiate TPL<hidden::Y>(T&)
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
}
|
10
gcc/testsuite/g++.dg/modules/adl-2_a.C
Normal file
10
gcc/testsuite/g++.dg/modules/adl-2_a.C
Normal file
|
@ -0,0 +1,10 @@
|
|||
// { dg-module-do run }
|
||||
// { dg-additional-options -fmodules-ts }
|
||||
export module foo;
|
||||
// { dg-module-cmi foo }
|
||||
|
||||
export template <typename T>
|
||||
int TPL (T const &t)
|
||||
{
|
||||
return frob (t);
|
||||
}
|
21
gcc/testsuite/g++.dg/modules/adl-2_b.C
Normal file
21
gcc/testsuite/g++.dg/modules/adl-2_b.C
Normal file
|
@ -0,0 +1,21 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
export module hidden;
|
||||
// { dg-module-cmi hidden }
|
||||
|
||||
export struct X
|
||||
{
|
||||
int m;
|
||||
|
||||
X(int m) :m(m) {}
|
||||
|
||||
operator int () const
|
||||
{
|
||||
return m;
|
||||
}
|
||||
};
|
||||
|
||||
export int frob (int x)
|
||||
{
|
||||
return x;
|
||||
}
|
17
gcc/testsuite/g++.dg/modules/adl-2_c.C
Normal file
17
gcc/testsuite/g++.dg/modules/adl-2_c.C
Normal file
|
@ -0,0 +1,17 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
import foo;
|
||||
import hidden;
|
||||
|
||||
int main ()
|
||||
{
|
||||
X x (2);
|
||||
|
||||
if (frob (x) != 2)
|
||||
return 1;
|
||||
|
||||
if (TPL (x) != 2)
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
}
|
12
gcc/testsuite/g++.dg/modules/adl-3_a.C
Normal file
12
gcc/testsuite/g++.dg/modules/adl-3_a.C
Normal file
|
@ -0,0 +1,12 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
export module worker;
|
||||
// { dg-module-cmi worker }
|
||||
|
||||
namespace details {
|
||||
|
||||
int fn (int x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
}
|
9
gcc/testsuite/g++.dg/modules/adl-3_b.C
Normal file
9
gcc/testsuite/g++.dg/modules/adl-3_b.C
Normal file
|
@ -0,0 +1,9 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
export module inter;
|
||||
// { dg-module-cmi inter }
|
||||
|
||||
export template <typename T>
|
||||
int TPL (T &t)
|
||||
{
|
||||
return fn (t);
|
||||
}
|
36
gcc/testsuite/g++.dg/modules/adl-3_c.C
Normal file
36
gcc/testsuite/g++.dg/modules/adl-3_c.C
Normal file
|
@ -0,0 +1,36 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
import inter;
|
||||
import worker;
|
||||
|
||||
namespace details
|
||||
{
|
||||
struct X
|
||||
{
|
||||
|
||||
int m;
|
||||
X (int m) : m(m)
|
||||
{
|
||||
}
|
||||
|
||||
operator int () const
|
||||
{
|
||||
return m;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
details::X x(2);
|
||||
|
||||
if (fn (x) != 2) // { dg-error "not declared in" }
|
||||
return 1;
|
||||
|
||||
// { dg-regexp "\n\[^\n]*adl-3_b.C:8:13: error: 'fn' was not declared in this scope$" }
|
||||
if (TPL (x) != 2) // { dg-message "required from here" }
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
}
|
15
gcc/testsuite/g++.dg/modules/adl-4_a.C
Normal file
15
gcc/testsuite/g++.dg/modules/adl-4_a.C
Normal file
|
@ -0,0 +1,15 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
export module inter;
|
||||
// { dg-module-cmi inter }
|
||||
|
||||
namespace hidden {
|
||||
// not found via ADL
|
||||
int fn (int x);
|
||||
|
||||
}
|
||||
|
||||
export template <typename T>
|
||||
int TPL (T &t)
|
||||
{
|
||||
return fn (t);
|
||||
}
|
36
gcc/testsuite/g++.dg/modules/adl-4_b.C
Normal file
36
gcc/testsuite/g++.dg/modules/adl-4_b.C
Normal file
|
@ -0,0 +1,36 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
import inter;
|
||||
|
||||
namespace hidden
|
||||
{
|
||||
|
||||
struct Y
|
||||
{
|
||||
|
||||
int m;
|
||||
Y (int m) : m(m)
|
||||
{
|
||||
}
|
||||
|
||||
operator int () const
|
||||
{
|
||||
return m;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
hidden::Y y(2);
|
||||
|
||||
// unexported hidden::fn@inter is not visible from TPL@inter
|
||||
if (TPL (y) != -2)
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ADL fails
|
||||
// { dg-regexp {[^\n]*/adl-4_a.C:14:[0-9]*: error: 'fn' was not declared in this scope\n} }
|
9
gcc/testsuite/g++.dg/modules/adl-5_a.c
Normal file
9
gcc/testsuite/g++.dg/modules/adl-5_a.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
export module foo;
|
||||
// { dg-module-cmi foo }
|
||||
|
||||
export template <typename T>
|
||||
int TPL (T const &t)
|
||||
{
|
||||
return frob (t);
|
||||
}
|
22
gcc/testsuite/g++.dg/modules/adl-5_b.C
Normal file
22
gcc/testsuite/g++.dg/modules/adl-5_b.C
Normal file
|
@ -0,0 +1,22 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
export module hidden;
|
||||
// { dg-module-cmi hidden }
|
||||
|
||||
export struct X
|
||||
{
|
||||
int m;
|
||||
|
||||
X(int m) :m(m) {}
|
||||
|
||||
operator int () const
|
||||
{
|
||||
return m;
|
||||
}
|
||||
};
|
||||
|
||||
// Not found via any ADL outside of module hidden
|
||||
int frob (int x)
|
||||
{
|
||||
return x;
|
||||
}
|
17
gcc/testsuite/g++.dg/modules/adl-5_c.C
Normal file
17
gcc/testsuite/g++.dg/modules/adl-5_c.C
Normal file
|
@ -0,0 +1,17 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
module hidden;
|
||||
import foo;
|
||||
|
||||
int frob ()
|
||||
{
|
||||
X x (2);
|
||||
|
||||
if (frob (x) != 2)
|
||||
return 1;
|
||||
|
||||
if (TPL (x) != 2)
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
}
|
17
gcc/testsuite/g++.dg/modules/adl-5_d.C
Normal file
17
gcc/testsuite/g++.dg/modules/adl-5_d.C
Normal file
|
@ -0,0 +1,17 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
import foo;
|
||||
import hidden;
|
||||
|
||||
int main ()
|
||||
{
|
||||
X x (2);
|
||||
|
||||
if (frob (x) != 2)
|
||||
return 1;
|
||||
|
||||
if (TPL (x) != 2)
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
}
|
9
gcc/testsuite/g++.dg/modules/alias-1_a.H
Normal file
9
gcc/testsuite/g++.dg/modules/alias-1_a.H
Normal file
|
@ -0,0 +1,9 @@
|
|||
// { dg-additional-options "-fmodule-header -isystem [srcdir]" }
|
||||
// { dg-module-cmi {} }
|
||||
|
||||
#ifndef ALIAS_1_A
|
||||
#define ALIAS_1_A
|
||||
|
||||
int frob ();
|
||||
|
||||
#endif
|
12
gcc/testsuite/g++.dg/modules/alias-1_b.C
Normal file
12
gcc/testsuite/g++.dg/modules/alias-1_b.C
Normal file
|
@ -0,0 +1,12 @@
|
|||
// { dg-additional-options "-fmodules-ts -fdump-lang-module -isystem [srcdir]" }
|
||||
|
||||
// Alias at the header file. We have one CMI file
|
||||
import "alias-1_a.H";
|
||||
import <alias-1_a.H>;
|
||||
|
||||
int main ()
|
||||
{
|
||||
frob ();
|
||||
}
|
||||
|
||||
// { dg-final { scan-lang-dump-times {CMI is } 1 module } }
|
5
gcc/testsuite/g++.dg/modules/alias-1_c.C
Normal file
5
gcc/testsuite/g++.dg/modules/alias-1_c.C
Normal file
|
@ -0,0 +1,5 @@
|
|||
// { dg-additional-options "-fmodules-ts -isystem [srcdir]" }
|
||||
// { dg-module-cmi bob }
|
||||
|
||||
export module bob;
|
||||
import "alias-1_a.H";
|
5
gcc/testsuite/g++.dg/modules/alias-1_d.C
Normal file
5
gcc/testsuite/g++.dg/modules/alias-1_d.C
Normal file
|
@ -0,0 +1,5 @@
|
|||
// { dg-additional-options "-fmodules-ts -isystem [srcdir]" }
|
||||
// { dg-module-cmi kevin }
|
||||
|
||||
export module kevin;
|
||||
import <alias-1_a.H>;
|
4
gcc/testsuite/g++.dg/modules/alias-1_e.C
Normal file
4
gcc/testsuite/g++.dg/modules/alias-1_e.C
Normal file
|
@ -0,0 +1,4 @@
|
|||
// { dg-additional-options "-fmodules-ts -isystem [srcdir]" }
|
||||
|
||||
import bob;
|
||||
import kevin;
|
4
gcc/testsuite/g++.dg/modules/alias-1_f.C
Normal file
4
gcc/testsuite/g++.dg/modules/alias-1_f.C
Normal file
|
@ -0,0 +1,4 @@
|
|||
// { dg-additional-options "-fmodules-ts -fdump-lang-module -isystem [srcdir]" }
|
||||
|
||||
import kevin;
|
||||
import bob;
|
9
gcc/testsuite/g++.dg/modules/alias-2_a.H
Normal file
9
gcc/testsuite/g++.dg/modules/alias-2_a.H
Normal file
|
@ -0,0 +1,9 @@
|
|||
// { dg-additional-options "-fmodule-header -isystem [srcdir]/sys" }
|
||||
// { dg-module-cmi {} }
|
||||
// { dg-module-headers test sys/alias-2_a.H }
|
||||
#ifndef ALIAS_2_A
|
||||
#define ALIAS_2_A
|
||||
|
||||
int frob ();
|
||||
|
||||
#endif
|
13
gcc/testsuite/g++.dg/modules/alias-2_b.C
Normal file
13
gcc/testsuite/g++.dg/modules/alias-2_b.C
Normal file
|
@ -0,0 +1,13 @@
|
|||
// { dg-additional-options "-fmodules-ts -fdump-lang-module -isystem [srcdir]/sys" }
|
||||
|
||||
// These find different headers
|
||||
import "alias-2_a.H";
|
||||
import <alias-2_a.H>;
|
||||
|
||||
int main ()
|
||||
{
|
||||
frob ();
|
||||
frob (1);
|
||||
}
|
||||
|
||||
// { dg-final { scan-lang-dump-times {CMI is} 2 module } }
|
8
gcc/testsuite/g++.dg/modules/align-type-1_a.C
Normal file
8
gcc/testsuite/g++.dg/modules/align-type-1_a.C
Normal file
|
@ -0,0 +1,8 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
export module foo;
|
||||
// { dg-module-cmi foo }
|
||||
|
||||
export using aint = __attribute__ ((aligned(16))) int;
|
||||
|
||||
|
10
gcc/testsuite/g++.dg/modules/align-type-1_b.C
Normal file
10
gcc/testsuite/g++.dg/modules/align-type-1_b.C
Normal file
|
@ -0,0 +1,10 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
import foo;
|
||||
|
||||
struct B
|
||||
{
|
||||
aint m;
|
||||
};
|
||||
|
||||
static_assert (alignof (B) == 16);
|
9
gcc/testsuite/g++.dg/modules/ambig-1_a.C
Normal file
9
gcc/testsuite/g++.dg/modules/ambig-1_a.C
Normal file
|
@ -0,0 +1,9 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
export module One;
|
||||
// { dg-module-cmi One }
|
||||
|
||||
export int foo ();
|
||||
export char bax ();
|
||||
export int quux (float);
|
||||
|
||||
|
6
gcc/testsuite/g++.dg/modules/ambig-1_b.C
Normal file
6
gcc/testsuite/g++.dg/modules/ambig-1_b.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
import One;
|
||||
|
||||
int foo (); // { dg-error "conflicts with import" }
|
||||
int bax (); // { dg-error "ambiguating new declaration" }
|
||||
int quux (int);
|
14
gcc/testsuite/g++.dg/modules/anon-1_a.C
Normal file
14
gcc/testsuite/g++.dg/modules/anon-1_a.C
Normal file
|
@ -0,0 +1,14 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
export module anon;
|
||||
// { dg-module-cmi anon }
|
||||
|
||||
export struct foo
|
||||
{
|
||||
enum {bob};
|
||||
union
|
||||
{
|
||||
int i;
|
||||
float f;
|
||||
};
|
||||
};
|
18
gcc/testsuite/g++.dg/modules/anon-1_b.C
Normal file
18
gcc/testsuite/g++.dg/modules/anon-1_b.C
Normal file
|
@ -0,0 +1,18 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
export module namer;
|
||||
// { dg-module-cmi namer }
|
||||
|
||||
import anon;
|
||||
|
||||
export inline int &get_int (foo &obj)
|
||||
{
|
||||
return obj.i;
|
||||
}
|
||||
|
||||
export inline float &get_float (foo &obj)
|
||||
{
|
||||
return obj.f;
|
||||
}
|
||||
|
||||
|
13
gcc/testsuite/g++.dg/modules/anon-1_c.C
Normal file
13
gcc/testsuite/g++.dg/modules/anon-1_c.C
Normal file
|
@ -0,0 +1,13 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
import namer;
|
||||
import anon;
|
||||
|
||||
int main ()
|
||||
{
|
||||
foo obj;
|
||||
int *ip = &get_int (obj);
|
||||
float *fp = &get_float (obj);
|
||||
|
||||
return !((void *)ip == (void *)fp);
|
||||
}
|
6
gcc/testsuite/g++.dg/modules/anon-2.h
Normal file
6
gcc/testsuite/g++.dg/modules/anon-2.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
|
||||
struct __pthread_cond_s
|
||||
{
|
||||
union {};
|
||||
};
|
4
gcc/testsuite/g++.dg/modules/anon-2_a.H
Normal file
4
gcc/testsuite/g++.dg/modules/anon-2_a.H
Normal file
|
@ -0,0 +1,4 @@
|
|||
// { dg-additional-options -fmodule-header }
|
||||
// { dg-module-cmi {} }
|
||||
|
||||
#include "anon-2.h"
|
5
gcc/testsuite/g++.dg/modules/anon-2_b.C
Normal file
5
gcc/testsuite/g++.dg/modules/anon-2_b.C
Normal file
|
@ -0,0 +1,5 @@
|
|||
// { dg-additional-options "-fmodules-ts -fno-module-lazy" }
|
||||
|
||||
#include "anon-2.h"
|
||||
import "anon-2_a.H";
|
||||
|
6
gcc/testsuite/g++.dg/modules/atom-decl-0_a.C
Normal file
6
gcc/testsuite/g++.dg/modules/atom-decl-0_a.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
|
||||
export module thing;
|
||||
// { dg-module-cmi "thing" }
|
||||
|
||||
export int baz ();
|
7
gcc/testsuite/g++.dg/modules/atom-decl-0_b.C
Normal file
7
gcc/testsuite/g++.dg/modules/atom-decl-0_b.C
Normal file
|
@ -0,0 +1,7 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
import thing;
|
||||
|
||||
void bink ()
|
||||
{
|
||||
baz ();
|
||||
}
|
12
gcc/testsuite/g++.dg/modules/atom-decl-0_c.C
Normal file
12
gcc/testsuite/g++.dg/modules/atom-decl-0_c.C
Normal file
|
@ -0,0 +1,12 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
export module pop;
|
||||
// { dg-module-cmi "pop" }
|
||||
export import thing;
|
||||
|
||||
void bink ();
|
||||
|
||||
void bonk ()
|
||||
{
|
||||
baz ();
|
||||
bink ();
|
||||
}
|
6
gcc/testsuite/g++.dg/modules/atom-decl-2.C
Normal file
6
gcc/testsuite/g++.dg/modules/atom-decl-2.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
export module thing;
|
||||
int i;
|
||||
import baz; // { dg-error "must be contiguous" }
|
||||
|
||||
// { dg-prune-output "not writing module" }
|
6
gcc/testsuite/g++.dg/modules/atom-decl-3.C
Normal file
6
gcc/testsuite/g++.dg/modules/atom-decl-3.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
int i;
|
||||
import bazza;
|
||||
// { dg-error "failed to read" "" { target *-*-* } 0 }
|
||||
// { dg-prune-output "fatal error:" }
|
||||
// { dg-prune-output "compilation terminated" }
|
6
gcc/testsuite/g++.dg/modules/atom-pragma-1.C
Normal file
6
gcc/testsuite/g++.dg/modules/atom-pragma-1.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
export module foo;
|
||||
// { dg-module-cmi foo }
|
||||
|
||||
#pragma bob
|
||||
int i;
|
12
gcc/testsuite/g++.dg/modules/atom-pragma-3.C
Normal file
12
gcc/testsuite/g++.dg/modules/atom-pragma-3.C
Normal file
|
@ -0,0 +1,12 @@
|
|||
// { dg-additional-options "-fmodules-ts -Wno-pedantic" }
|
||||
|
||||
export module foo;
|
||||
// { dg-module-cmi !foo }
|
||||
;
|
||||
|
||||
#pragma pack(2)
|
||||
import baz; // { dg-error "must be contiguous" }
|
||||
|
||||
int i;
|
||||
|
||||
// { dg-prune-output "not writing module" }
|
6
gcc/testsuite/g++.dg/modules/atom-preamble-1.C
Normal file
6
gcc/testsuite/g++.dg/modules/atom-preamble-1.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
|
||||
#define EXPORT export // { dg-error "only occur after a module" }
|
||||
EXPORT module bob; // { dg-error "does not name a type" }
|
||||
// { dg-message "not recognized as" "" { target *-*-* } .-1 }
|
||||
|
6
gcc/testsuite/g++.dg/modules/atom-preamble-2_a.C
Normal file
6
gcc/testsuite/g++.dg/modules/atom-preamble-2_a.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
#define malcolm kevin
|
||||
export module malcolm;
|
||||
// { dg-module-cmi kevin }
|
||||
|
||||
export class X;
|
10
gcc/testsuite/g++.dg/modules/atom-preamble-2_b.C
Normal file
10
gcc/testsuite/g++.dg/modules/atom-preamble-2_b.C
Normal file
|
@ -0,0 +1,10 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
#if 1
|
||||
export module bob;
|
||||
// { dg-module-cmi bob }
|
||||
#endif
|
||||
|
||||
import kevin;
|
||||
|
||||
X *f;
|
||||
|
6
gcc/testsuite/g++.dg/modules/atom-preamble-2_c.C
Normal file
6
gcc/testsuite/g++.dg/modules/atom-preamble-2_c.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
#pragma bob
|
||||
|
||||
import kevin;
|
||||
|
||||
X *f;
|
12
gcc/testsuite/g++.dg/modules/atom-preamble-2_d.C
Normal file
12
gcc/testsuite/g++.dg/modules/atom-preamble-2_d.C
Normal file
|
@ -0,0 +1,12 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
import kevin;
|
||||
|
||||
#if 1
|
||||
#if 1
|
||||
import kevin;
|
||||
#endif
|
||||
#elif 1
|
||||
int i;
|
||||
#endif
|
||||
|
||||
int j; // end here
|
12
gcc/testsuite/g++.dg/modules/atom-preamble-2_e.C
Normal file
12
gcc/testsuite/g++.dg/modules/atom-preamble-2_e.C
Normal file
|
@ -0,0 +1,12 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
import kevin;
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
import kevin;
|
||||
#endif
|
||||
#elif 1
|
||||
import kevin;
|
||||
#endif
|
||||
|
||||
int i; // end here
|
10
gcc/testsuite/g++.dg/modules/atom-preamble-2_f.C
Normal file
10
gcc/testsuite/g++.dg/modules/atom-preamble-2_f.C
Normal file
|
@ -0,0 +1,10 @@
|
|||
// { dg-additional-options "-fmodules-ts -Wno-pedantic" }
|
||||
export module stuart;
|
||||
// { dg-module-cmi !stuart }
|
||||
|
||||
# 6 "atom-preamble-2_f.C" 1
|
||||
import kevin; // { dg-error "not be from header" }
|
||||
# 8 "" 2
|
||||
|
||||
import kevin; // ok
|
||||
// { dg-prune-output "not writing module" }
|
7
gcc/testsuite/g++.dg/modules/atom-preamble-3.C
Normal file
7
gcc/testsuite/g++.dg/modules/atom-preamble-3.C
Normal file
|
@ -0,0 +1,7 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
#define import import
|
||||
import malcolm; // { dg-error "object-like macro" }
|
||||
// { dg-error "failed to read" "" { target *-*-* } 0 }
|
||||
|
||||
// { dg-prune-output "compilation terminated" }
|
||||
// { dg-prune-output "fatal error:" }
|
5
gcc/testsuite/g++.dg/modules/atom-preamble-4.C
Normal file
5
gcc/testsuite/g++.dg/modules/atom-preamble-4.C
Normal file
|
@ -0,0 +1,5 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
#define NAME(X) X;
|
||||
|
||||
export module NAME(bob)
|
||||
|
19
gcc/testsuite/g++.dg/modules/auto-1.h
Normal file
19
gcc/testsuite/g++.dg/modules/auto-1.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
template <typename T> auto frob (T t)
|
||||
{
|
||||
return t;
|
||||
}
|
||||
|
||||
struct Bob
|
||||
{
|
||||
operator auto ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
inline auto foo ()
|
||||
{
|
||||
return frob (1) + int (Bob ());
|
||||
}
|
||||
|
4
gcc/testsuite/g++.dg/modules/auto-1_a.H
Normal file
4
gcc/testsuite/g++.dg/modules/auto-1_a.H
Normal file
|
@ -0,0 +1,4 @@
|
|||
// { dg-additional-options -fmodule-header }
|
||||
// { dg-module-cmi {} }
|
||||
|
||||
#include "auto-1.h"
|
11
gcc/testsuite/g++.dg/modules/auto-1_b.C
Normal file
11
gcc/testsuite/g++.dg/modules/auto-1_b.C
Normal file
|
@ -0,0 +1,11 @@
|
|||
// { dg-additional-options "-fmodules-ts -fno-module-lazy -fdump-lang-module-alias" }
|
||||
|
||||
#include "auto-1.h"
|
||||
import "auto-1_a.H";
|
||||
|
||||
int bar ()
|
||||
{
|
||||
return foo () + frob (0u);
|
||||
}
|
||||
|
||||
// { dg-final { scan-lang-dump-not {merge key \(new\)} module } }
|
13
gcc/testsuite/g++.dg/modules/auto-2.h
Normal file
13
gcc/testsuite/g++.dg/modules/auto-2.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
template<typename _Callable>
|
||||
struct _RangeAdaptor
|
||||
{
|
||||
constexpr _RangeAdaptor(const _Callable &) { }
|
||||
};
|
||||
|
||||
template<typename _Callable>
|
||||
_RangeAdaptor(_Callable) -> _RangeAdaptor<_Callable>;
|
||||
|
||||
template<unsigned _Nm>
|
||||
inline constexpr _RangeAdaptor elements = [] (auto&& __r) {};
|
||||
|
4
gcc/testsuite/g++.dg/modules/auto-2_a.H
Normal file
4
gcc/testsuite/g++.dg/modules/auto-2_a.H
Normal file
|
@ -0,0 +1,4 @@
|
|||
// { dg-additional-options "-fmodule-header -fconcepts" }
|
||||
// { dg-module-cmi {} }
|
||||
|
||||
#include "auto-2.h"
|
6
gcc/testsuite/g++.dg/modules/auto-2_b.C
Normal file
6
gcc/testsuite/g++.dg/modules/auto-2_b.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options "-fmodules-ts -fconcepts -fdump-lang-module-alias -fno-module-lazy" }
|
||||
|
||||
#include "auto-2.h"
|
||||
import "auto-2_a.H";
|
||||
|
||||
// { dg-final { scan-lang-dump-not {merge key \(new\)} module } }
|
6
gcc/testsuite/g++.dg/modules/bad-mapper-1.C
Normal file
6
gcc/testsuite/g++.dg/modules/bad-mapper-1.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options "-fmodules-ts -fmodule-mapper=|this-will-not-work" }
|
||||
import unique1.bob;
|
||||
// { dg-error "-:failed exec.*mapper.* .*this-will-not-work" "" { target *-*-* } 0 }
|
||||
// { dg-prune-output "fatal error:" }
|
||||
// { dg-prune-output "failed to read" }
|
||||
// { dg-prune-output "compilation terminated" }
|
6
gcc/testsuite/g++.dg/modules/bad-mapper-2.C
Normal file
6
gcc/testsuite/g++.dg/modules/bad-mapper-2.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options "-fmodules-ts -fmodule-mapper=not-a-host:3838" }
|
||||
import unique2.bob;
|
||||
// { dg-error "failed .* mapper 'not-a-host" "" { target *-*-* } 0 }
|
||||
// { dg-prune-output "fatal error:" }
|
||||
// { dg-prune-output "failed to read" }
|
||||
// { dg-prune-output "compilation terminated" }
|
6
gcc/testsuite/g++.dg/modules/bad-mapper-3.C
Normal file
6
gcc/testsuite/g++.dg/modules/bad-mapper-3.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options "-fmodules-ts -fmodule-mapper=localhost:172477262" }
|
||||
import unique3.bob;
|
||||
// { dg-error {failed connecting mapper 'localhost:172477262'} "" { target *-*-* } 0 }
|
||||
// { dg-prune-output "fatal error:" }
|
||||
// { dg-prune-output "failed to read" }
|
||||
// { dg-prune-output "compilation terminated" }
|
3
gcc/testsuite/g++.dg/modules/ben-1.map
Normal file
3
gcc/testsuite/g++.dg/modules/ben-1.map
Normal file
|
@ -0,0 +1,3 @@
|
|||
$root .
|
||||
module:import partitions/module:import.mod
|
||||
module module.mod
|
9
gcc/testsuite/g++.dg/modules/ben-1_a.C
Normal file
9
gcc/testsuite/g++.dg/modules/ben-1_a.C
Normal file
|
@ -0,0 +1,9 @@
|
|||
// { dg-additional-options "-fmodules-ts -fmodule-mapper=[srcdir]/ben-1.map" }
|
||||
// { dg-additional-files ben-1.map }
|
||||
|
||||
export module module:import;
|
||||
// { dg-module-cmi =partitions/module:import.mod }
|
||||
|
||||
export int b() {
|
||||
return 0;
|
||||
}
|
11
gcc/testsuite/g++.dg/modules/ben-1_b.C
Normal file
11
gcc/testsuite/g++.dg/modules/ben-1_b.C
Normal file
|
@ -0,0 +1,11 @@
|
|||
// { dg-additional-options "-fmodules-ts -fmodule-mapper=[srcdir]/ben-1.map" }
|
||||
// { dg-additional-files ben-1.map }
|
||||
|
||||
export module module;
|
||||
// { dg-module-cmi =module.mod }
|
||||
export import :import;
|
||||
|
||||
export int c ()
|
||||
{
|
||||
return b ();
|
||||
}
|
15
gcc/testsuite/g++.dg/modules/bfield-1_a.C
Normal file
15
gcc/testsuite/g++.dg/modules/bfield-1_a.C
Normal file
|
@ -0,0 +1,15 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
export module foo;
|
||||
// { dg-module-cmi foo }
|
||||
|
||||
export struct timex
|
||||
{
|
||||
int a;
|
||||
int :32;
|
||||
int :32;
|
||||
int :32;
|
||||
int :32;
|
||||
int :32;
|
||||
int :32;
|
||||
};
|
||||
|
4
gcc/testsuite/g++.dg/modules/bfield-1_b.C
Normal file
4
gcc/testsuite/g++.dg/modules/bfield-1_b.C
Normal file
|
@ -0,0 +1,4 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
import foo;
|
||||
|
||||
timex v = {1};
|
11
gcc/testsuite/g++.dg/modules/bfield-2_a.C
Normal file
11
gcc/testsuite/g++.dg/modules/bfield-2_a.C
Normal file
|
@ -0,0 +1,11 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
export module foo;
|
||||
// { dg-module-cmi foo }
|
||||
|
||||
export struct ting
|
||||
{
|
||||
int a;
|
||||
int b : 3;
|
||||
int c : 5;
|
||||
};
|
4
gcc/testsuite/g++.dg/modules/bfield-2_b.C
Normal file
4
gcc/testsuite/g++.dg/modules/bfield-2_b.C
Normal file
|
@ -0,0 +1,4 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
import foo;
|
||||
|
||||
ting v = {1, 2, 3};
|
8
gcc/testsuite/g++.dg/modules/bool-1.h
Normal file
8
gcc/testsuite/g++.dg/modules/bool-1.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
typedef signed char __v16qs __attribute__ ((__vector_size__ (16)));
|
||||
|
||||
|
||||
inline auto
|
||||
_mm_cmplt_epi8 (__v16qs __A, __v16qs __B)
|
||||
{
|
||||
return __A < __B;
|
||||
}
|
4
gcc/testsuite/g++.dg/modules/bool-1_a.H
Normal file
4
gcc/testsuite/g++.dg/modules/bool-1_a.H
Normal file
|
@ -0,0 +1,4 @@
|
|||
// { dg-additional-options {-fmodule-header -Wno-psabi} }
|
||||
// { dg-module-cmi {} }
|
||||
|
||||
#include "bool-1.h"
|
5
gcc/testsuite/g++.dg/modules/bool-1_b.H
Normal file
5
gcc/testsuite/g++.dg/modules/bool-1_b.H
Normal file
|
@ -0,0 +1,5 @@
|
|||
// { dg-additional-options {-fmodule-header -fno-module-lazy -Wno-psabi} }
|
||||
// { dg-module-cmi {} }
|
||||
|
||||
#include "bool-1.h"
|
||||
import "bool-1_a.H";
|
8
gcc/testsuite/g++.dg/modules/bool-1_c.C
Normal file
8
gcc/testsuite/g++.dg/modules/bool-1_c.C
Normal file
|
@ -0,0 +1,8 @@
|
|||
// { dg-additional-options {-fmodules-ts -Wno-psabi} }
|
||||
|
||||
import "bool-1_b.H";
|
||||
|
||||
void frob (signed char __attribute__ ((__vector_size__ (16))) arg)
|
||||
{
|
||||
_mm_cmplt_epi8 (arg, arg);
|
||||
}
|
9
gcc/testsuite/g++.dg/modules/bug-1_a.C
Normal file
9
gcc/testsuite/g++.dg/modules/bug-1_a.C
Normal file
|
@ -0,0 +1,9 @@
|
|||
// { dg-module-do run }
|
||||
// { dg-additional-options "-fmodules-ts" }
|
||||
export module One;
|
||||
// { dg-module-cmi "One" }
|
||||
|
||||
export int Frob (int a)
|
||||
{
|
||||
return -a;
|
||||
}
|
10
gcc/testsuite/g++.dg/modules/bug-1_b.C
Normal file
10
gcc/testsuite/g++.dg/modules/bug-1_b.C
Normal file
|
@ -0,0 +1,10 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
import One;
|
||||
|
||||
int main ()
|
||||
{
|
||||
if (Frob (2) != -2)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
18
gcc/testsuite/g++.dg/modules/builtin-1_a.C
Normal file
18
gcc/testsuite/g++.dg/modules/builtin-1_a.C
Normal file
|
@ -0,0 +1,18 @@
|
|||
// { dg-additional-options "-fmodules-ts -fdump-lang-module-blocks-alias-uid" }
|
||||
export module builtin;
|
||||
// { dg-module-cmi builtin }
|
||||
|
||||
export inline void ary_del (int *ptr)
|
||||
{
|
||||
delete[] ptr;
|
||||
}
|
||||
|
||||
export inline void scalar_del (int *ptr)
|
||||
{
|
||||
delete ptr;
|
||||
}
|
||||
|
||||
// { dg-final { scan-lang-dump {Wrote GMF:-[0-9]* function_decl:'::operator delete'@builtin} module } }
|
||||
// { dg-final { scan-lang-dump {Wrote GMF:-[0-9]* function_decl:'::operator delete \[\]'@builtin} module } }
|
||||
|
||||
// { dg-final { scan-lang-dump {Writing named:-[0-9]* function_decl:'::operator delete'\n *Wrote[^\n]*\n *Writing:-[0-9]*'s named merge key \(decl\) function_decl:'::operator delete'} module } }
|
12
gcc/testsuite/g++.dg/modules/builtin-1_b.C
Normal file
12
gcc/testsuite/g++.dg/modules/builtin-1_b.C
Normal file
|
@ -0,0 +1,12 @@
|
|||
// { dg-additional-options "-fmodules-ts -fdump-lang-module-alias" }
|
||||
import builtin;
|
||||
|
||||
int main ()
|
||||
{
|
||||
ary_del (nullptr);
|
||||
scalar_del (nullptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(matched\) function_decl:'::operator delete \[\]'} module } }
|
||||
// { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(matched\) function_decl:'::operator delete'} module } }
|
7
gcc/testsuite/g++.dg/modules/builtin-2.C
Normal file
7
gcc/testsuite/g++.dg/modules/builtin-2.C
Normal file
|
@ -0,0 +1,7 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern int printf (const char *__restrict __format, ...);
|
||||
}
|
||||
|
13
gcc/testsuite/g++.dg/modules/builtin-3_b.C
Normal file
13
gcc/testsuite/g++.dg/modules/builtin-3_b.C
Normal file
|
@ -0,0 +1,13 @@
|
|||
// { dg-additional-options "-fmodules-ts -fdump-lang-module-alias" }
|
||||
import builtins;
|
||||
|
||||
int main ()
|
||||
{
|
||||
length ("");
|
||||
count (1, "", "", nullptr);
|
||||
}
|
||||
|
||||
// { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(matched\) function_decl:'::__builtin_strlen'} module } }
|
||||
// { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(matched\) type_decl:'::__builtin_va_list'} module { target { x86_64-*-linux* } } } }
|
||||
// { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(new\) type_decl:'::va_list'} module } }
|
||||
// { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(new\) type_decl:'::__gnuc_va_list'} module } }
|
9
gcc/testsuite/g++.dg/modules/builtin-4_a.H
Normal file
9
gcc/testsuite/g++.dg/modules/builtin-4_a.H
Normal file
|
@ -0,0 +1,9 @@
|
|||
// { dg-additional-options -fmodule-header }
|
||||
// { dg-module-cmi {} }
|
||||
|
||||
void* operator new(__SIZE_TYPE__);
|
||||
void* operator new[](__SIZE_TYPE__);
|
||||
|
||||
void operator delete (void*) noexcept;
|
||||
void operator delete[](void*) noexcept;
|
||||
|
14
gcc/testsuite/g++.dg/modules/builtin-4_b.C
Normal file
14
gcc/testsuite/g++.dg/modules/builtin-4_b.C
Normal file
|
@ -0,0 +1,14 @@
|
|||
// { dg-additional-options "-fmodules-ts -fno-module-lazy -fdump-lang-module-alias" }
|
||||
|
||||
import "builtin-4_a.H";
|
||||
|
||||
int main ()
|
||||
{
|
||||
operator delete (operator new (10));
|
||||
operator delete[] (operator new[] (10));
|
||||
}
|
||||
|
||||
// { dg-final { scan-lang-dump {named merge key \(matched\) function_decl:'::operator new'} module } }
|
||||
// { dg-final { scan-lang-dump {named merge key \(matched\) function_decl:'::operator delete'} module } }
|
||||
// { dg-final { scan-lang-dump {named merge key \(matched\) function_decl:'::operator new \[\]'} module } }
|
||||
// { dg-final { scan-lang-dump {named merge key \(matched\) function_decl:'::operator delete \[\]'} module } }
|
3
gcc/testsuite/g++.dg/modules/builtin-5_a.H
Normal file
3
gcc/testsuite/g++.dg/modules/builtin-5_a.H
Normal file
|
@ -0,0 +1,3 @@
|
|||
// { dg-additional-options "-fmodule-header" }
|
||||
// { dg-module-cmi {} }
|
||||
extern "C" int printf (char const *, ...);
|
14
gcc/testsuite/g++.dg/modules/builtin-5_b.C
Normal file
14
gcc/testsuite/g++.dg/modules/builtin-5_b.C
Normal file
|
@ -0,0 +1,14 @@
|
|||
// { dg-additional-options "-fmodules-ts -fdump-lang-module-alias" }
|
||||
|
||||
import "builtin-5_a.H";
|
||||
|
||||
void foo ()
|
||||
{
|
||||
printf ("bob\n");
|
||||
}
|
||||
|
||||
extern "C" int printf (char const *, int);
|
||||
|
||||
// { dg-regexp {[^\n]*builtin-5_b.C:10:[0-9]*: error: conflicting declaration of C function 'int printf\(const char\*, int\)'\nIn module [^\n]*builtin-5_a.H, imported at [^\n]*builtin-5_b.C:3:\n[^\n]*builtin-5_a.H:3:[0-9]*: note: previous declaration 'int printf\(const char\*, ...\)'} }
|
||||
|
||||
// { dg-final { scan-lang-dump {Read:-1's named merge key \(matched\) function_decl:'::printf'} module } }
|
12
gcc/testsuite/g++.dg/modules/builtin-6_a.H
Normal file
12
gcc/testsuite/g++.dg/modules/builtin-6_a.H
Normal file
|
@ -0,0 +1,12 @@
|
|||
// { dg-additional-options -fmodule-header }
|
||||
// { dg-module-cmi {} }
|
||||
|
||||
extern "C" {
|
||||
|
||||
static double sin (double)
|
||||
{
|
||||
// extra small angle approximation :)
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
}
|
9
gcc/testsuite/g++.dg/modules/builtin-6_b.C
Normal file
9
gcc/testsuite/g++.dg/modules/builtin-6_b.C
Normal file
|
@ -0,0 +1,9 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
|
||||
import "builtin-6_a.H";
|
||||
|
||||
int main ()
|
||||
{
|
||||
return sin (0.0);
|
||||
}
|
8
gcc/testsuite/g++.dg/modules/builtin-7_a.H
Normal file
8
gcc/testsuite/g++.dg/modules/builtin-7_a.H
Normal file
|
@ -0,0 +1,8 @@
|
|||
// { dg-additional-options -fmodule-header }
|
||||
// { dg-module_cmi {} }
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern double nan(const char *);
|
||||
inline long double nanl(const char * __x) { return nan(__x); }
|
||||
}
|
8
gcc/testsuite/g++.dg/modules/builtin-7_b.C
Normal file
8
gcc/testsuite/g++.dg/modules/builtin-7_b.C
Normal file
|
@ -0,0 +1,8 @@
|
|||
// { dg-additional-options -fmodules-ts }
|
||||
|
||||
import "builtin-7_a.H";
|
||||
|
||||
void f ()
|
||||
{
|
||||
nanl ("");
|
||||
}
|
15
gcc/testsuite/g++.dg/modules/by-name-1.C
Normal file
15
gcc/testsuite/g++.dg/modules/by-name-1.C
Normal file
|
@ -0,0 +1,15 @@
|
|||
// check internals by name unless SCC
|
||||
// { dg-additional-options "-fmodules-ts -fdump-lang-module-uid" }
|
||||
|
||||
export module frob;
|
||||
// { dg-module-cmi frob }
|
||||
|
||||
class X
|
||||
{
|
||||
int i;
|
||||
};
|
||||
|
||||
export X *f ();
|
||||
|
||||
// { dg-final { scan-lang-dump {Wrote purview:-[0-9]* type_decl:'::X'} "module" } }
|
||||
// { dg-final { scan-lang-dump {Indirect:-[0-9]* decl's type record_type:'::X'} "module" } }
|
8
gcc/testsuite/g++.dg/modules/cexpr-1_a.C
Normal file
8
gcc/testsuite/g++.dg/modules/cexpr-1_a.C
Normal file
|
@ -0,0 +1,8 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
export module Const;
|
||||
// { dg-module-cmi "Const" }
|
||||
|
||||
export constexpr int SQ (int b)
|
||||
{
|
||||
return b * b;
|
||||
}
|
4
gcc/testsuite/g++.dg/modules/cexpr-1_b.C
Normal file
4
gcc/testsuite/g++.dg/modules/cexpr-1_b.C
Normal file
|
@ -0,0 +1,4 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
import Const;
|
||||
|
||||
static_assert (SQ(88) == 88 * 88, "waaa!");
|
19
gcc/testsuite/g++.dg/modules/cexpr-2_a.C
Normal file
19
gcc/testsuite/g++.dg/modules/cexpr-2_a.C
Normal file
|
@ -0,0 +1,19 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
export module sqrt;
|
||||
// { dg-module-cmi "sqrt" }
|
||||
|
||||
export constexpr unsigned sqrt (unsigned X, unsigned x = 1)
|
||||
{
|
||||
// Newton-Raphson, not binary restoring
|
||||
// x <= x - f(x)/f'(x)
|
||||
// f(x) = x^2 - X
|
||||
// f'(x) = 2x
|
||||
// x <= x - (x^2 - X) / 2x
|
||||
// x <= x - x/2 + X/2x
|
||||
// x <= x/2 + X/2x
|
||||
// x <= 1/2(x + X/x)
|
||||
unsigned nx = (x + X/x) / 2;
|
||||
if (nx != x)
|
||||
nx = sqrt (X, nx);
|
||||
return nx;
|
||||
}
|
4
gcc/testsuite/g++.dg/modules/cexpr-2_b.C
Normal file
4
gcc/testsuite/g++.dg/modules/cexpr-2_b.C
Normal file
|
@ -0,0 +1,4 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
import sqrt;
|
||||
|
||||
static_assert (sqrt(81) == 9, "waaa!");
|
5
gcc/testsuite/g++.dg/modules/circ-1_a.C
Normal file
5
gcc/testsuite/g++.dg/modules/circ-1_a.C
Normal file
|
@ -0,0 +1,5 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
export module Bob;
|
||||
// { dg-module-cmi Bob }
|
||||
|
||||
export int bob ();
|
7
gcc/testsuite/g++.dg/modules/circ-1_b.C
Normal file
7
gcc/testsuite/g++.dg/modules/circ-1_b.C
Normal file
|
@ -0,0 +1,7 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
export module Kevin;
|
||||
// { dg-module-cmi Kevin }
|
||||
|
||||
import Bob;
|
||||
|
||||
export int kevin ();
|
9
gcc/testsuite/g++.dg/modules/circ-1_c.C
Normal file
9
gcc/testsuite/g++.dg/modules/circ-1_c.C
Normal file
|
@ -0,0 +1,9 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
export module Bob; // { dg-message "declared here" }
|
||||
// No need to dg-module-cmi
|
||||
|
||||
import Kevin;
|
||||
// { dg-error "failed to read" "" { target *-*-* } 0 }
|
||||
// { dg-error "cannot import module" "" { target *-*-* } 0 }
|
||||
// { dg-prune-output "fatal error:" }
|
||||
// { dg-prune-output "compilation terminated" }
|
6
gcc/testsuite/g++.dg/modules/circ-1_d.C
Normal file
6
gcc/testsuite/g++.dg/modules/circ-1_d.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
module;
|
||||
import Kevin;
|
||||
|
||||
export module Bob; // { dg-error "module already imported" }
|
||||
// { dg-message "imported here" "Kevin.nms:" { target *-*-* } 0 }
|
15
gcc/testsuite/g++.dg/modules/class-1_a.C
Normal file
15
gcc/testsuite/g++.dg/modules/class-1_a.C
Normal file
|
@ -0,0 +1,15 @@
|
|||
// { dg-module-do run }
|
||||
// { dg-additional-options "-fmodules-ts" }
|
||||
export module One;
|
||||
// { dg-module-cmi "One" }
|
||||
|
||||
namespace Bob
|
||||
{
|
||||
struct X;
|
||||
export struct Y {
|
||||
unsigned a;
|
||||
unsigned b;
|
||||
};
|
||||
}
|
||||
|
||||
export void copy (Bob::Y *, const Bob::Y *);
|
16
gcc/testsuite/g++.dg/modules/class-1_b.C
Normal file
16
gcc/testsuite/g++.dg/modules/class-1_b.C
Normal file
|
@ -0,0 +1,16 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
module One;
|
||||
|
||||
struct Bob::X
|
||||
{
|
||||
int i;
|
||||
};
|
||||
|
||||
|
||||
int x = sizeof (Bob::X);
|
||||
|
||||
void copy (Bob::Y *dst, Bob::Y const *src)
|
||||
{
|
||||
dst->a = src->a;
|
||||
dst->b = src->b;
|
||||
}
|
35
gcc/testsuite/g++.dg/modules/class-1_c.C
Normal file
35
gcc/testsuite/g++.dg/modules/class-1_c.C
Normal file
|
@ -0,0 +1,35 @@
|
|||
// { dg-additional-options "-fmodules-ts" }
|
||||
import One;
|
||||
|
||||
int y = sizeof (Bob::Y);
|
||||
|
||||
unsigned Foo (Bob::Y *ptr)
|
||||
{
|
||||
return ptr->a + ptr->b;
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
if (y != 2 * sizeof (int))
|
||||
return 1;
|
||||
|
||||
unsigned pun[4];
|
||||
pun[0] = 0xdeadbeef;
|
||||
pun[1] = 0xfeedface;
|
||||
pun[2] = 0x8badf00d;
|
||||
pun[3] = 0xcafed00d;
|
||||
|
||||
copy ((Bob::Y *)pun, (Bob::Y *)&pun[2]);
|
||||
|
||||
if (pun[0] != 0x8badf00d)
|
||||
return 2;
|
||||
if (pun[1] != 0xcafed00d)
|
||||
return 3;
|
||||
if (pun[2] != 0x8badf00d)
|
||||
return 4;
|
||||
|
||||
if (Foo ((Bob::Y *)&pun[1]) != 0xcafed00d + 0x8badf00d)
|
||||
return 5;
|
||||
|
||||
return 0;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue