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
Daily bump.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wdangling-pointer-4.C
blob
7177a545970c4be2a76dca362c3bfd03c777d1b2
1
/* PR middle-end/104761 - bogus -Wdangling-pointer with cleanup and infinite loop
2
{ dg-do compile }
3
{ dg-options "-O -Wall -fno-exceptions" } */
4
5
struct S { int i; };
6
7
struct X { ~X (); };
8
9
void g (int);
10
11
void test (int i)
12
{
13
S s = { 0 };
14
15
X x;
16
17
if (i)
18
{
19
g (s.i); // { dg-bogus "-Wdangling-pointer" }
20
for ( ; ; );
21
}
22
}