This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: differences between dg-do compile and dg-do assemble
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: Manuel L??pez-Ib????ez <lopezibanez at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 6 Nov 2006 13:59:20 +1100
- Subject: Re: differences between dg-do compile and dg-do assemble
- References: <6c33472e0611051852uabadbd2ga7298e6debd99c1b@mail.gmail.com>
> 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