Nvfortran capability question

Current nvfortran version does not allow UNION/MAP -constructs within a TYPE-declaration. Is there any way?
On the other hand the “old” Fortran construct STRUCTURE allows this but it is not possible to declare a pointer variable for this derived type like
RECORD /anyname/, pointer :: myvar
Is there any way to do that?

I’m not aware of a way to do this. Especially for F90 pointers, where the descriptor is stored along with the data pointer in the derived type, that would lead to very brittle code.
The most dependable way I’ve found to do something like unions in Fortran now is to use Cray pointers. Most Fortran compilers support them. Still, the size of the derived type will vary from vendor to vendor, if it contains F90 pointers.

I am using Intel Fortrtan until now where the following works fine:
TYPE ROJECTION
UNION
MAP
REAL8 DAT_PAR(7)
END MAP
MAP
REAL
8 DAT_SHIFT(3)
REAL8 DAT_ROTATION(3)
REAL
8 DAT_SCALE
END MAP
END UNION
END TYPE ROJECTION

TYPE(PROJECTION), POINTER :: PROJ

ALLOCATE (PROJ)

Now I would like to use nvfortran for some reasons and I am searching for a solution for that since we have a lot of code where constructs like this were used.

Well, this took me back to the days with orange VAX Fortran manuals above my desk :)

nvfortran does not support union and map within a derived type definition. It does support the VAX way, which is to put them within a structure. So, I think you have a few options, but all will require code modifications. Here are some ideas, this code compiles and runs with nvfortran.

module m
structure /srojection/
UNION
MAP
REAL(8) DAT_PAR(7)
END MAP
MAP
REAL(8) DAT_SHIFT(3)
REAL(8) DAT_ROTATION(3)
REAL(8) DAT_SCALE
END MAP
END UNION
end structure
type projection
REAL(8) DAT_SHIFT(3)
REAL(8) DAT_ROTATION(3)
REAL(8) DAT_SCALE
end type
type projection2
REAL(8) DAT_PAR(7)
end type
type projection3
record /srojection/ p
end type
end module

program t
use m
type(projection), pointer :: proj
type(projection2) :: proj2(*)
type(projection3), pointer :: proj3
pointer(pproj, proj2)
allocate (proj)
pproj = loc(proj)
proj%dat_shift = 1.0d0
proj%dat_rotation = 2.0d0
proj%dat_scale = 3.0d0
print *,proj2(1)%dat_par
allocate (proj3)
proj3 = transfer(proj,proj3)
print *,proj3%p.dat_par
end program

The roots of the software are really from the VAX-days.
Unfortunately no pointer-attribute is possible to a STRUCTURE and no UNION is possible in a TYPE-construct.
Your suggested solution is a workaround.
Thank you.