annotate gcc/testsuite/gcc.dg/cpp/mi1.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900 (2017-10-27)
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Test "ignore redundant include" facility.
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 We must test with C and C++ comments, and null directives, outside
kono
parents:
diff changeset
4 the guard conditional; also, we test guarding with #ifndef and #if
kono
parents:
diff changeset
5 !defined. -H is used because cpp might confuse the issue by
kono
parents:
diff changeset
6 optimizing out #line markers. This test only passes if each of the
kono
parents:
diff changeset
7 headers is read exactly once.
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 The disgusting regexp in the dg-error line, when stuck into
kono
parents:
diff changeset
10 dg.exp's compiler-output regexp, matches the correct -H output and
kono
parents:
diff changeset
11 only the correct -H output. It has to be all on one line because
kono
parents:
diff changeset
12 otherwise it will not be interpreted all in one unit. */
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 /* { dg-do compile }
kono
parents:
diff changeset
15 { dg-options "-H" }
kono
parents:
diff changeset
16 { dg-message "mi1c\.h\n\[^\n\]*mi1cc\.h\n\[^\n\]*mi1nd\.h\n\[^\n\]*mi1ndp\.h\n\[^\n\]*mi1x\.h" "redundant include check" { target *-*-* } 0 } */
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 #include "mi1c.h"
kono
parents:
diff changeset
19 #include "mi1c.h"
kono
parents:
diff changeset
20 #include "mi1c.h"
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 #include "mi1cc.h"
kono
parents:
diff changeset
23 #include "mi1cc.h"
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 #include "mi1nd.h"
kono
parents:
diff changeset
26 #include "mi1nd.h"
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 #include "mi1ndp.h"
kono
parents:
diff changeset
29 #include "mi1ndp.h"
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 #define MIX_H
kono
parents:
diff changeset
32 #include "mi1x.h"
kono
parents:
diff changeset
33 #include "mi1x.h"
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 int
kono
parents:
diff changeset
36 main (void)
kono
parents:
diff changeset
37 {
kono
parents:
diff changeset
38 return a + b + c + d;
kono
parents:
diff changeset
39 }