public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/19409] New: ACATS c460010 - valgrind detects wrong code
@ 2005-01-12 22:49 baldrick at free dot fr
2005-01-12 22:56 ` [Bug ada/19409] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: baldrick at free dot fr @ 2005-01-12 22:49 UTC (permalink / raw)
To: gcc-bugs
RUN c460010
==29485== Memcheck, a memory error detector for x86-linux.
==29485== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
==29485== Using valgrind-2.3.0.CVS, a program supervision framework for
x86-linux.
==29485== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
==29485== For more details, rerun with: -v
==29485==
,.,. C460010 ACATS 2.5 05-01-11 16:37:49
---- C460010 Check that Constraint_Error is not raised if an array
aggregate without an others choice is assigned to an
object of a constrained array subtype, and the length of
each dimension of the aggregate equals the length of the
corresponding dimension of the target object.
==29485== Conditional jump or move depends on uninitialised value(s)
==29485== at 0x805B7A7: c460010__equals.433 (c460010_2.adb:5)
==29485== by 0x805BBB8: _ada_c460010 (c460010.adb:37)
==29485== by 0x8049E1B: main (b~c460010.adb:157)
==29485==
==29485== Use of uninitialised value of size 4
==29485== at 0x805B7A7: c460010__equals.433 (c460010_2.adb:5)
==29485== by 0x805BBB8: _ada_c460010 (c460010.adb:37)
==29485== by 0x8049E1B: main (b~c460010.adb:157)
==29485==
==29485== Conditional jump or move depends on uninitialised value(s)
==29485== at 0x805BBBB: _ada_c460010 (c460010.adb:37)
==29485== by 0x8049E1B: main (b~c460010.adb:157)
==29485==
==29485== Conditional jump or move depends on uninitialised value(s)
==29485== at 0x805B8D0: c460010__equals.609 (c460010_2.adb:5)
==29485== by 0x805BEBB: _ada_c460010 (c460010.adb:126)
==29485== by 0x8049E1B: main (b~c460010.adb:157)
==29485==
==29485== Use of uninitialised value of size 4
==29485== at 0x805B8D0: c460010__equals.609 (c460010_2.adb:5)
==29485== by 0x805BEBB: _ada_c460010 (c460010.adb:126)
==29485== by 0x8049E1B: main (b~c460010.adb:157)
==29485==
==29485== Conditional jump or move depends on uninitialised value(s)
==29485== at 0x805B8DC: c460010__equals.609 (c460010_2.adb:5)
==29485== by 0x805BEBB: _ada_c460010 (c460010.adb:126)
==29485== by 0x8049E1B: main (b~c460010.adb:157)
==29485==
==29485== Conditional jump or move depends on uninitialised value(s)
==29485== at 0x805B907: c460010__equals.721 (c460010_2.adb:5)
==29485== by 0x805C19C: _ada_c460010 (c460010.adb:169)
==29485== by 0x8049E1B: main (b~c460010.adb:157)
==29485==
==29485== Conditional jump or move depends on uninitialised value(s)
==29485== at 0x805C19F: _ada_c460010 (c460010.adb:169)
==29485== by 0x8049E1B: main (b~c460010.adb:157)
==29485==
==29485== Conditional jump or move depends on uninitialised value(s)
==29485== at 0x805B95A: c460010__equals.794 (c460010_2.adb:5)
==29485== by 0x805C56E: _ada_c460010 (c460010.adb:212)
==29485== by 0x8049E1B: main (b~c460010.adb:157)
==29485==
==29485== Conditional jump or move depends on uninitialised value(s)
==29485== at 0x805B966: c460010__equals.794 (c460010_2.adb:5)
==29485== by 0x805C56E: _ada_c460010 (c460010.adb:212)
==29485== by 0x8049E1B: main (b~c460010.adb:157)
==== C460010 PASSED ============================.
==29485==
==29485== ERROR SUMMARY: 22 errors from 10 contexts (suppressed: 13 from 1)
==29485== malloc/free: in use at exit: 10280 bytes in 2 blocks.
==29485== malloc/free: 11 allocs, 9 frees, 11762 bytes allocated.
==29485== For a detailed leak analysis, rerun with: --leak-check=yes
==29485== For counts of detected errors, rerun with: -v
PASS: c460010
--
Summary: ACATS c460010 - valgrind detects wrong code
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: baldrick at free dot fr
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=19409
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/19409] ACATS c460010 - valgrind detects wrong code
2005-01-12 22:49 [Bug ada/19409] New: ACATS c460010 - valgrind detects wrong code baldrick at free dot fr
@ 2005-01-12 22:56 ` pinskia at gcc dot gnu dot org
2005-01-20 12:16 ` baldrick at free dot fr
` (4 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-12 22:56 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Version|tree-ssa |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19409
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/19409] ACATS c460010 - valgrind detects wrong code
2005-01-12 22:49 [Bug ada/19409] New: ACATS c460010 - valgrind detects wrong code baldrick at free dot fr
2005-01-12 22:56 ` [Bug ada/19409] " pinskia at gcc dot gnu dot org
@ 2005-01-20 12:16 ` baldrick at free dot fr
2005-01-25 20:59 ` laurent at guerby dot net
` (3 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: baldrick at free dot fr @ 2005-01-20 12:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From baldrick at free dot fr 2005-01-20 12:15 -------
Here is a simpler example:
with Ada.Text_IO; use Ada.Text_IO;
procedure T is
type Index_Type is range 0 .. 4; -- does not fail if lower bound is 1
type Unconstrained_Array_Type is array (Index_Type range <>) of Integer;
subtype Array_Type is Unconstrained_Array_Type (2..4);
Target : array (1 .. 1) of Array_Type;
procedure Check (Index : Index_Type; Value : Integer) is
begin
if Target (1) (Index) /= Value then
Put_Line ("Expected " & Integer'Image (Value) & ", found " &
Integer'Image (Target (1) (Index)));
end if;
end Check;
begin
Target := (1 => (1 => 20, 2 => 30, 3 => 40)); -- the assignment requires
sliding
Check (2, 20);
Check (3, 30);
Check (4, 40);
end;
> gnatmake -s -g t
...
> ./t
Expected 20, found 30
Expected 30, found 40
Expected 40, found 134596128
This seems to be a front-end problem. In the dump t.adb.t02.original the
assignment is:
A15b[1]{lb: 1 sz: 12}[1]{lb: 2 sz: 4} = 20;
A15b[1]{lb: 1 sz: 12}[2]{lb: 2 sz: 4} = 30;
A15b[1]{lb: 1 sz: 12}[3]{lb: 2 sz: 4} = 40;
For the first assignment, notice the lower bound of 2, but the assignment to
element 1. All the assignments are off by one index.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19409
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/19409] ACATS c460010 - valgrind detects wrong code
2005-01-12 22:49 [Bug ada/19409] New: ACATS c460010 - valgrind detects wrong code baldrick at free dot fr
2005-01-12 22:56 ` [Bug ada/19409] " pinskia at gcc dot gnu dot org
2005-01-20 12:16 ` baldrick at free dot fr
@ 2005-01-25 20:59 ` laurent at guerby dot net
2005-02-10 23:16 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: laurent at guerby dot net @ 2005-01-25 20:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From laurent at guerby dot net 2005-01-25 20:59 -------
confirmed with "4.0.0 20050115 (experimental)" (since current doesn't work) on
x86_64-linux.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-01-25 20:59:21
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19409
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/19409] ACATS c460010 - valgrind detects wrong code
2005-01-12 22:49 [Bug ada/19409] New: ACATS c460010 - valgrind detects wrong code baldrick at free dot fr
` (2 preceding siblings ...)
2005-01-25 20:59 ` laurent at guerby dot net
@ 2005-02-10 23:16 ` pinskia at gcc dot gnu dot org
2005-07-19 13:17 ` baldrick at free dot fr
2005-07-19 21:37 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-10 23:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-10 20:42 -------
Fixed by:
2005-02-09 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Gen_Assign): If the expression is an aggregate for a
component of an array of arrays in an assignment context, and the
aggregate has component associations that require sliding on
assignment, force reanalysis of the aggregate to generate a temporary
before the assignment.
(Must_Slide): Make global to the package, for use in Gen_Assign.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19409
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/19409] ACATS c460010 - valgrind detects wrong code
2005-01-12 22:49 [Bug ada/19409] New: ACATS c460010 - valgrind detects wrong code baldrick at free dot fr
` (3 preceding siblings ...)
2005-02-10 23:16 ` pinskia at gcc dot gnu dot org
@ 2005-07-19 13:17 ` baldrick at free dot fr
2005-07-19 21:37 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 13+ messages in thread
From: baldrick at free dot fr @ 2005-07-19 13:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From baldrick at free dot fr 2005-07-19 12:22 -------
The same problem is still present if the array bounds are not static.
The following test case gives
$ ./u
Expected 20, found 30
Expected 30, found 40
Expected 40, found -1076635688
with Ada.Text_IO; use Ada.Text_IO;
procedure U is
type Index_Type is range 0 .. 4; -- does not fail if lower bound is 1
type Unconstrained_Array_Type is array (Index_Type range <>) of Integer;
function Two return Index_Type is
begin
return 2;
end;
function Four return Index_Type is
begin
return 4;
end;
subtype Array_Type is Unconstrained_Array_Type (Two .. Four);
type Target_Type is array (1 .. 1) of Array_Type;
Target : Target_Type;
procedure Check (Index : Index_Type; Value : Integer) is
begin
if Target (1) (Index) /= Value then
Put_Line ("Expected " & Integer'Image (Value) & ", found " &
Integer'Image (Target (1) (Index)));
end if;
end Check;
begin
Target := (1 => (1 => 20, 2 => 30, 3 => 40)); -- the assignment requires
sliding
Check (2, 20);
Check (3, 30);
Check (4, 40);
end;
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19409
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/19409] ACATS c460010 - valgrind detects wrong code
2005-01-12 22:49 [Bug ada/19409] New: ACATS c460010 - valgrind detects wrong code baldrick at free dot fr
` (4 preceding siblings ...)
2005-07-19 13:17 ` baldrick at free dot fr
@ 2005-07-19 21:37 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-19 21:37 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19409
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/19409] ACATS c460010 - valgrind detects wrong code
[not found] <bug-19409-8622@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2007-12-07 13:01 ` sam at gcc dot gnu dot org
@ 2007-12-08 9:42 ` baldrick at gcc dot gnu dot org
5 siblings, 0 replies; 13+ messages in thread
From: baldrick at gcc dot gnu dot org @ 2007-12-08 9:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from baldrick at gcc dot gnu dot org 2007-12-08 09:42 -------
I don't see any valgrind messages or other failure using svn head,
when compiling at -O0 or -O2.
--
baldrick at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19409
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/19409] ACATS c460010 - valgrind detects wrong code
[not found] <bug-19409-8622@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2007-05-02 9:16 ` charlet at gcc dot gnu dot org
@ 2007-12-07 13:01 ` sam at gcc dot gnu dot org
2007-12-08 9:42 ` baldrick at gcc dot gnu dot org
5 siblings, 0 replies; 13+ messages in thread
From: sam at gcc dot gnu dot org @ 2007-12-07 13:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from sam at gcc dot gnu dot org 2007-12-07 13:01 -------
I cannot reproduce the problem on 4.3.0 20071207 by running the test case.
However, the valgrind messages remain.
--
sam at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sam at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19409
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/19409] ACATS c460010 - valgrind detects wrong code
[not found] <bug-19409-8622@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2007-05-02 9:14 ` baldrick at gcc dot gnu dot org
@ 2007-05-02 9:16 ` charlet at gcc dot gnu dot org
2007-12-07 13:01 ` sam at gcc dot gnu dot org
2007-12-08 9:42 ` baldrick at gcc dot gnu dot org
5 siblings, 0 replies; 13+ messages in thread
From: charlet at gcc dot gnu dot org @ 2007-05-02 9:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from charlet at gcc dot gnu dot org 2007-05-02 10:16 -------
OK well, reopening then.
--
charlet at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Last reconfirmed|2007-05-02 10:14:35 |2007-05-02 10:16:13
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19409
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/19409] ACATS c460010 - valgrind detects wrong code
[not found] <bug-19409-8622@http.gcc.gnu.org/bugzilla/>
2007-04-30 9:45 ` charlet at gcc dot gnu dot org
2007-04-30 9:46 ` charlet at gcc dot gnu dot org
@ 2007-05-02 9:14 ` baldrick at gcc dot gnu dot org
2007-05-02 9:16 ` charlet at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: baldrick at gcc dot gnu dot org @ 2007-05-02 9:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from baldrick at gcc dot gnu dot org 2007-05-02 10:14 -------
The problem still occurs. I tested with gcc version 4.3.0 20070425
(experimental), i.e. after all your patches went in.
--
baldrick at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-01-25 20:59:21 |2007-05-02 10:14:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19409
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/19409] ACATS c460010 - valgrind detects wrong code
[not found] <bug-19409-8622@http.gcc.gnu.org/bugzilla/>
2007-04-30 9:45 ` charlet at gcc dot gnu dot org
@ 2007-04-30 9:46 ` charlet at gcc dot gnu dot org
2007-05-02 9:14 ` baldrick at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: charlet at gcc dot gnu dot org @ 2007-04-30 9:46 UTC (permalink / raw)
To: gcc-bugs
--
charlet at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|SUSPENDED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19409
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/19409] ACATS c460010 - valgrind detects wrong code
[not found] <bug-19409-8622@http.gcc.gnu.org/bugzilla/>
@ 2007-04-30 9:45 ` charlet at gcc dot gnu dot org
2007-04-30 9:46 ` charlet at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: charlet at gcc dot gnu dot org @ 2007-04-30 9:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from charlet at gcc dot gnu dot org 2007-04-30 10:45 -------
Do you still see the error with 4.3.0 ?
Arno
--
charlet at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |SUSPENDED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19409
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2007-12-08 9:42 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-12 22:49 [Bug ada/19409] New: ACATS c460010 - valgrind detects wrong code baldrick at free dot fr
2005-01-12 22:56 ` [Bug ada/19409] " pinskia at gcc dot gnu dot org
2005-01-20 12:16 ` baldrick at free dot fr
2005-01-25 20:59 ` laurent at guerby dot net
2005-02-10 23:16 ` pinskia at gcc dot gnu dot org
2005-07-19 13:17 ` baldrick at free dot fr
2005-07-19 21:37 ` pinskia at gcc dot gnu dot org
[not found] <bug-19409-8622@http.gcc.gnu.org/bugzilla/>
2007-04-30 9:45 ` charlet at gcc dot gnu dot org
2007-04-30 9:46 ` charlet at gcc dot gnu dot org
2007-05-02 9:14 ` baldrick at gcc dot gnu dot org
2007-05-02 9:16 ` charlet at gcc dot gnu dot org
2007-12-07 13:01 ` sam at gcc dot gnu dot org
2007-12-08 9:42 ` baldrick 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).