This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/39304] ICE with MATMUL, specific/generic functions and rank checking



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]