FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / gcc.dg / cpp / cmdlne-dD-dM.c
blob8a3fb346588aeada902e281782178ed8062e489b
1 /* Copyright (C) 2002 Free Software Foundation, Inc. */
3 /* { dg-do preprocess } */
4 /* { dg-options "-dD -dM" } */
6 /* Test -dD -dM does not fail. It should give the same output
7 as plain -dM. */
9 #define foo bar
10 #define funlike(like) fun like
11 int variable;
13 /* { dg-final { if ![file exists cmdlne-dD-dM.i] { return } } }
14 { dg-final { if { [grep cmdlne-dD-dM.i "^#define foo bar$"] == "" } { fail "cmdlne-dD-dM.c: #define line not printed" } } }
15 { dg-final { if { [grep cmdlne-dD-dM.i "variable"] != "" } { fail "cmdlne-dD-dM.c: non-#define line printed" } } }
16 { dg-final { return } } */