Ture-Andersens-dator:~/Documents/Privat/programutveckling/ada/sudoku ture$ gnatmake sudoku gcc -c elements-sets.adb +===========================GNAT BUG DETECTED==============================+ | 3.3 20040913 (GNAT for Mac OS X build 1650) (powerpc-unknown-darwin) | | Gigi abort, Code=508 | | Error detected at elements-sets.adb:95:21 | | Please submit a bug report; see http://gcc.gnu.org/bugs.html. | | Include the entire contents of this bug box in the report. | | Include the exact gcc 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 elements-sets.adb elements-sets.ads elements.ads compilation abandoned gnatmake: "elements-sets.adb" compilation error -------------------------------------------------------------------------------- -- * Body name elements.sets.adb -- * Project name sudoku -- * -- * Version 1.0 -- * Last update 2005-11-06 -- * -- * Created by Ture Andersen on 2005-11-06. -- * Copyright (c) 2005 __MyCompanyName__. -- * GNAT modified GNU General Public License -- * -------------------------------------------------------------------------------- with ada.text_io; use ada.text_io; with ada.unchecked_conversion; package body elements.sets is function member (e : element; s : set) return boolean is begin return (set_of (e) and s) > null_set; end; function member (e : element; s : set) return Natural is c : constant array (boolean) of natural := (false => 0, true => 1); begin return c (member (e, s)); end; function cardinality (s : set) return natural is C : natural := 0; begin for e in element loop c := c + member (e, s); end loop; return c; end cardinality; function empty_set (s : set) return boolean is begin return s = null_set; end empty_set; function set_of (m : element) return set is function uc is new ada.unchecked_conversion (Source => element, Target => set); begin return uc (m); end set_of; function union (l, r : element) return set is begin return set_of (l) or set_of (r); end union; function union (L : element; R : set) return set is begin return set_of (L) or R; end union; function union (L : set; R : element) return set is begin return L or set_of (R); end; function union (L, R : set) return set is begin return L or R; end; function disjoint (l, r : set) return boolean is begin return (l and r) = null_set; end disjoint; function proper_subset (subset, the_set : set) return boolean is begin return ((subset and the_set) = subset) and then (subset < the_set); end proper_subset; function improper_subset (subset, the_set : set) return boolean is begin return (subset and the_set) = subset; end improper_subset; function intersection (l, r : set) return set is begin return l and r; end; function complement (s : set) return set is begin return (not s) and universal_set; end complement; function difference (l, r : set) return set is begin return l - (l and r); end difference; function image (s : set) return string is i : string (int (one) .. int (nine)) := (others => ' '); begin for m in element loop if (set_of (m) and s) > 0 then i (int (m)) := image (m); end if; end loop; return i; end image; end elements.sets; -------------------------------------------------------------------------------- -- * Spec. name elements.sets.ads -- * Project name sudoku -- * -- * Version 1.0 -- * Last update 2005-11-06 -- * -- * Created by Ture Andersen on 2005-11-06. -- * Copyright (c) 2005 __MyCompanyName__. -- * All rights reserved. -- * or (keep only one line or write your own) -- * GNAT modified GNU General Public License -- * -------------------------------------------------------------------------------- package elements.sets is type set is private; null_set : constant set; universal_set : constant set; function set_of (m : element) return set; function image (s : set) return string; function union (l, r : element) return set; function "+" (l, r : element) return set renames union; function union (L : element; R : set) return set; function "+" (L : element; R : set) return set renames union; function union (L : set; R : element) return set; function "+" (L : set; R : element) return set renames union; function union (L, R : set) return set; function "+" (L, R : set) return set renames union; function member (e : element; s : set) return boolean; function member (e : element; s : set) return Natural; function empty_set (s : set) return boolean; function disjoint (l, r : set) return boolean; function proper_subset (subset, the_set : set) return boolean; function improper_subset (subset, the_set : set) return boolean; function intersection (l, r : set) return set; function "&" (l, r : set) return set renames intersection; function complement (s : set) return set; function difference (l, r : set) return set; function "-" (l, r : set) return set renames difference; private type set is mod 2 ** 16 - 1; for set'size use 16; null_set : constant set := 0; universal_set : constant set := 16#1ff#; end elements.sets; -------------------------------------------------------------------------------- -- * Spec name elements.ads -- * Project name sudoku -- * -- * Version 1.0 -- * Last update 2005-11-05 -- * -- * Created by Ture Andersen on 2005-11-05. -- * Copyright (c) 2005 __MyCompanyName__. -- * GNAT modified GNU General Public License -- * -------------------------------------------------------------------------------- package elements is type element is (one, two, three, four, five, six, seven, eight, nine); for element use (one => 1, two => 2, three => 4, four => 8, five => 16, six => 32, seven => 64, eight => 128, nine => 256); for element'size use 16; function image (m : element) return character; function int (m : element) return integer; end elements; Ture Andersen Zenon AB besöksadress Turebergs Torg 1 postadress 191 47 SOLLENTUNA direkt 08 623 33 62 mobil 070 727 70 10 fax 08 35 02 90 www.zenon.se [EMAIL PROTECTED] -- Summary: Gigi abort, Code=508 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ture dot andersen at zenon dot se http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24726