repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wduplicated-cond1.C
blob
e85920aaedf3452ea85152224751714559e42501
1
// PR c++/94265
2
// { dg-do compile { target c++17 } }
3
// { dg-additional-options "-Wduplicated-cond" }
4
5
void
6
foo ()
7
{
8
if (int a = 0; a)
9
{ }
10
else if (a = 5; a) // { dg-message "previously used here" }
11
{ }
12
else if (; a) // { dg-warning "duplicated .if. condition" }
13
{ }
14
else if (int b = ++a; a)
15
{ }
16
}