repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git]
/
gcc
/
testsuite
/
c-c++-common
/
Wduplicated-branches-4.c
blob
79af549386636d55187c322eade7c82e7fb86dc6
1
/* PR c/64279 */
2
/* { dg-do compile } */
3
/* { dg-options "-Wduplicated-branches" } */
4
5
extern
int
*
g
;
6
extern
const int
*
q
;
7
8
void
9
f
(
int
i
)
10
{
11
int
j
;
12
13
if
(
i
==
0
)
14
for
(
j
=
0
;
j
<
10
;
j
++)
15
++*
g
;
16
else
17
for
(
j
=
0
;
j
<
10
;
j
++)
18
++*
g
;
19
20
if
(
i
==
1
)
21
{
22
int
i
=
10
;
23
*
g
=
i
;
24
}
25
else
26
{
27
int
i
=
10
;
28
*
g
=
i
;
29
}
30
31
if
(
i
==
3
)
32
q
= (
const int
[]){
1
};
33
else
34
q
= (
const int
[]){
1
};
35
}