Debian Codegraph @

gcc/testsuite/g++.target/aarch64/complex-init.C

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3 /* { dg-final { check-function-bodies "**" "" "" { target { le } } } } */
4
5 /*
6 ** _Z1fii:
7 ** ...
8 ** bfi x0, x1, 32, 32
9 ** ret
10 */
11 _Complex int f(int a, int b) {
12 _Complex int t = a + b * 1i;
13 return t;
14 }
15
16 /*
17 ** _Z2f2ii:
18 ** ...
19 ** bfi x0, x1, 32, 32
20 ** ret
21 */
22 _Complex int f2(int a, int b) {
23 _Complex int t = {a, b};
24 return t;
25 }
26
27 /*
28 ** _Z12f_convolutedii:
29 ** ...
30 ** bfi x0, x1, 32, 32
31 ** ret
32 */
33 _Complex int f_convoluted(int a, int b) {
34 _Complex int t = (_Complex int)a;
35 __imag__ t = b;
36 return t;
37 }