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
/
analyzer
/
dyncast-1.C
blob
14acb91ffaa4189380e4991d849bd278799c9f0a
1
#include "../../gcc.dg/analyzer/analyzer-decls.h"
2
3
struct base
4
{
5
virtual ~base () {}
6
};
7
struct sub : public base
8
{
9
int m_field;
10
};
11
12
int
13
test_1 (base *p)
14
{
15
if (sub *q = dynamic_cast <sub*> (p))
16
{
17
__analyzer_dump_path (); // { dg-message "path" }
18
return q->m_field;
19
}
20
return 0;
21
}