differences between dg-do compile and dg-do assemble

Mike Stump mrs@apple.com
Mon Nov 6 21:01:00 GMT 2006


On Nov 5, 2006, at 6:52 PM, Manuel López-Ibáñez wrote:
> Although I understand what is the difference between dg-do compile and
> dg-do assemble, I have noticed that there are many testcases  that use
> either dg-compile or dg-do assemble and do nothing with the output.

> Thus, I would like to know:
>
> Is it faster {dg-do compile} or {dg-do assemble}?

Our assembler is in the 1-2% range for compile times.  So, using the  
right one might speed things up 1-2%, if we didn't test on a 2-4  
processor box, but we do, so, we don't care.  On a 1 processor box,  
it is so marginal as to almost not worry about it, though, I'd tend  
to pick the right one for tests I author.

> Is it appropriate to always use the faster one if the testcase just  
> checks for the presence/absence of warnings and errors?

Yes, it is appropriate to use the right one.  As for which one is  
right, the one that FAILs when the compiler has the bug and PASSes  
when the compiler has been fixed is a good first order  
approximation.  Beyond that, if assemble is enough to do that, you  
can use it.  Some testcases will need compile to elicit a FAIL.  It  
is natural that some people will tend to use compile instead of  
assemble occasionally, when assemble would have worked, don't worry  
about it, it is healthy to have a mix.



More information about the Gcc mailing list