This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/43996] ICE in simplification of spread intrinsic
- From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 May 2010 10:00:41 -0000
- Subject: [Bug fortran/43996] ICE in simplification of spread intrinsic
- References: <bug-43996-12313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from dfranke at gcc dot gnu dot org 2010-05-06 10:00 -------
(In reply to comment #9)
> It looks like cubic time in N.
http://en.wikipedia.org/wiki/Matrix_multiplication#Algorithms_for_efficient_matrix_multiplication:
"The running time of square matrix multiplication, if carried out naively, is
O(n^3). The running time for multiplying rectangular matrices (one m x p-matrix
with one p x n-matrix) is O(mnp)"
Better algorithms than the one implemented exist.
> > unconditionally returning NULL in MATMUL: ...
>
> I cannot reproduce that, am I correct to understand that you used some patched
> gfortran?
Index: simplify.c
===================================================================
--- simplify.c (revision 159089)
+++ simplify.c (working copy)
@@ -3294,6 +3294,8 @@ gfc_simplify_matmul (gfc_expr *matrix_a,
int row, result_rows, col, result_columns;
int stride_a, offset_a, stride_b, offset_b;
+ return NULL;
+
if (!is_constant_array_expr (matrix_a)
|| !is_constant_array_expr (matrix_b))
return NULL;
> Apparently, all the intrinsics should be audited for this kind of problem.
Transformational intrinsics that return an arrays, to begin with.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43996