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
2014-04-07 Charles Baylis <charles.baylis@linaro.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
predcom-1.C
blob
9e9a4b38cfa9fc4f2a4d56d0cff46fc8e5b2b6ea
1
/* Test for ICE in predictive commoning with empty loop header block
2
on arm-none-linux-*. */
3
4
struct Foo
5
{
6
double *ptr;
7
8
Foo (double *ptr_)
9
: ptr (ptr_)
10
{
11
}
12
13
Foo PostInc ()
14
{
15
return Foo (ptr++);
16
}
17
};
18
19
bool Baz (Foo first, double *last)
20
{
21
Foo prev (first.ptr);
22
23
first.ptr++;
24
25
while (first.ptr != last)
26
if (*first.PostInc ().ptr < *prev.PostInc ().ptr)
27
return false;
28
}
29