This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/19519] New: GNAT Bug Box when reading a program with UTF-8 encoded enumeration literals
- From: "bauhaus at futureapps dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2005 00:14:43 -0000
- Subject: [Bug ada/19519] New: GNAT Bug Box when reading a program with UTF-8 encoded enumeration literals
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following program triggers the bug box when
encoded as UTF-8.
It runs fine when used with Latin-1
characters. The compiler can test the robustness of your system
if you use iconv to encode the source text in EUC-JP
and then try to compile with -gnatiw -gnatWe. (I guess
that the characters below aren't used very frequently in
EUC-JP coded Ada source but still something seems to
be looping and consuming lots of memory in this case.)
with Ada.Text_IO; use Ada.Text_IO;
--with Ada.Wide_Text_IO; use Ada.Wide_Text_IO; -- same effect
procedure oeaeue is
type People is (Späherin, -- a umlaut
-- Pförtner, -- o umlaut
-- Schüler, -- u umlaut
-- SpieÃ?, -- sharp s
Jedermann
);
package People_IO is new Enumeration_IO(People);
begin
for p in People'range loop
People_IO.put(p);
new_line;
end loop;
end oeaeue;
cd /tmp/
gnatmake -gnatiw -gnatW8 oeaeue.adb
gcc-3.4 -c -gnatiw -gnatW8 oeaeue.adb
+===========================GNAT BUG DETECTED==============================+
| 3.4.2 (Debian 3.4.2-2) (i486-pc-linux-gnu) Constraint_Error s-wchcnv.adb:150
explicit raise|
| Error detected at oeaeue.adb:13:4 |
| 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-3.4 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.
oeaeue.adb
list may be incomplete
compilation abandoned
gnatmake: "oeaeue.adb" compilation error
Compilation exited abnormally with code 4 at Wed Jan 19 01:02:43
I've got the same results using GNAT 3.15p,
and GNAT 4.0.0. (20041203)
Linux strudel 2.4.18 #1 Fri May 2 17:22:29 CEST 2003 i686 GNU/Linux
--
Summary: GNAT Bug Box when reading a program with UTF-8 encoded
enumeration literals
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bauhaus at futureapps dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19519