Daily bump.
[gcc.git] / gcc / testsuite / gcc.target / riscv / pr118146-2.c
bloba37158abc18fa190c5f03d22b5d9cc5d2ef640a9
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv64gcv -mabi=lp64d -std=gnu23 -O2" { target { rv64 } } } */
3 /* { dg-options "-march=rv32gcv -mabi=ilp32d -std=gnu23 -O2" { target { rv32 } } } */
5 long print_halffloat_j;
6 int *print_halffloat_block;
7 void ftoastr(float);
8 enum { BFLOATING_POINTvoid } print_halffloat() {
9 union {
10 _Float16 x;
11 char b[];
12 } u;
13 print_halffloat_j = 0;
14 for (; print_halffloat_j < sizeof(_Float16); print_halffloat_j++)
15 u.b[print_halffloat_j] = print_halffloat_block[print_halffloat_j];
16 ftoastr(u.x);