2018-01-24 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / cpp / cmdlne-dM-M.c
blob0cd9011042a3f1827c8f91e436a8c39b0b95d9d7
1 /* Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc. */
3 /* { dg-do preprocess } */
4 /* { dg-options "-dM -M" } */
6 /* Test -dM -M does not fail. It should print both the
7 #define lines and a Makefile rule with dependencies. */
9 #define foo bar
10 #define funlike(like) fun like
11 int variable;
13 /* { dg-final { scan-file cmdlne-dM-M.i "(^|\\n)#define foo bar($|\\n)" } }
14 { dg-final { scan-file-not cmdlne-dM-M.i "variable" } }
15 { dg-final { scan-file cmdlne-dM-M.i "(^|\\n)cmdlne-dM-M\[^\\n\]*:( *\\\\\\n)?\[^\\n\]*cmdlne-dM-M.c"} } */