public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/24726] New: Gigi abort, Code=508
@ 2005-11-07 23:27 ture dot andersen at zenon dot se
2005-11-08 0:09 ` [Bug ada/24726] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: ture dot andersen at zenon dot se @ 2005-11-07 23:27 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 7386 bytes --]
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
ture.andersen@zenon.se
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/24726] Gigi abort, Code=508
2005-11-07 23:27 [Bug ada/24726] New: Gigi abort, Code=508 ture dot andersen at zenon dot se
@ 2005-11-08 0:09 ` pinskia at gcc dot gnu dot org
2005-11-08 21:58 ` laurent at guerby dot net
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-08 0:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-08 00:09 -------
*** Bug 24725 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24726
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/24726] Gigi abort, Code=508
2005-11-07 23:27 [Bug ada/24726] New: Gigi abort, Code=508 ture dot andersen at zenon dot se
2005-11-08 0:09 ` [Bug ada/24726] " pinskia at gcc dot gnu dot org
@ 2005-11-08 21:58 ` laurent at guerby dot net
2006-03-19 7:18 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: laurent at guerby dot net @ 2005-11-08 21:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from laurent at guerby dot net 2005-11-08 21:58 -------
Confirmed on 4.0.2 and 4.1.
+===========================GNAT BUG DETECTED==============================+
| 4.0.2 (i686-pc-linux-gnu) in build_unary_op, at ada/utils2.c:1056 |
| Error detected at elements-sets.adb:95:21 |
+===========================GNAT BUG DETECTED==============================+
| 4.1.0 20051106 (experimental) (i686-pc-linux-gnu) GCC error: |
| in build_unary_op, at ada/utils2.c:1059 |
| Error detected at elements-sets.adb:95:21 |
But note that replacing in elements-sets.ads:
type set is mod 2 ** 16 -1;
by
type set is mod 2 ** 16;
makes the bug go away, and I believe it's likely a coding error to use a non
power of two as modulus here, no?
--
laurent at guerby dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-11-08 21:58:30
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24726
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/24726] Gigi abort, Code=508
2005-11-07 23:27 [Bug ada/24726] New: Gigi abort, Code=508 ture dot andersen at zenon dot se
2005-11-08 0:09 ` [Bug ada/24726] " pinskia at gcc dot gnu dot org
2005-11-08 21:58 ` laurent at guerby dot net
@ 2006-03-19 7:18 ` pinskia at gcc dot gnu dot org
2006-10-20 17:01 ` jeff at thecreems dot com
2007-05-02 14:56 ` charlet at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-19 7:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-03-19 07:18 -------
Reduced testcase:
package body sets is
function complement (s : set) return set is begin
return (not s);
end complement;
end sets;
package sets is
type set is private;
function complement (s : set) return set;
private
type set is mod 2 ** 16 - 1;
end sets;
----------
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24726
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/24726] Gigi abort, Code=508
2005-11-07 23:27 [Bug ada/24726] New: Gigi abort, Code=508 ture dot andersen at zenon dot se
` (2 preceding siblings ...)
2006-03-19 7:18 ` pinskia at gcc dot gnu dot org
@ 2006-10-20 17:01 ` jeff at thecreems dot com
2007-05-02 14:56 ` charlet at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: jeff at thecreems dot com @ 2006-10-20 17:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jeff at thecreems dot com 2006-10-20 17:01 -------
Seems fixed in trunk
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --disable-checking
--enable-languages=c,fortran,ada --prefix=/home/jcreem/local
Thread model: posix
gcc version 4.2.0 20061020 (experimental)
[jcreem@timone bg]$ gcc -c elements-sets.adb
[jcreem@timone bg]$
--
jeff at thecreems dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jeff at thecreems dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24726
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/24726] Gigi abort, Code=508
2005-11-07 23:27 [Bug ada/24726] New: Gigi abort, Code=508 ture dot andersen at zenon dot se
` (3 preceding siblings ...)
2006-10-20 17:01 ` jeff at thecreems dot com
@ 2007-05-02 14:56 ` charlet at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: charlet at gcc dot gnu dot org @ 2007-05-02 14:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from charlet at gcc dot gnu dot org 2007-05-02 15:56 -------
Fixed, so closing.
--
charlet at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24726
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-05-02 14:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-07 23:27 [Bug ada/24726] New: Gigi abort, Code=508 ture dot andersen at zenon dot se
2005-11-08 0:09 ` [Bug ada/24726] " pinskia at gcc dot gnu dot org
2005-11-08 21:58 ` laurent at guerby dot net
2006-03-19 7:18 ` pinskia at gcc dot gnu dot org
2006-10-20 17:01 ` jeff at thecreems dot com
2007-05-02 14:56 ` charlet at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).