Created attachment 33210 [details] directory containing source to reproduce, and output of compiler When compiling, the compiler crashes with the following error: internal compiler error: in gfc_conv_component_ref, at fortran/trans-expr.c:1574 Compiler command & options: gfortran -v -save-temps -O2 -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations -g -Wall -Wextra -c data_func_mod.f90 refactored_func.f90 Detail and source code can be found in the file 'output.txt' that is included in the gzipped tar file. The OS is: Linux version 2.6.32-358.el6.x86_64 (mockbuild@x86-022.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Tue Jan 29 11:47:41 EST 2013 However, the crash can be reproduced with GCC 4.7.2 on the same system, and 4.8.2-19ubuntu1 on: Linux version 3.13.0-32-generic (buildd@roseapple) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #57-Ubuntu SMP Tue Jul 15 03:51:12 UTC 2014 Best, -gjb-
Reduced test module data_func_mod implicit none integer, parameter :: sp = 4 type :: data_type real(kind=sp), pointer, dimension(:, :) :: data => null() integer :: nr_rows = 0, nr_cols = 0 end type data_type contains function get_row(this, i) result(row) implicit none type(data_type), intent(in) :: this integer, intent(in) :: i real(kind=sp), dimension(this%nr_cols) :: row row = this%data(:, i) end function get_row subroutine print_matrix(m) implicit none class(data_type), intent(in) :: m integer :: i character(len=20) :: fmt_str write (unit=6, fmt=fmt_str) get_row(m, 1) end subroutine print_matrix end module data_func_mod Before revision r182107 (2011-12-08) compiling the test gave the error pr61960_red.f90:24.48: write (unit=6, fmt=fmt_str) get_row(m, 1) 1 Error: Type mismatch in argument 'this' at (1); passed CLASS(data_type) to TYPE(data_type) At revision r183001 (2012-01-09) the original and the reduced tests compile up to revision r183968 (2012-02-03). From revision r184278 (2012-02-15) up to trunk the compilation gives an ICE in trans-expr.c.
Author: edlinger Date: Sun Feb 22 19:38:53 2015 New Revision: 220899 URL: https://gcc.gnu.org/viewcvs?rev=220899&root=gcc&view=rev Log: 2015-02-22 Bernd Edlinger <bernd.edlinger@hotmail.de> PR fortran/64980 PR fortran/61960 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping for component references to class objects. (gfc_conv_procedure_call): Compare the class by name. testsuite: 2015-02-22 Bernd Edlinger <bernd.edlinger@hotmail.de> PR fortran/64980 PR fortran/61960 * gfortran.dg/pr61960.f90: New. * gfortran.dg/pr64230.f90: New. * gfortran.dg/pr64980.f03: New. Added: trunk/gcc/testsuite/gfortran.dg/pr61960.f90 trunk/gcc/testsuite/gfortran.dg/pr64230.f90 trunk/gcc/testsuite/gfortran.dg/pr64980.f03 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog
Is not this PR fixed by revision r220899?
> Is not this PR fixed by revision r220899? PING! Without answer I'll close this PR as FIXED.
Dear, Sorry, this is too long ago, I've lost the context of this. I guess it is okay to consider the issue solved. Thanks, best regards, -gjb- On Sun, Aug 30, 2015 at 5:28 PM, dominiq at lps dot ens.fr < gcc-bugzilla@gcc.gnu.org> wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61960 > > --- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- > > Is not this PR fixed by revision r220899? > > PING! Without answer I'll close this PR as FIXED. > > -- > You are receiving this mail because: > You reported the bug. >
> I guess it is okay to consider the issue solved. So closing as FIXED.