public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/115507] New: 'Wide_Wide_Value failed for unicode strings
@ 2024-06-16 0:57 dramwang at 163 dot com
2024-06-18 22:13 ` [Bug ada/115507] bogus Constraint_Error for Wide_Wide_Value with wide enumeration literal ebotcazou at gcc dot gnu.org
2024-06-19 7:28 ` ebotcazou at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: dramwang at 163 dot com @ 2024-06-16 0:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115507
Bug ID: 115507
Summary: 'Wide_Wide_Value failed for unicode strings
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: dramwang at 163 dot com
CC: dkm at gcc dot gnu.org
Target Milestone: ---
For following code, CONSTRAINT_ERROR exception will be raised:
```
with Ada.Wide_Wide_Text_IO ;
procedure Sample is
use Ada.Wide_Wide_Text_IO ;
type T is (A, 乙) ;
begin
Put_Line (A'Wide_Wide_Image) ;
Put_Line (乙'Wide_Wide_Image) ;
Put_Line (T (T'Wide_Wide_Value ("A"))'Wide_Wide_Image) ;
Put_Line (T (T'Wide_Wide_Value ("乙"))'Wide_Wide_Image) ;
end Sample ;
```
Output:
```
A
乙
A
raised CONSTRAINT_ERROR : bad input for 'Value: "乙"
[./sample]
0x41cd20 System.Val_Util.Bad_Value at s-valuti.adb:61
0x41c6d9 System.Val_Enum_8.Impl.Value_Enumeration at s-valuen.adb:149
0x404a4d Sample at sample.adb:12
0x4046b7 Main at b~sample.adb:258
[/lib/x86_64-linux-gnu/libc.so.6]
0x7fc03814f248
0x7fc03814f303
[./sample]
0x4040ef _start at ???
0xfffffffffffffffe
```
'Wide_Value will also failed with the same error.
I've tested in Debian 12 x86_64 with GNAT 15.0.0 20240615 (git 079506).
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug ada/115507] bogus Constraint_Error for Wide_Wide_Value with wide enumeration literal
2024-06-16 0:57 [Bug ada/115507] New: 'Wide_Wide_Value failed for unicode strings dramwang at 163 dot com
@ 2024-06-18 22:13 ` ebotcazou at gcc dot gnu.org
2024-06-19 7:28 ` ebotcazou at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-06-18 22:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115507
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|'Wide_Wide_Value failed for |bogus Constraint_Error for
|unicode strings |Wide_Wide_Value with wide
| |enumeration literal
Last reconfirmed| |2024-06-18
CC| |ebotcazou at gcc dot gnu.org
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
System.Val_Util.Normalize_String incorrectly normalizes the input string.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug ada/115507] bogus Constraint_Error for Wide_Wide_Value with wide enumeration literal
2024-06-16 0:57 [Bug ada/115507] New: 'Wide_Wide_Value failed for unicode strings dramwang at 163 dot com
2024-06-18 22:13 ` [Bug ada/115507] bogus Constraint_Error for Wide_Wide_Value with wide enumeration literal ebotcazou at gcc dot gnu.org
@ 2024-06-19 7:28 ` ebotcazou at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-06-19 7:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115507
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc dot gnu.org
--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
I'll have a closer look.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-19 7:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-16 0:57 [Bug ada/115507] New: 'Wide_Wide_Value failed for unicode strings dramwang at 163 dot com
2024-06-18 22:13 ` [Bug ada/115507] bogus Constraint_Error for Wide_Wide_Value with wide enumeration literal ebotcazou at gcc dot gnu.org
2024-06-19 7:28 ` ebotcazou at gcc dot gnu.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).