Message ID | CABOHX+e=_Xn1Jw0ROYf6UmB1LLuRQgFU8cKa6oeraFwZy0MTqw@mail.gmail.com |
---|---|
State | New |
Headers | show |
Series | [d] Committed ensure all unittests are registered against the original module. | expand |
diff --git a/gcc/d/modules.cc b/gcc/d/modules.cc index 315f5d82356..35050c8e17a 100644 --- a/gcc/d/modules.cc +++ b/gcc/d/modules.cc @@ -836,7 +836,8 @@ register_module_decl (Declaration *d) compiling in unittests are kept track of separately so they are not omitted when compiling with -fbuilding-libphobos-tests. */ module_info *minfo; - if (flag_building_libphobos_tests && DECL_IN_UNITTEST_CONDITION_P (decl)) + if (flag_building_libphobos_tests && !fd->isUnitTestDeclaration () + && DECL_IN_UNITTEST_CONDITION_P (decl)) minfo = current_testing_module; else minfo = current_moduleinfo;