This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/39304] ICE with MATMUL, specific/generic functions and rank checking
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Mar 2009 14:19:21 -0000
- Subject: [Bug fortran/39304] ICE with MATMUL, specific/generic functions and rank checking
- References: <bug-39304-17365@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pault at gcc dot gnu dot org 2009-03-13 14:19 -------
(In reply to comment #5)
I think that the starting point should be a still further reduced testcase;
remove the function matmul_k21, or rename the module function SD to SD0 for
example, and you will get a segfault instead. This comes about because:
MODULE deriv_class
....snip....
TYPE func
REAL :: value, x(n), xx(n*(n+1)/2)
END TYPE func
....snip....
FUNCTION SD_matrix_one(x, i) RESULT (res)
TYPE (func), DIMENSION (:, :), INTENT (in), TARGET :: x
INTEGER, INTENT (in) :: i
REAL , DIMENSION (:, :), POINTER :: res
res => x%xx(i)
END FUNCTION SD_matrix_one
....snip....
END MODULE deriv_class
The result is a real pointer to the component of an array of derived types.
Sorry guys but we do not do that right now. It's one of the targets of array
descriptor reform.
Cheers
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39304