https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82943
Alexander Westbrooks <ctechnodev at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ctechnodev at gmail dot com --- Comment #11 from Alexander Westbrooks <ctechnodev at gmail dot com> --- (In reply to vegard from comment #10) > (In reply to kargl from comment #9) > > (In reply to alig from comment #8) > > > The problem still persists with GNU Fortran (GCC) 11.1.0. > > > > The problem is likely to persist for the foreseeable future > > as there is no one left to work on gfortran bugs. Lacking > > a sudden influx of new volunteer contributors, it seems > > the only way forward is to NOT use parameterized derived > > types with gfortran. > > Any news here? I seem to be having this issue with gfortran (Homebrew GCC) > 12.2.0 > > As a side note: I'm somewhat new to the fortran community, but could see > myself contributing to gfortran in the future. Do you think you could point > me to where I should read up on contributing? Hello! I'm new to the community as well. I have had the same issue with this bug and first encountered it 5 years ago while working on my thesis. Two weeks ago I decided to tackle this bug. I have found the issues in the code, and I was able to successfully compiles the following example. I made sure that the LEN type parameter condition was enforced as ja...@gcc.gnu.org stated in Comment #6 and I used inheritance in this example to test the added logic to ensure that a PDT instance belonged to a PDT template. The only things I have left to do is write applicable test cases (which I haven't done before. I am learning how to use the DejaGNU framework as I work on this) and obtain some guidance on how to get this code verified by others and ultimately accepted as fixed code into the compiler. I am reading the documentation of the GNU Fortran rules and I hope to get the test cases completed and have the fix under review within the next couple of weeks. module testmod public :: foo type, public :: tough_lvl_0(a, b) integer, kind :: a = 1 integer, len :: b contains procedure :: foo end type type, public, EXTENDS(tough_lvl_0) :: tough_lvl_1 (c) integer, len :: c contains procedure :: bar end type type, public, EXTENDS(tough_lvl_1) :: tough_lvl_2 (d) integer, len :: d contains procedure :: foobar end type contains subroutine foo(this) class(tough_lvl_0(1,*)), intent(inout) :: this end subroutine subroutine bar(this) class(tough_lvl_1(1,*,*)), intent(inout) :: this end subroutine subroutine foobar(this) class(tough_lvl_2(1,*,*,*)), intent(inout) :: this end subroutine end module PROGRAM testprogram USE testmod TYPE(tough_lvl_0(1,5)) :: test_pdt_0 TYPE(tough_lvl_1(1,5,6)) :: test_pdt_1 TYPE(tough_lvl_2(1,5,6,7)) :: test_pdt_2 CALL test_pdt_0%foo() CALL test_pdt_1%foo() CALL test_pdt_1%bar() CALL test_pdt_2%foo() CALL test_pdt_2%bar() CALL test_pdt_2%foobar() END PROGRAM testprogram