gcc/testsuite/gfortran.dg/pr101329.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! PR fortran/101329 - ICE: Invalid expression in gfc_element_size |
| 3 | |
| 4 | program p |
| 5 | use iso_c_binding |
| 6 | implicit none |
| 7 | integer(c_int), pointer :: ip4 |
| 8 | integer(c_int64_t), pointer :: ip8 |
| 9 | print *, c_sizeof (c_null_ptr) ! valid |
| 10 | print *, c_sizeof (null ()) ! { dg-error "is not interoperable" } |
| 11 | print *, c_sizeof (null (ip4)) ! valid |
| 12 | print *, c_sizeof (null (ip8)) ! valid |
| 13 | end |