This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[testsuite] How to conditionally skip a single dejagnu directive
- From: Mikael Morin <mikael dot morin at sfr dot fr>
- To: gcc at gcc dot gnu dot org
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>
- Date: Sun, 22 Aug 2010 22:59:32 +0200
- Subject: [testsuite] How to conditionally skip a single dejagnu directive
Hello,
I have a runnable (fortran) test on which I want to check that a
conditional part is optimized away.
Here are the corresponding tree-dump directives :
! { dg-final { scan-tree-dump-times "_gfortran_abort" 32 "original" } }
! { dg-final { scan-tree-dump-times "_gfortran_abort" 30 "optimized" } }
This works, but as the fortran run test is a torture one (it tries
several optimization options), there is a single failure for the -O0
case (because there is no optimization).
I would like to skip the dg directive if the options match "-O0" but on
the tree dump only.
There is dg-skip-if, but it skips the whole test, and I don't want to
skip unrelated dg directives. Especially I don't want to skip the
testcase execution.
So, is there something existing to skip a single dump scan based on the
compilation options ?
Thanks in advance
Mikael