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
/
ubsan
/
pr117259.C
blob
2b7ba56c2a3678b9887cdc75d7e3e01811d61619
1
// PR c++/117259
2
// { dg-do compile }
3
// { dg-options "-Wuninitialized -fsanitize=undefined" }
4
5
struct A { void foo () {} };
6
struct B { void (A::*b) (); B (void (A::*x) ()) : b(x) {}; };
7
const B c[1] = { &A::foo };
8
9
void
10
foo (A *x, int y)
11
{
12
(x->*c[y].b) ();
13
}