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
2018-10-23 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
tree-ssa
/
pr66726.C
blob
fb103cd0ad0733d544c2d785cd92412bf86b5548
1
/* { dg-do run } */
2
/* { dg-options "-O2" } */
3
4
/* Execution test for converting VIEW_CONVERT_EXPR. */
5
6
struct cpp_num {
7
bool f;
8
};
9
10
extern cpp_num __attribute__((noinline))
11
foo (cpp_num lhs,
12
cpp_num rhs)
13
{
14
lhs.f = lhs.f || rhs.f;
15
return lhs;
16
}
17
18
cpp_num lhs, rhs, r;
19
20
int main ()
21
{
22
23
lhs.f = false;
24
rhs.f = false;
25
r = foo (lhs, rhs);
26
if (r.f)
27
__builtin_abort ();
28
29
30
lhs.f = false;
31
rhs.f = true;
32
r = foo (lhs, rhs);
33
if (!r.f)
34
__builtin_abort ();
35
}