2 /* { dg-do compile } */
3 /* { dg-options "-Wall" } */
4 /* { dg-skip-if "PR67819" { *-*-* } } */
12 extern int foo (void);
17 if (n
== 1) /* { dg-message "previously used here" } */
21 else if (n
== 1) /* { dg-warning "duplicated .if. condition" } */
66 if (n
== 1) /* { dg-message "previously used here" } */
68 else if (n
== 1) /* { dg-warning "duplicated .if. condition" } */
77 if (n
== -10) /* { dg-message "previously used here" } */
79 else if (n
== -10) /* { dg-warning "duplicated .if. condition" } */
88 struct S
{ long p
, q
; };
93 if (!s
->p
) /* { dg-message "previously used here" } */
95 else if (!s
->p
) /* { dg-warning "duplicated .if. condition" } */
103 if (n
) /* { dg-message "previously used here" } */
105 else if (n
) /* { dg-warning "duplicated .if. condition" } */
107 else if (n
) /* { dg-warning "duplicated .if. condition" } */
109 else if (n
) /* { dg-warning "duplicated .if. condition" } */
111 else if (n
) /* { dg-warning "duplicated .if. condition" } */
113 else if (n
) /* { dg-warning "duplicated .if. condition" } */
115 else if (n
) /* { dg-warning "duplicated .if. condition" } */
117 else if (n
) /* { dg-warning "duplicated .if. condition" } */
125 if (n
== 0) /* { dg-message "previously used here" } */
127 else if (n
== 1) /* { dg-message "previously used here" } */
129 else if (n
== 2) /* { dg-message "previously used here" } */
131 else if (n
== 3) /* { dg-message "previously used here" } */
133 else if (n
== 4) /* { dg-message "previously used here" } */
135 else if (n
== 5) /* { dg-message "previously used here" } */
137 else if (n
== 6) /* { dg-message "previously used here" } */
139 else if (n
== 7) /* { dg-message "previously used here" } */
141 else if (n
== 0) /* { dg-warning "duplicated .if. condition" } */
143 else if (n
== 1) /* { dg-warning "duplicated .if. condition" } */
145 else if (n
== 2) /* { dg-warning "duplicated .if. condition" } */
147 else if (n
== 3) /* { dg-warning "duplicated .if. condition" } */
149 else if (n
== 4) /* { dg-warning "duplicated .if. condition" } */
151 else if (n
== 5) /* { dg-warning "duplicated .if. condition" } */
153 else if (n
== 6) /* { dg-warning "duplicated .if. condition" } */
155 else if (n
== 7) /* { dg-warning "duplicated .if. condition" } */
163 if (!b
) /* { dg-message "previously used here" } */
165 else if (!b
) /* { dg-warning "duplicated .if. condition" } */
172 fn9 (int i
, int j
, int k
)
174 if (i
> 0 && j
> 0 && k
> 0) /* { dg-message "previously used here" } */
177 if (i
> 0 && j
> 0 && k
> 0) /* { dg-warning "duplicated .if. condition" } */