[testsuite] How to conditionally skip a single dejagnu directive

Mikael Morin mikael.morin@sfr.fr
Sun Aug 22 17:02:00 GMT 2010


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



More information about the Fortran mailing list