This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: differences between dg-do compile and dg-do assemble


> 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} ?

It's notionally faster to use `compile' (which will produce a .s file,
rather than assembling to an object file).  However, I benchmarked a
change to the test harness last year that skipped assembling test
cases when it was not necessary and found that it made such a tiny
improvement that it wasn't worth worrying about.

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

The other side of the argument is that by using dg-do assemble, you'll
potentially find a class of compiler bugs that would go unnoticed if
you only compiled.

Cheers, Ben


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]