This is the mail archive of the 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]

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


{ dg-do run targets1 }
{ dg-do compile targets2 }


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



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