diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/cmdlne-dD-dM.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/cmdlne-dD-dM.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dD-dM.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dD-dM.c new file mode 100644 index 0000000..8a3fb34 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dD-dM.c @@ -0,0 +1,16 @@ +/* Copyright (C) 2002 Free Software Foundation, Inc. */ + +/* { dg-do preprocess } */ +/* { dg-options "-dD -dM" } */ + +/* Test -dD -dM does not fail. It should give the same output + as plain -dM. */ + +#define foo bar +#define funlike(like) fun like +int variable; + +/* { dg-final { if ![file exists cmdlne-dD-dM.i] { return } } } + { dg-final { if { [grep cmdlne-dD-dM.i "^#define foo bar$"] == "" } { fail "cmdlne-dD-dM.c: #define line not printed" } } } + { dg-final { if { [grep cmdlne-dD-dM.i "variable"] != "" } { fail "cmdlne-dD-dM.c: non-#define line printed" } } } + { dg-final { return } } */ |