Created attachment 28212 [details] Reproducer At GCC 4.7.0 (and in SVN r191415) System.Generic_Array_Operations.Vector_Matrix_Product returns the wrong result. The attached code should output ** V*M : 3010.0 4020.0 but in fact outputs ** V*M : 40.0 6000.0 I've also attached a patch for GCC 4.7.0.
Created attachment 28213 [details] Proposed patch for 4.7.0 code
Thanks for the report and the patch.
Author: ebotcazou Date: Sun Dec 16 10:40:32 2012 New Revision: 194534 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194534 Log: 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. Modified: branches/gcc-4_7-branch/gcc/ada/ChangeLog branches/gcc-4_7-branch/gcc/ada/s-gearop.adb
Author: ebotcazou Date: Sun Dec 16 10:45:12 2012 New Revision: 194535 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194535 Log: 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. Modified: branches/gcc-4_6-branch/gcc/ada/ChangeLog branches/gcc-4_6-branch/gcc/ada/s-gearop.adb
Fixed on all active branches.