https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80668
Bug ID: 80668 Summary: wrong error message with -finit-derived Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: valeryweber at hotmail dot com Target Milestone: --- Dear All The following code is producing wrong error message with -finit-derived thanks v MODULE pw_hfx IMPLICIT NONE TYPE :: dist_t INTEGER :: TYPE,nblks_loc,nblks INTEGER,DIMENSION(:),POINTER :: dist END TYPE dist_t CONTAINS SUBROUTINE hfx_new() TYPE(dist_t) :: dist CALL release_dist(dist) END SUBROUTINE hfx_new SUBROUTINE release_dist(dist) TYPE(dist_t) :: dist END SUBROUTINE release_dist END MODULE pw_hfx gfortran-trunk -c -finit-derived -finit-integer=1234567890 -finit-logical=false -finit-real=snan pw_hfx.mod.F90 pw_hfx.mod.F90:5:41: INTEGER,DIMENSION(:),POINTER :: dist 1 Error: The element in the structure constructor at (1), for pointer component ‘dist’ should be a POINTER or a TARGET pw_hfx.mod.F90:5:41: INTEGER,DIMENSION(:),POINTER :: dist 1 Error: Pointer initialization target at (1) must have the SAVE attribute