blob: 01d1fd1195d10a9c0adfd46240088306400dce5d (
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
25
|
/* { 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" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
|