This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Questions about the dg-do directive
- From: dominiq at lps dot ens dot fr (Dominique Dhumieres)
- To: gcc at gcc dot gnu dot org
- Cc: mikestump at comcast dot net, ro at CeBiTec dot Uni-Bielefeld dot DE, janisjo at codesourcery dot com
- Date: Tue, 16 Oct 2012 15:20:11 +0200
- Subject: Questions about the dg-do directive
These questions are motivated by the comments #4 to #15 of pr54407.
The bottom line is that
{ dg-do compile targets1 }
{ dg-do run targets2 }
behaves as
{dg-do run { targets1 targets2 } }
while
{ dg-do run targets1 }
{ dg-do compile targets2 }
as
{ dg-do compile { targets1 targets2 } }
(1) Is the above correct?
(2) If yes, is it a (undocumented) feature or a bug?
While looking at the gcc.dg files, I have seen several instances of
these constructs. While most of them lacks any target, then the
first line is probably ignored, the tests gcc.dg/vect/vect-(82|83)_64.c
use it in:
/* { dg-do run { target { { powerpc*-*-* && lp64 } && powerpc_altivec_ok } } } */
/* { dg-do compile { target { { powerpc*-*-* && ilp32 } && powerpc_altivec_ok } } } */
They do not seem to work as designed: the tests are not run on powerpc-apple-darwin9
with -m64.
(3) What should be done for that?
One way of doing a { dg-do run targets1 } and { dg-do compile targets2 } would
be to use the trick in gcc.dg/attr-weakref*, i.e., to duplicate the test, one
file to run and the other to only compile.
(4) Does it exists a better solution?
TIA
Dominique