On May 23, 2013, at 2:08 PM, "Iyer, Balaji V" <balaji.v.i...@intel.com> wrote:
> If I put things in c-c++-common, how do I test the code with different flags 
> (I didn't see any .exp file there)? For example, how can I test if it works 
> with "-O2" and then have another test for "-O2 -g" etc.? Do I just use 
> multiple "dg-options" in my code? The way I have it right now, it uses 
> several flags, and tries them in different combinations. I am if this is a 
> trivial question, I am not very familiar with DejaGNU framework and I went 
> through GCC and DejaGNU manual a while back and I couldn't find an answer for 
> this.

If you have 30+ tests, I'd do a .exp file and a new subdirectory.  If you only 
plan to have a few, you can

test-1.c:
// option -O2

test-1g.c
// option -O2 -g
#include "test-1.c"

I'm not worried about a new subdirectory as much as others are; indeed, I think 
I prefer it.  I kinda like the idea that one can run cilkplus_AN_c_compile.exp 
and feature test the compiler.

Reply via email to