[PATCH] gcc parallel make check

Tobias Burnus burnus@net-b.de
Thu Sep 11 19:23:00 GMT 2014


On 11.09.2014 20:33, VandeVondele Joost wrote:
>> >For PR56408 we need some fix.
> BTW, is there anything special about Fortran ? There are at least 180 test files that contain 'dg-additional-sources' some in a very non-local way:

Well, the question is what you want to do with the different files. If 
you just want to compile them, e.g. for linking or executing, you are 
fine. However, with Fortran module's there is a .mod file produced – 
which gives an ordering constraint: The file with the module has to be 
compiled first before the other file can be compiled. (If one puts the 
module into the same file, one has effectively one translation unit and 
some bugs do not pop up in this case.)

The current scheme comes at its limits in that case. Mainly because the 
file specified in dg-additional-sources is compiled after the one in 
which this line is written. That can be fine for linking/run-time tests, 
where one disables the by-itself compilation of the second file - and 
puts the module into the first file. However, as soon as one wants to do 
more, e.g. dg-error/dg-warning output, checking the dump/assembler etc., 
one is in trouble. See the files listed in the PR for issues.

By contrast, for C/C++, one has a header file which is included by the 
preprocessor (hence before the compiler), thus, there is no ordering 
issue as no compiler input is generated. I don't know whether one could 
run into issues with precompiled header files - but there on has at 
least the different name *.h/*.hpp and *.c/.cc. I don't know about Ada 
or C++'s upcoming ISO-version of precompiled headers ("modules"), maybe 
there one runs into similar issues?

See the PR for some attempts to fix it.

Tobias



More information about the Gcc-patches mailing list