pgfortran really doesn't understand allocatable scalars

TPR 24928 shows that pgfortran doesn’t like the allocatable statement for scalars. However, it seems pgfortran 17.10 has further issues when it comes to allocatable scalars. Consider the following programs

  integer, allocatable :: i

  integer, allocatable :: i

  character(:), allocatable :: x, y
  x = 'working'
  call move_alloc(x,y)
  if ('working') STOP

The first, compiled with -Mchkptr, complains about a null pointer. The second is not correctly rejected. The third does not have the allocation correctly moved.

The first is seemingly handled correctly with -Mallocatable=03, but this is perhaps inconsistent with how intrinsic assignment to allocatable arrays is handled and that there are no Fortran 95 semantics for allocatable scalars.

We have replicated your behavior and logged as TPR 25080.

We are currently trying to make -Mallocatable=03 the default
condition, but this means no errors in QA, along with performance
still being about the same.

Gfortran and ifort both have problems with your second example.