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
PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
opt
/
reload2.C
blob
1af8aea6559b7907ceb1d696d38df8c4b1d9b2bf
1
// PR 10352
2
// { dg-do compile }
3
// { dg-options -O2 }
4
5
extern double fabs(double x);
6
7
typedef struct { float x, y; } S;
8
typedef struct _T T;
9
10
extern void fT( T *p );
11
extern T *h();
12
extern S g( );
13
14
static
15
int f(void)
16
{
17
T *t=0;
18
int c=0;
19
S s;
20
21
const S exp_s = {0.,0.};
22
23
if(!(t = h()))
24
{
25
c++;
26
}
27
28
if(!c)
29
{
30
s = g();
31
if( (fabs( (s.x) - (exp_s.x) ) > 1 )
32
|| (fabs( (s.y) - (exp_s.y) ) > 1 ) )
33
{
34
c++;
35
}
36
}
37
38
if(t)
39
fT(t);
40
41
return c;
42
}