This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/61960] internal compiler error: in gfc_conv_component_ref
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 02 Aug 2014 11:31:16 +0000
- Subject: [Bug fortran/61960] internal compiler error: in gfc_conv_component_ref
- Auto-submitted: auto-generated
- References: <bug-61960-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61960
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-08-02
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
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.