From: Arnaud Charlet Date: Tue, 25 Apr 2017 12:44:16 +0000 (+0200) Subject: re PR ada/78845 (Inverse (Real_Matrix) result has wrong bounds) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9dd958d2d16fe7b6869392682e693a65bf1e26be;p=gcc.git re PR ada/78845 (Inverse (Real_Matrix) result has wrong bounds) PR ada/78845 * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1 set to A'First(2) and vice versa. From-SVN: r247214 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 1cb5c4d1329..3e6afcd1e9a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2017-04-25 Arnaud Charlet + + PR ada/78845 + + * a-ngcoar.adb, a-ngrear.adb (Inverse): call Unit_Matrix with First_1 + set to A'First(2) and vice versa. + 2017-04-25 Yannick Moy * freeze.adb (Freeze_Record_Type): Remove obsolete diff --git a/gcc/ada/a-ngcoar.adb b/gcc/ada/a-ngcoar.adb index e9b246574b8..bee1bc1fff9 100644 --- a/gcc/ada/a-ngcoar.adb +++ b/gcc/ada/a-ngcoar.adb @@ -1153,7 +1153,9 @@ package body Ada.Numerics.Generic_Complex_Arrays is ------------- function Inverse (A : Complex_Matrix) return Complex_Matrix is - (Solve (A, Unit_Matrix (Length (A)))); + (Solve (A, Unit_Matrix (Length (A), + First_1 => A'First (2), + First_2 => A'First (1)))); ------------- -- Modulus -- diff --git a/gcc/ada/a-ngrear.adb b/gcc/ada/a-ngrear.adb index c3b954ab512..64df675c1a0 100644 --- a/gcc/ada/a-ngrear.adb +++ b/gcc/ada/a-ngrear.adb @@ -499,7 +499,9 @@ package body Ada.Numerics.Generic_Real_Arrays is ------------- function Inverse (A : Real_Matrix) return Real_Matrix is - (Solve (A, Unit_Matrix (Length (A)))); + (Solve (A, Unit_Matrix (Length (A), + First_1 => A'First (2), + First_2 => A'First (1)))); ------------ -- Jacobi --