public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/18727] New: ACATS c43214c fails at runtime
@ 2004-11-29 20:39 laurent at guerby dot net
  2004-11-29 20:50 ` [Bug ada/18727] " pinskia at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: laurent at guerby dot net @ 2004-11-29 20:39 UTC (permalink / raw)
  To: gcc-bugs

On x86, x86_64 and powerpc-darwin c43214c fails at runtime. 

Here is a slightly reduced test case that fails at -O2 but works at -O0/-O1 and
often works when slightly changed.

$ gnatmake -O2 p3
$ ./p3
(print garbage, expected WORK)
$ cat p3.adb
-- from ACATS c43214c
with Ada.Text_IO;
procedure P3 is
   SUBTYPE STB IS STRING(1 .. 4);

   GENERIC
      B1 : STB;
   PROCEDURE PROC1;

   PROCEDURE PROC1 IS
   begin
      Ada.Text_IO.Put_Line (B1);
   END;

   X : STB := "WORK";

   PROCEDURE PROC2 IS NEW PROC1 (x);

begin
   PROC2;
END;
$ 

Original ACATS output:

,.,. C43214C ACATS 2.5 04-11-29 10:37:13
---- C43214C CONSTRAINED ARRAY FORMAL GENERIC PARAMETER.
   * C43214C ARRAY DOES NOT CONTAIN THE CORRECT VALUES.
**** C43214C FAILED ****************************.

-- 
           Summary: ACATS c43214c fails at runtime
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: laurent at guerby dot net
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug ada/18727] ACATS c43214c fails at runtime
  2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
@ 2004-11-29 20:50 ` pinskia at gcc dot gnu dot org
  2004-12-03 22:16 ` laurent at guerby dot net
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-29 20:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-29 20:50 -------
Confirmed, read: <http://gcc.gnu.org/ml/gcc/2004-11/msg00054.html>.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-29 20:50:20
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug ada/18727] ACATS c43214c fails at runtime
  2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
  2004-11-29 20:50 ` [Bug ada/18727] " pinskia at gcc dot gnu dot org
@ 2004-12-03 22:16 ` laurent at guerby dot net
  2004-12-06 20:09 ` laurent at guerby dot net
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: laurent at guerby dot net @ 2004-12-03 22:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From laurent at guerby dot net  2004-12-03 22:16 -------
>From my old notes, this one started failing between

LAST_UPDATED: Fri Sep 17 22:17:43 UTC 2004
LAST_UPDATED: Sat Sep 18 07:45:31 UTC 2004

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug ada/18727] ACATS c43214c fails at runtime
  2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
  2004-11-29 20:50 ` [Bug ada/18727] " pinskia at gcc dot gnu dot org
  2004-12-03 22:16 ` laurent at guerby dot net
@ 2004-12-06 20:09 ` laurent at guerby dot net
  2005-01-12 22:43 ` baldrick at free dot fr
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: laurent at guerby dot net @ 2004-12-06 20:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From laurent at guerby dot net  2004-12-06 20:09 -------
At -O0 the test PASS on x86, x86_64 and ia64.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug ada/18727] ACATS c43214c fails at runtime
  2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
                   ` (2 preceding siblings ...)
  2004-12-06 20:09 ` laurent at guerby dot net
@ 2005-01-12 22:43 ` baldrick at free dot fr
  2005-01-15  0:55 ` uweigand at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: baldrick at free dot fr @ 2005-01-12 22:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From baldrick at free dot fr  2005-01-12 22:43 -------
valgrind detects wrong code: 
 
RUN c43214c 
==21414== Memcheck, a memory error detector for x86-linux. 
==21414== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al. 
==21414== Using valgrind-2.3.0.CVS, a program supervision framework for 
x86-linux. 
==21414== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al. 
==21414== For more details, rerun with: -v 
==21414== 
 
,.,. C43214C ACATS 2.5 05-01-11 16:34:43 
---- C43214C CONSTRAINED ARRAY FORMAL GENERIC PARAMETER. 
==21414== Conditional jump or move depends on uninitialised value(s) 
==21414==    at 0x805B4E3: _ada_c43214c (c43214c.adb:53) 
==21414==    by 0x8049DFC: main (b~c43214c.adb:149) 
==21414== 
==21414== Conditional jump or move depends on uninitialised value(s) 
==21414==    at 0x805B4E5: _ada_c43214c (c43214c.adb:53) 
==21414==    by 0x8049DFC: main (b~c43214c.adb:149) 
   * C43214C ARRAY DOES NOT CONTAIN THE CORRECT VALUES. 
**** C43214C FAILED ****************************. 
==21414== 
==21414== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 13 from 1) 
==21414== malloc/free: in use at exit: 10280 bytes in 2 blocks. 
==21414== malloc/free: 11 allocs, 9 frees, 11762 bytes allocated. 
==21414== For a detailed leak analysis,  rerun with: --leak-check=yes 
==21414== For counts of detected errors, rerun with: -v 
FAIL:   c43214c 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug ada/18727] ACATS c43214c fails at runtime
  2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
                   ` (3 preceding siblings ...)
  2005-01-12 22:43 ` baldrick at free dot fr
@ 2005-01-15  0:55 ` uweigand at gcc dot gnu dot org
  2005-01-15  0:56 ` uweigand at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: uweigand at gcc dot gnu dot org @ 2005-01-15  0:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From uweigand at gcc dot gnu dot org  2005-01-15 00:55 -------
This one fails on s390-ibm-linux as well.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug ada/18727] ACATS c43214c fails at runtime
  2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
                   ` (4 preceding siblings ...)
  2005-01-15  0:55 ` uweigand at gcc dot gnu dot org
@ 2005-01-15  0:56 ` uweigand at gcc dot gnu dot org
  2005-02-20 23:06 ` [Bug tree-optimization/18727] [4.0 Regression] ACATS c43214c fails at runtime (tree-dce/aliasing bug) ebotcazou at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: uweigand at gcc dot gnu dot org @ 2005-01-15  0:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From uweigand at gcc dot gnu dot org  2005-01-15 00:56 -------
And on s390x-ibm-linux too.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug tree-optimization/18727] [4.0 Regression] ACATS c43214c fails at runtime (tree-dce/aliasing bug)
  2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
                   ` (5 preceding siblings ...)
  2005-01-15  0:56 ` uweigand at gcc dot gnu dot org
@ 2005-02-20 23:06 ` ebotcazou at gcc dot gnu dot org
  2005-02-22 15:25 ` [Bug tree-optimization/18727] [4.0 Regression] ACATS c43214c fails at runtime (aliasing pb) ebotcazou at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-02-20 23:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-02-20 16:38 -------
Investigating.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |ebotcazou at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug tree-optimization/18727] [4.0 Regression] ACATS c43214c fails at runtime (aliasing pb)
  2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
                   ` (6 preceding siblings ...)
  2005-02-20 23:06 ` [Bug tree-optimization/18727] [4.0 Regression] ACATS c43214c fails at runtime (tree-dce/aliasing bug) ebotcazou at gcc dot gnu dot org
@ 2005-02-22 15:25 ` ebotcazou at gcc dot gnu dot org
  2005-03-01 18:33 ` [Bug tree-optimization/18727] [4.0/4.1 " ebotcazou at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-02-22 15:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-02-22 09:47 -------
Hum, this one is really tricky.  It's indeed an aliasing problem and I think
your reduced, reduced testcase demonstrates that there might be a hole in the
flow-insensitive alias analysis for pointers that escape but are neither
explicitly dereferenced nor passed as explicit arguments to a function.  I'll
ask the powers that be about this.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0 Regression] ACATS      |[4.0 Regression] ACATS
                   |c43214c fails at runtime    |c43214c fails at runtime
                   |(tree-dce/aliasing bug)     |(aliasing pb)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug tree-optimization/18727] [4.0/4.1 Regression] ACATS c43214c fails at runtime (aliasing pb)
  2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
                   ` (7 preceding siblings ...)
  2005-02-22 15:25 ` [Bug tree-optimization/18727] [4.0 Regression] ACATS c43214c fails at runtime (aliasing pb) ebotcazou at gcc dot gnu dot org
@ 2005-03-01 18:33 ` ebotcazou at gcc dot gnu dot org
  2005-03-05 19:52 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-03-01 18:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-03-01 18:33 -------
It should be fixed by the next push from AdaCore.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug tree-optimization/18727] [4.0/4.1 Regression] ACATS c43214c fails at runtime (aliasing pb)
  2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
                   ` (8 preceding siblings ...)
  2005-03-01 18:33 ` [Bug tree-optimization/18727] [4.0/4.1 " ebotcazou at gcc dot gnu dot org
@ 2005-03-05 19:52 ` pinskia at gcc dot gnu dot org
  2005-03-15 16:25 ` ebotcazou at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-05 19:52 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug tree-optimization/18727] [4.0/4.1 Regression] ACATS c43214c fails at runtime (aliasing pb)
  2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
                   ` (9 preceding siblings ...)
  2005-03-05 19:52 ` pinskia at gcc dot gnu dot org
@ 2005-03-15 16:25 ` ebotcazou at gcc dot gnu dot org
  2005-03-17 19:53 ` cvs-commit at gcc dot gnu dot org
  2005-03-17 19:57 ` ebotcazou at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-03-15 16:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-03-15 16:25 -------
Fixed on mainline.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug tree-optimization/18727] [4.0/4.1 Regression] ACATS c43214c fails at runtime (aliasing pb)
  2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
                   ` (10 preceding siblings ...)
  2005-03-15 16:25 ` ebotcazou at gcc dot gnu dot org
@ 2005-03-17 19:53 ` cvs-commit at gcc dot gnu dot org
  2005-03-17 19:57 ` ebotcazou at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-17 19:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-17 19:53 -------
Subject: Bug 18727

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	ebotcazou@gcc.gnu.org	2005-03-17 19:53:07

Modified files:
	gcc/ada        : ChangeLog exp_ch13.adb exp_ch3.adb exp_ch3.ads 
	                 freeze.adb sem_ch3.adb gigi.h decl.c trans.c 

Log message:
	PR ada/18727
	Backport from mainline:
	
	2005-03-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
	* exp_ch13.adb (Expand_N_Freeze_Entity): If Freeze_Type returns True,
	replace the N_Freeze_Entity with a null statement.
	* exp_ch3.adb (Freeze_Type): Now a function that returns True if
	the N_Freeze_Entity is to be deleted.
	* exp_ch3.ads (Freeze_Type): Now a function that returns Boolean.
	* freeze.adb (Undelay_Type): New Subprogram.
	(Set_Small_Size): Pass T, the type to modify; all callers changed.
	(Freeze_Entity, Freeze_Record_Type): Change the way we handle types
	within records; allow them to have freeze nodes if their base types
	aren't frozen yet.
	* sem_ch3.adb (Constrain_Access, Constrain_Array): Allow itypes to be
	delayed.
	* gigi.h (gnat_to_gnu_field_decl): New decl.
	* decl.c (gnat_to_gnu_entity, case E_Array_Subtype): Call
	copy_alias_set.
	(gnat_to_gnu_field_decl): New function.
	(substitution_list, annotate_rep): Call it.
	(gnat_to_gnu_entity, case E_Record_Subtype): Likewise.
	(gnat_to_gnu_entity, case E_Record_Type): Likewise.
	No longer update discriminants to not be a COMPONENT_REF.
	(copy_alias_set): Strip padding from input type; also handle
	unconstrained arrays properly.
	* trans.c (gnat_to_gnu, case N_Selected_Component): Call
	gnat_to_gnu_field_decl.
	(assoc_to_constructor): Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.638.4.7&r2=1.638.4.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/exp_ch13.adb.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.9&r2=1.9.40.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/exp_ch3.adb.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.29&r2=1.29.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/exp_ch3.ads.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.10&r2=1.10.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/freeze.adb.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.23&r2=1.23.12.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/sem_ch3.adb.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.57&r2=1.57.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/gigi.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.33&r2=1.33.10.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.65.6.2&r2=1.65.6.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/trans.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.90.6.2&r2=1.90.6.3



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug tree-optimization/18727] [4.0/4.1 Regression] ACATS c43214c fails at runtime (aliasing pb)
  2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
                   ` (11 preceding siblings ...)
  2005-03-17 19:53 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-17 19:57 ` ebotcazou at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-03-17 19:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-03-17 19:57 -------
Fixed in 4.0.0.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.0                       |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18727


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-03-17 19:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-29 20:39 [Bug ada/18727] New: ACATS c43214c fails at runtime laurent at guerby dot net
2004-11-29 20:50 ` [Bug ada/18727] " pinskia at gcc dot gnu dot org
2004-12-03 22:16 ` laurent at guerby dot net
2004-12-06 20:09 ` laurent at guerby dot net
2005-01-12 22:43 ` baldrick at free dot fr
2005-01-15  0:55 ` uweigand at gcc dot gnu dot org
2005-01-15  0:56 ` uweigand at gcc dot gnu dot org
2005-02-20 23:06 ` [Bug tree-optimization/18727] [4.0 Regression] ACATS c43214c fails at runtime (tree-dce/aliasing bug) ebotcazou at gcc dot gnu dot org
2005-02-22 15:25 ` [Bug tree-optimization/18727] [4.0 Regression] ACATS c43214c fails at runtime (aliasing pb) ebotcazou at gcc dot gnu dot org
2005-03-01 18:33 ` [Bug tree-optimization/18727] [4.0/4.1 " ebotcazou at gcc dot gnu dot org
2005-03-05 19:52 ` pinskia at gcc dot gnu dot org
2005-03-15 16:25 ` ebotcazou at gcc dot gnu dot org
2005-03-17 19:53 ` cvs-commit at gcc dot gnu dot org
2005-03-17 19:57 ` ebotcazou 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).