blob: caa89b55ce1b35c74b091ddcf8392c81d9a58b92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-optimized" } */
float
quantum_real(float _Complex a)
{
float *p = (float *) &a;
return p[0];
}
float
quantum_imag(float _Complex a)
{
float *p = (float *) &a;
return p[1];
}
float
quantum_foo(float _Complex a)
{
float *p = (float *) &a;
return p[2];
}
/* { dg-final { scan-tree-dump-times "REALPART_EXPR" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 1 "optimized" } } */
|