-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 With gnat pro I have this output : gcc -c -gnat12 algo_2sat.adb algo_2sat.adb:10:32: subtype mark required in this context algo_2sat.adb:11:25: subtype mark required in this context
My gnatpro version : gcc -v <snip> gcc version 4.7.2 20120902 for GNAT Pro 7.1.0w (20120901) (GCC) So to me it seems a gnat-4.6/gcc-4.6 bug... Le 04/02/2013 10:59, David Starner a écrit : > Package: gnat-4.6 > Version: 4.6.3-8 > > When compiled with gnatmake -gnat12 algo_2sat.adb > > package body Algo_2SAT is > type Orientation is (Unused, Unnegated, Negated, Both); > procedure Monodirectional (P: in out Problem_2SAT) is > Count : array (1 .. Variable (100)) of Orientation := (others => > Unused); > C : Clause; > P_New : Problem_2SAT; > begin > for I in P.First_Index .. P.Last_Index loop > C := P.Element (I); > if Count (C.A_Var) in (Unnegated, Negated) or else Count > (C.B_Var) in (Unnegated, Negated) then > null; > else > P_New.Append (C); > end if; > end loop; > P := P_New; > end Monodirectional; > end Algo_2Sat; > with Ada.Containers.Vectors; > package Algo_2SAT is > type Variable is new Natural; > type Clause is record > A_Bool : Boolean; > A_Var : Variable; > B_Bool : Boolean; > B_Var : Variable; > end record; > package Problem_Container is new Ada.Containers.Vectors (Natural, Clause); > subtype Problem_2Sat is Problem_Container.Vector; > procedure Monodirectional (P : in out Problem_2SAT); > end Algo_2SAT; > > offers > > gcc-4.6 -c -gnat12 algo_2sat.adb > +===========================GNAT BUG DETECTED==============================+ > | 4.6.3 (x86_64-pc-linux-gnu) GCC error: | > | in gnat_to_gnu, at ada/gcc-interface/trans.c:4526 | > | Error detected at algo_2sat.adb:10:32 | > | Please submit a bug report; see http://gcc.gnu.org/bugs.html. | > | Use a subject line meaningful to you and us to track the bug. | > | Include the entire contents of this bug box in the report. | > | Include the exact gcc-4.6 or gnatmake command that you entered. | > | Also include sources listed below in gnatchop format | > | (concatenated together with no headers between files). | > +==========================================================================+ > > Please include these source files with error report > Note that list may not be accurate in some cases, > so please double check that the problem can still > be reproduced with the set of files listed. > Consider also -gnatd.n switch (see debug.adb). > > algo_2sat.adb > algo_2sat.ads > > compilation abandoned > gnatmake: "algo_2sat.adb" compilation error > > I would offer this upstream, but Debian's GNAT is a version behind. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBAgAGBQJRD7qJAAoJEG3iFwasTcfadbMQAJtlaGCWAfrLVyYJloVn45ap k0TAyKwXiwcwlWRGW6jhPGnI9W9oETk0jDbVVoZvRumm8CZhhpmmav21EYreLu3R y7idpIZIHtlX3ZNYq7BnOyFyQct0oJV2u/W5c2+8ImOP8JS9EsSr/DkWFknFw/Ci 56neN+c8L2NhCe1w5rzblIHL3xSYVmG8dJe/TmIKspaBfT4r5IEfg9rvSlaL6L8w UZqBQa3+4C9yAx10erH+udJtnW5j86GP/Tbtt9pwud2coMSakWjpNYVYmQ032Ii4 notRInXPwNoZvvTNIAZATij9QfM+NHbp0hlGJAExQkOAs4AxqUwT2E3bipGI64zI RzXJXQgAh/vVmp9Dm+kHZWFd6H0r0Mg06EFgVMhDlORyK28rbrg/A6y3gs7tkvcW pTNUfURBtRqtEBlpp5ltJaZ82Mcfw4MxNsd4s2Q2sROAab8LsVtdW7uuutoZrgS2 1SesphSnpfxuoJa/gynvupcR8eXMh93dD2r6+zjDdz+VPOGzAeWrT5gXiWMA9sBp nfxO88aLy39RoCEj1bqmXNwBQOQw5LAKVRmiRqnhrWbW4DR0/NCBCjTZIGlMnQFd 3sz8/IsfKeZiDzWAUtic58qBk7hjVo4i0Y7o/b9XFcfVZ0kq6jQ0iftEjkkj7n+l M8dvoVDx2nyLlov3Srwc =18eA -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/510fba8c.6020...@ipno.in2p3.fr