https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90481
Bug ID: 90481 Summary: Unclean DejaGnu global state after ERROR in one '*.exp' file Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org Target Milestone: --- A co-worker had recently ran into this -- which I happened to remember, and now managed to relate to what I'd just ran into ;-) -- so that shall be sufficient evidence to file this issue. In libgomp testing (but probably not specific to that), we saw Fortran files attempted to be compiled in C++ mode. My (unproven) theory is as follows. As usually 'check-*' targets do, 'check-target-libgomp' also runs several '*.exp' files in succession. Each of these establishes some DejaGnu global state, which is taken care by the respective '*.exp' file to clean it up at the end of each '*.exp' file. For me now, 'libgomp.oacc-c++/c++.exp' aborted with an ERROR (that's OK -- while it was running, I removed a file it was later looking for), but due to that, it then didn't clean up its global state, and the next file, 'libgomp.oacc-fortran/fortran.exp' didn't start with the expected clean global state, so failed to properly initialize, thus the Fortran files being compiled in C++ mode. I'd mentioned before (<http://mid.mail-archive.com/87ef7roh0f.fsf@euler.schwinge.homeip.net>) that I'm not happy about this behavior of DejaGnu/'runtest' of not starting each '*.exp' file with a clean global state, but that's how it currently is. (I have not looked whether there's an actual reason for that.)