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
/
g++.dg
/
tree-ssa
/
pr54515.C
blob
11ed46893bf9890d4a1be03f24f2d7287136a320
1
// { dg-do compile }
2
// { dg-options "-O2" }
3
4
template < typename T > T h2le (T)
5
{
6
T a;
7
unsigned short &b = a;
8
short c = 0;
9
unsigned char (&d)[2] = reinterpret_cast < unsigned char (&)[2] > (c);
10
unsigned char (&e)[2] = reinterpret_cast < unsigned char (&)[2] > (b);
11
e[0] = d[0];
12
return a;
13
}
14
15
void
16
bar ()
17
{
18
h2le ((unsigned short) 0);
19
}