[MacPorts] #47332: gcc46 @4.6.4_7 gfortran internal compiler error related to procedure pointers
#47332: gcc46 @4.6.4_7 gfortran internal compiler error related to procedure pointers ----------------------+-------------------------------- Reporter: wyeast@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Keywords: | Port: gcc46 gcc47 gcc48 ----------------------+-------------------------------- When compiling with gfortran I get an internal compiler error when compiling code that allocates a derived type that includes a function (procedure) pointer which returns an array. I see the same error with all of the following ports: gcc46 @4.6.4_7, gcc47 @4.7.4_3, and gcc48 @4.8.4_0. I am using a 10.6.8 Mac, but a coworker sees the same error with 10.9.5 (and gcc46 @4.6.4_7). The same code compiles fine with the same versions of gfortran listed above on Ubuntu and Homebrew. Removing the array from being the return argument (e.g., making it an output argument) makes the error go away. The specific error is: {{{ decomp.F: In function 'decomp_register_method': decomp.F:27:0: internal compiler error: in gfc_conv_descriptor_data_set, at fortran/trans-array.c:171 Please submit a full bug report, with preprocessed source if appropriate. See <https://trac.macports.org/newticket> for instructions. }}} A minimal piece of code that can reproduce the bug is: {{{ module decomp implicit none abstract interface function decomp_function(input) result(output) integer, intent(in) :: input integer, dimension(:), pointer :: output end function end interface type decomp_list procedure (decomp_function), pointer, nopass :: decompFunc => null() end type decomp_list type (decomp_list), save, pointer :: decompositions => null() contains subroutine decomp_register_method(decompList, decompFunc) type (decomp_list), pointer :: decompList procedure (decomp_function), pointer :: decompFunc type (decomp_list), pointer :: decompCursor allocate(decompCursor ) decompCursor % decompFunc => decompFunc end subroutine decomp_register_method end module decomp }}} and can be compiled with "gfortran -ffree-form -c decomp.F" (assuming it's named decomp.F). A diff that will allow the code to compile is: {{{ @@ -4,9 +4,10 @@ module decomp implicit none abstract interface - function decomp_function(input) result(output) + function decomp_function(input, output) result(ierr) integer, intent(in) :: input - integer, dimension(:), pointer :: output + integer, dimension(:), pointer :: output + integer :: ierr end function end interface }}} -- Ticket URL: <https://trac.macports.org/ticket/47332> MacPorts <https://www.macports.org/> Ports system for OS X
#47332: gcc46 @4.6.4_7 gfortran internal compiler error related to procedure pointers --------------------------------+------------------- Reporter: wyeast@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: gcc46 gcc47 gcc48 | --------------------------------+------------------- Changes (by larryv@…): * owner: macports-tickets@… => mww@… * cc: larryv@… (added) Comment: I can reproduce this on Yosemite (but not with GNU Fortran 4.8, oddly). {{{ % port installed gcc4{5..9} The following ports are currently installed: gcc45 @4.5.4_11+universal (active) gcc46 @4.6.4_7+universal (active) gcc47 @4.7.4_3+universal (active) gcc48 @4.8.4_0+universal (active) gcc49 @4.9.2_1+universal (active) % gfortran-mp-4.5 -ffree-form -c decomp.F decomp.F: In function 'decomp_register_method': decomp.F:26:0: internal compiler error: in gfc_conv_descriptor_data_set, at fortran/trans-array.c:172 Please submit a full bug report, with preprocessed source if appropriate. See <https://trac.macports.org/newticket> for instructions. % gfortran-mp-4.6 -ffree-form -c decomp.F decomp.F: In function 'decomp_register_method': decomp.F:26:0: internal compiler error: in gfc_conv_descriptor_data_set, at fortran/trans-array.c:171 Please submit a full bug report, with preprocessed source if appropriate. See <https://trac.macports.org/newticket> for instructions. % gfortran-mp-4.7 -ffree-form -c decomp.F decomp.F: In function 'decomp_register_method': decomp.F:26:0: internal compiler error: in gfc_conv_descriptor_data_set, at fortran/trans-array.c:173 Please submit a full bug report, with preprocessed source if appropriate. See <https://trac.macports.org/newticket> for instructions. % gfortran-mp-4.8 -ffree-form -c decomp.F % gfortran-mp-4.9 -ffree-form -c decomp.F % }}} -- Ticket URL: <https://trac.macports.org/ticket/47332#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts