Skip to content

sizeof pointer to derive type #1020

@naromero77

Description

@naromero77

This compile-time error comes from a DOE science code. I suspect the problem is triggered by the intrinsic sizeof function operating on a pointer to a derived type.

home/naromero/mpich-3.3.2-test/bin/mpif90 -g -O3 -module-suffix .f18.mod  -fPIC -I/usr/include -D LIBRARY=1  -D  FFTW=1 -c -o src/parallelization/tiling/tiling.o src/parallelization/tiling/tiling.F90
src/parallelization/tiling/tiling.F90:1992:57: error: No explicit type declared for 'sizeof'

Here is the ling that it chokes on:

              local_part_tiles_mem=local_part_tiles_mem+SIZEOF(curr%part_x) 

and here is the declaration for the arguement:

    TYPE(particle_tile), POINTER :: curr

I am packaging up tiling.F90 along with the relevant modules.
sizeof_type_pointer.tar.gz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions