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
/
Wtautological-compare4.C
blob
96308f49a429d181924304206fc4bc271d625ab5
1
// PR c++/116534
2
// { dg-do compile }
3
// { dg-options "-Wall" }
4
5
template <class A>
6
struct Test {
7
bool foo(unsigned x, unsigned y) {
8
bool test = &a[x] == &b[y];
9
return test;
10
}
11
unsigned *a;
12
unsigned *b;
13
};
14
15
void
16
g ()
17
{
18
Test<int> t;
19
t.foo (0u, 1u);
20
t.foo (0u, 0u);
21
}