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
/
torture
/
pr115961-run-1.C
blob
787f7245457da3cd3ec51ca88b9f3eaa0b3403aa
1
/* PR target/115961 */
2
/* { dg-do run } */
3
4
struct e
5
{
6
unsigned pre : 12;
7
unsigned a : 4;
8
};
9
10
static unsigned min_u (unsigned a, unsigned b)
11
{
12
return (b < a) ? b : a;
13
}
14
15
__attribute__((noipa))
16
void bug (e * v, unsigned def, unsigned use) {
17
e & defE = *v;
18
defE.a = min_u (use + 1, 0xf);
19
}
20
21
__attribute__((noipa, optimize(0)))
22
int main(void)
23
{
24
e v = { 0xded, 3 };
25
26
bug(&v, 32, 33);
27
28
if (v.a != 0xf)
29
__builtin_abort ();
30
31
return 0;
32
}