public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/27225] New: Wide_String slice assignment in nested procedure does not work properly
@ 2006-04-20 11:19 bauhaus at futureapps dot de
2006-04-20 11:28 ` [Bug ada/27225] " bauhaus at futureapps dot de
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: bauhaus at futureapps dot de @ 2006-04-20 11:19 UTC (permalink / raw)
To: gcc-bugs
The following program should not raise Program_Error, but does.
procedure p is
procedure xxxx (txt: WIDE_STRING) is
pragma Assert(txt'length > 0, "string is empty");
result: WIDE_STRING(txt'first .. txt'first + 3);
begin
result(txt'first .. txt'first + 3) := "xxxx";
if result(txt'first .. txt'first + 3) /= "xxxx" then
raise program_error;
end if;
end xxxx;
begin
xxxx("_");
end p;
URL: svn://gcc.gnu.org/svn/gcc/tags/gcc_4_1_0_release
Revision: 113107
Linux sonnenregen 2.6.12-10-686-smp #1 SMP Sat Mar 11 16:41:12 UTC 2006 i686
GNU/Linux
--
Summary: Wide_String slice assignment in nested procedure does
not work properly
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bauhaus at futureapps dot de
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=27225
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/27225] Wide_String slice assignment in nested procedure does not work properly
2006-04-20 11:19 [Bug ada/27225] New: Wide_String slice assignment in nested procedure does not work properly bauhaus at futureapps dot de
@ 2006-04-20 11:28 ` bauhaus at futureapps dot de
2006-04-20 16:57 ` bauhaus at futureapps dot de
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bauhaus at futureapps dot de @ 2006-04-20 11:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from bauhaus at futureapps dot de 2006-04-20 11:28 -------
I forgot:
$ gnatmake p
$ ./p
raised PROGRAM_ERROR : p.adb:11 explicit raise
(The Assert is a relic of an earlier program
and not an issue.)
--
bauhaus at futureapps dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet| i686-pc-linux-gnu |i686-pc-linux-gnu
GCC host triplet| i686-pc-linux-gnu |i686-pc-linux-gnu
GCC target triplet| i686-pc-linux-gnu |i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27225
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/27225] Wide_String slice assignment in nested procedure does not work properly
2006-04-20 11:19 [Bug ada/27225] New: Wide_String slice assignment in nested procedure does not work properly bauhaus at futureapps dot de
2006-04-20 11:28 ` [Bug ada/27225] " bauhaus at futureapps dot de
@ 2006-04-20 16:57 ` bauhaus at futureapps dot de
2006-04-30 2:35 ` bauhaus at futureapps dot de
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bauhaus at futureapps dot de @ 2006-04-20 16:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from bauhaus at futureapps dot de 2006-04-20 16:57 -------
Apperently, this is fixed in the 4.2 trunk, 113114.
Same error with 4.02. (Not in 3.4.5 of GNAT GPL edition)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27225
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/27225] Wide_String slice assignment in nested procedure does not work properly
2006-04-20 11:19 [Bug ada/27225] New: Wide_String slice assignment in nested procedure does not work properly bauhaus at futureapps dot de
2006-04-20 11:28 ` [Bug ada/27225] " bauhaus at futureapps dot de
2006-04-20 16:57 ` bauhaus at futureapps dot de
@ 2006-04-30 2:35 ` bauhaus at futureapps dot de
2006-06-27 9:18 ` bauhaus at futureapps dot de
2007-05-02 12:13 ` charlet at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: bauhaus at futureapps dot de @ 2006-04-30 2:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from bauhaus at futureapps dot de 2006-04-30 02:35 -------
One more that doesn't work:
result(txt'first .. txt'first + 3) := ('x', 'x', 'x', 'x');
These rewritten assignments do work as expected
result(txt'first .. txt'first + 3) := (1 .. 4 => 'x');
result(txt'first .. txt'first + 3) :=
(1 => 'x', 2 => 'x', 3 => 'x', 4 => 'x');
result(txt'first .. txt'first + 3) :=
(txt'first .. txt'first + 3 => 'x');
referring to
Target: i686-pc-linux-gnu
Configured with: ../../gcc/configure --enable-threads --disable-nls
--enable-languages=c,ada,c++,fortran
Thread model: posix
gcc version 4.1.0
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27225
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/27225] Wide_String slice assignment in nested procedure does not work properly
2006-04-20 11:19 [Bug ada/27225] New: Wide_String slice assignment in nested procedure does not work properly bauhaus at futureapps dot de
` (2 preceding siblings ...)
2006-04-30 2:35 ` bauhaus at futureapps dot de
@ 2006-06-27 9:18 ` bauhaus at futureapps dot de
2007-05-02 12:13 ` charlet at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: bauhaus at futureapps dot de @ 2006-06-27 9:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from bauhaus at futureapps dot de 2006-06-27 08:00 -------
Works now, using gcc version 4.1.2 20060626 (prerelease)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27225
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug ada/27225] Wide_String slice assignment in nested procedure does not work properly
2006-04-20 11:19 [Bug ada/27225] New: Wide_String slice assignment in nested procedure does not work properly bauhaus at futureapps dot de
` (3 preceding siblings ...)
2006-06-27 9:18 ` bauhaus at futureapps dot de
@ 2007-05-02 12:13 ` 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 12:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from charlet at gcc dot gnu dot org 2007-05-02 13:13 -------
If it works, then let's close this PR
--
charlet at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27225
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-05-02 12:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-20 11:19 [Bug ada/27225] New: Wide_String slice assignment in nested procedure does not work properly bauhaus at futureapps dot de
2006-04-20 11:28 ` [Bug ada/27225] " bauhaus at futureapps dot de
2006-04-20 16:57 ` bauhaus at futureapps dot de
2006-04-30 2:35 ` bauhaus at futureapps dot de
2006-06-27 9:18 ` bauhaus at futureapps dot de
2007-05-02 12:13 ` 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).