gcc/testsuite/gfortran.dg/unsigned_16.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-funsigned -pedantic" } |
| 3 | ! Some checks with -pedantic. |
| 4 | program main |
| 5 | unsigned :: u |
| 6 | print *,-129u_1 ! { dg-error "Negation of unsigned constant" } |
| 7 | print *,256u_1 ! { dg-error "Unsigned constant truncated" } |
| 8 | u = 1u |
| 9 | u = -u ! { dg-error "Negation of unsigned expression" } |
| 10 | end program |