From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68774 invoked by alias); 17 Dec 2016 09:48:58 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 68755 invoked by uid 89); 17 Dec 2016 09:48:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*m:4320, H*MI:A6F6, Simon, H*MI:4320 X-HELO: smtp.hosts.co.uk Received: from smtp.hosts.co.uk (HELO smtp.hosts.co.uk) (85.233.160.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 17 Dec 2016 09:48:47 +0000 Received: from [81.159.222.217] (helo=[192.168.1.99]) by smtp.hosts.co.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1cIBbh-0003xy-AX for gcc-patches@gcc.gnu.org; Sat, 17 Dec 2016 09:48:45 +0000 From: Simon Wright Content-Type: multipart/mixed; boundary="Apple-Mail=_0ECB7A43-4C3E-4594-AE34-8E75BB08234C" Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: [Ada] Fix PR ada/78845 Message-Id: <879A0A7D-106A-4320-A6F6-0433CEAC1CA7@pushface.org> Date: Sat, 17 Dec 2016 11:10:00 -0000 To: gcc-patches@gcc.gnu.org X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg01543.txt.bz2 --Apple-Mail=_0ECB7A43-4C3E-4594-AE34-8E75BB08234C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Content-length: 550 The function Ada.Numerics.Generic_Real_Arrays.Inverse is required (ARM G.3.= 1(72)) to return a matrix with the bounds of the dimension indices swapped,= i.e. result'Range(1) =3D=3D input'Range(2) and vice versa. The present cod= e gets result'Range(1) correct, but result'Range(2) always starts at 1. Of course, many users would always use ranges starting at 1 and wouldn't se= e a problem. 2016-12-17 Simon Wright PR ada/78845 * a-ngrear.adb (Inverse): call Unit_Matrix with First_1 set to A'First(2) and vice versa. --Apple-Mail=_0ECB7A43-4C3E-4594-AE34-8E75BB08234C Content-Disposition: attachment; filename=a-ngrear.adb.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="a-ngrear.adb.diff" Content-Transfer-Encoding: 7bit Content-length: 446 --- a-ngrear.adb-orig 2012-03-07 14:45:51.000000000 +0000 +++ a-ngrear.adb 2016-12-17 09:15:02.000000000 +0000 @@ -498,7 +498,9 @@ ------------- 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 -- --Apple-Mail=_0ECB7A43-4C3E-4594-AE34-8E75BB08234C--