PR ada/54614
Backport from mainline
2012-10-01 Vincent Pucci <pucci@adacore.com>
* s-gearop.adb (Vector_Matrix_Product): Fix dimension check and index
of Left in S evaluation.
From-SVN: r194535
+2012-12-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/54614
+ Backport from mainline
+
+ 2012-10-01 Vincent Pucci <pucci@adacore.com>
+
+ * s-gearop.adb (Vector_Matrix_Product): Fix dimension check and index
+ of Left in S evaluation.
+
2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (variant_desc): Rename 'record' to 'new_type'.
R : Result_Vector (Right'Range (2));
begin
- if Left'Length /= Right'Length (2) then
+ if Left'Length /= Right'Length (1) then
raise Constraint_Error with
"incompatible dimensions in vector-matrix multiplication";
end if;
begin
for K in Right'Range (1) loop
- S := S + Left (J - Right'First (1) + Left'First) * Right (K, J);
+ S := S + Left (K - Right'First (1) + Left'First) * Right (K, J);
end loop;
R (J) := S;