Debian Codegraph @

gcc/testsuite/gcc.dg/pr114907.c

raw
1 /* PR middle-end/114907 */
2 /* { dg-do run } */
3 /* { dg-options "" } */
4 /* { dg-add-options float16 } */
5 /* { dg-require-effective-target float16_runtime } */
6 /* { dg-add-options bfloat16 } */
7 /* { dg-require-effective-target bfloat16_runtime } */
8
9 __attribute__((noipa)) _Float16
10 foo (__bf16 x)
11 {
12 return (_Float16) x;
13 }
14
15 __attribute__((noipa)) __bf16
16 bar (_Float16 x)
17 {
18 return (__bf16) x;
19 }
20
21 int
22 main ()
23 {
24 if (foo (11.125bf16) != 11.125f16
25 || bar (11.125f16) != 11.125bf16)
26 __builtin_abort ();
27 }