clang/test/Frontend/fixed_point_crash.c
raw| 1 | // RUN: %clang_cc1 -verify -ffixed-point %s |
| 2 | |
| 3 | union a { |
| 4 | _Accum x; |
| 5 | int i; |
| 6 | }; |
| 7 | |
| 8 | int fn1(void) { |
| 9 | union a m; |
| 10 | m.x = 5.6k; |
| 11 | return m.i; |
| 12 | } |
| 13 | |
| 14 | int fn2(void) { |
| 15 | union a m; |
| 16 | m.x = 7, 5.6k; // expected-warning {{expression result unused}} |
| 17 | return m.x, m.i; // expected-warning {{left operand of comma operator has no effect}} |
| 18 | } |
| 19 | |
| 20 | _Accum acc = (0.5r, 6.9k); // expected-warning {{left operand of comma operator has no effect}} |