public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1
@ 2005-02-11 16:58 laurent at guerby dot net
  2005-02-11 19:00 ` [Bug ada/19900] " pinskia at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: laurent at guerby dot net @ 2005-02-11 16:58 UTC (permalink / raw)
  To: gcc-bugs

This was introduced very recently, happens on x86 and x86_64.

/home/guerby/work/gcc/build/build-20050210T230923/gcc/xgcc -c
-B/home/guerby/work/gcc/build/build-20050210T230923/gcc/ -gnatws -O2
-I/home/guerby/work/gcc/build/build-20050210T230923/gcc/testsuite/ada/acats/support
c391002.adb
+===========================GNAT BUG DETECTED==============================+
| 4.0.0 20050210 (experimental) (x86_64-unknown-linux-gnu) GCC error:      |
| in categorize_ctor_elements_1, at expr.c:4374                            |
| Error detected at c391002.adb:232:5                                      |

/home/guerby/work/gcc/build/build-20050210T230923/gcc/xgcc -c
-B/home/guerby/work/gcc/build/build-20050210T230923/gcc/ -gnatws -O2
-I/home/guerby/work/gcc/build/build-20050210T230923/gcc/testsuite/ada/acats/support
c432002.adb
+===========================GNAT BUG DETECTED==============================+
| 4.0.0 20050210 (experimental) (x86_64-unknown-linux-gnu) GCC error:      |
| in categorize_ctor_elements_1, at expr.c:4374                            |
| Error detected at c432002.adb:560:5                                      |

-- 
           Summary: ACATS c391002 c432002 ICE categorize_ctor_elements_1
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-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=19900


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

* [Bug ada/19900] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
@ 2005-02-11 19:00 ` pinskia at gcc dot gnu dot org
  2005-02-12  6:25 ` ebotcazou at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-11 19:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-11 13:41 -------
This looks like a front-end problem:
          /* We don't expect more than one element of the union to be
             initialized.  Not sure what we should do otherwise... */
          gcc_assert (TREE_CHAIN (list) == NULL);

-- 


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


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

* [Bug ada/19900] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
  2005-02-11 19:00 ` [Bug ada/19900] " pinskia at gcc dot gnu dot org
@ 2005-02-12  6:25 ` ebotcazou at gcc dot gnu dot org
  2005-02-15 17:44 ` [Bug ada/19900] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-02-12  6:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-02-11 21:48 -------
Confirmed on x86.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-11 21:48:56
               date|                            |


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


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

* [Bug ada/19900] [4.0 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
  2005-02-11 19:00 ` [Bug ada/19900] " pinskia at gcc dot gnu dot org
  2005-02-12  6:25 ` ebotcazou at gcc dot gnu dot org
@ 2005-02-15 17:44 ` pinskia at gcc dot gnu dot org
  2005-02-15 18:30 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-15 17:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-15 05:48 -------
Confirmed on ppc also with the reduced testcase in PR 19408.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |19408
              nThis|                            |
            Summary|ACATS c391002 c432002 ICE   |[4.0 Regression] ACATS
                   |categorize_ctor_elements_1  |c391002 c432002 ICE
                   |                            |categorize_ctor_elements_1


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


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

* [Bug ada/19900] [4.0 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
                   ` (2 preceding siblings ...)
  2005-02-15 17:44 ` [Bug ada/19900] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-02-15 18:30 ` pinskia at gcc dot gnu dot org
  2005-02-16  7:08 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-15 18:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-15 06:00 -------
>From the reduced testcase in that PR, we get the following for the constructor (which is wrong):
{.bandD.636=2, .the_commandD.637=0, ._parentD.648={.bandD.640=2}, .tc_sccD.652=66}

The problem comes from:
              gnu_type = make_node (possibly_overlapping_fields
                                    ? UNION_TYPE : RECORD_TYPE);

in decl.c:2627

Note that _parent overlaps with the stuff before it.

What needs to happen is we need to create a better type for this unless unions are aloud to have more 
than one initializer.

It looks like we should be instead of using an UNION but access the type as a subfield (like the C++ 
front-end) and also when taking the address for the parent's type do:
"&a._parent".

This is a front-end bug.  Fixing this one the way I recommend will also fix PR 19408 at the same time.

-- 


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


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

* [Bug ada/19900] [4.0 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
                   ` (3 preceding siblings ...)
  2005-02-15 18:30 ` pinskia at gcc dot gnu dot org
@ 2005-02-16  7:08 ` pinskia at gcc dot gnu dot org
  2005-02-16  9:52 ` kenner at vlsi1 dot ultra dot nyu dot edu
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-16  7:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-16 03:21 -------
Just for the record UNION TYPE is defined in tree.def as something different than what the Ada front-
end is using it for, From tree.def:
/* Union in C.  Like a struct, except that the offsets of the fields
   will all be zero.  */
/* See the comment above, before ENUMERAL_TYPE, for how
   forward references to union tags are handled in C.  */
DEFTREECODE (UNION_TYPE, "union_type", tcc_type, 0)     /* C union type */

The code in the Ada front-end to use unions instead of structs was introduced with:
2005-02-09  Eric Botcazou  <ebotcazou@adacore.com>
            Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

        Fix for c330001 - PR ada/19386

So this is a new bug in that the ada front-end is abusing UNION in this case

Here is the link to the patch: <http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00424.html>.

In fact the quote "GCC assumes that a RECORD_TYPE does not have any overlapping fields. " is true and 
so is UNION_TYPE assumes that only one field is initialized as shown above.

I would assume this requires a large number of fixes in the Ada front-end.

(There was a C++ bug which was caused by the overlapping fields also which was fixed correctly).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kenner at vlsi1 dot ultra
                   |                            |dot nyu dot edu


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


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

* [Bug ada/19900] [4.0 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
                   ` (4 preceding siblings ...)
  2005-02-16  7:08 ` pinskia at gcc dot gnu dot org
@ 2005-02-16  9:52 ` kenner at vlsi1 dot ultra dot nyu dot edu
  2005-02-24 19:40 ` bosch at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: kenner at vlsi1 dot ultra dot nyu dot edu @ 2005-02-16  9:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kenner at vlsi1 dot ultra dot nyu dot edu  2005-02-16 04:08 -------
Subject: Re:   [4.0 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1

Thanks for looking into this. I hadn't gotten a chance yet, but was very
close to getting to it.

    Just for the record UNION TYPE is defined in tree.def as something
    different than what the Ada front- end is using it for, From tree.def:
    /* Union in C.  Like a struct, except that the offsets of the fields
       will all be zero.  */
    /* See the comment above, before ENUMERAL_TYPE, for how
       forward references to union tags are handled in C.  */
    DEFTREECODE (UNION_TYPE, "union_type", tcc_type, 0)     /* C union type */

Ugh!  This is a mess.

I didn't notice the assumption about UNION_TYPE, concentrating just
on the non-overlapping assumption.

I'm not sure anybody actually relies on the assumption that all field offsets
are zero, but that would need to be checked.  The initializer issue is
more serious, of course.

Record subtypes in general can have overlapping fields (consider variants),
but you can't validly reference two overlapping fields at the same time.
Records with _Parent fields are an exception, but they can't be easily
transformed into being non-overlapping (via nesting) as I understand it
without a lot of surgery to the Ada part of the front end.

This will require considerable investigation.


-- 


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


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

* [Bug ada/19900] [4.0 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
                   ` (5 preceding siblings ...)
  2005-02-16  9:52 ` kenner at vlsi1 dot ultra dot nyu dot edu
@ 2005-02-24 19:40 ` bosch at gcc dot gnu dot org
  2005-03-05 19:58 ` [Bug ada/19900] [4.0/4.1 " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: bosch at gcc dot gnu dot org @ 2005-02-24 19:40 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |kenner at vlsi1 dot ultra
                   |dot org                     |dot nyu dot edu
             Status|NEW                         |ASSIGNED


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


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

* [Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
                   ` (6 preceding siblings ...)
  2005-02-24 19:40 ` bosch at gcc dot gnu dot org
@ 2005-03-05 19:58 ` pinskia at gcc dot gnu dot org
  2005-03-06  4:06 ` kenner at vlsi1 dot ultra dot nyu dot edu
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-05 19:58 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
                   ` (7 preceding siblings ...)
  2005-03-05 19:58 ` [Bug ada/19900] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2005-03-06  4:06 ` kenner at vlsi1 dot ultra dot nyu dot edu
  2005-03-15 16:03 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: kenner at vlsi1 dot ultra dot nyu dot edu @ 2005-03-06  4:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kenner at vlsi1 dot ultra dot nyu dot edu  2005-03-06 04:06 -------
Subject: Re:   [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1

Note that there is a fix for this "in the pipe" waiting for Arno's next
tree synchronization.


-- 


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


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

* [Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
                   ` (8 preceding siblings ...)
  2005-03-06  4:06 ` kenner at vlsi1 dot ultra dot nyu dot edu
@ 2005-03-15 16:03 ` cvs-commit at gcc dot gnu dot org
  2005-03-15 16:05 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-15 16:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-15 16:00 -------
Subject: Bug 19900

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	charlet@gcc.gnu.org	2005-03-15 15:59:55

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

Log message:
	2005-03-08  Eric Botcazou  <ebotcazou@adacore.com>
	Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
	Nicolas Setton  <setton@adacore.com>
	Ed Schonberg  <schonberg@adacore.com>
	
	PR ada/19900
	PR ada/19408
	PR ada/19140
	PR ada/20255
	
	* decl.c (gnat_to_gnu_field): Reject aliased components with a
	representation clause that prescribes a size not equal to the rounded
	size of their types.
	(gnat_to_gnu_entity, case E_Component): Always look at
	Original_Record_Component if Present and not the entity.
	(gnat_to_gnu_entity, case E_Record_Subtype): Rework handling of subtypes
	of tagged extension types by not making field for components that are
	inside the parent.
	(gnat_to_gnu_entity) <E_Record_Type>: Fix typo in the alignment formula
	(gnat_to_gnu_entity) <E_Variable>: Do not convert again the
	expression to the type of the object when the object is constant.
	Reverse defer_debug_incomplete_list before traversing it, so that trees
	are processed in the order at which they were added to the list. This
	order is important when using the stabs debug format.
	If we are deferring the output of debug information, also defer this
	output for a function return type.
	When adding fields to a record, prevent emitting debug information
	for incomplete records, emit the information only when the record is
	complete.
	(components_to_record): New parameter defer_debug.
	(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.
	
	* gigi.h (write_record_type_debug_info): New function.
	Convert to use ANSI-style prototypes. Remove unused
	declarations for emit_stack_check, elab_all_gnat and
	set_second_error_entity.
	(gnat_to_gnu_field_decl): New decl.
	
	* utils.c (write_record_type_debug_info): New function.
	(finish_record_type): Delegate generation of debug information to
	write_record_type_debug_info.
	(update_pointer_to): Remove unneeded calls to rest_of_decl_compilation.
	(update_pointer_to): Fix pasto.
	(convert) <UNION_TYPE>: Accept slight type variations when
	converting to an unchecked union type.
	
	* exp_ch13.adb (Expand_N_Freeze_Entity): If Freeze_Type returns True,
	replace the N_Freeze_Entity with a null statement.
	
	* freeze.adb (Freeze_Expression): If the freeze nodes are generated
	within a constrained subcomponent of an enclosing record, place the
	freeze nodes in the scope stack entry for the enclosing record.
	(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 (Derived_Type_Declaration): New predicate
	Comes_From_Generic, to recognize accurately that the parent type in a
	derived type declaration can be traced back to a formal type, because
	it is one or is derived from one, or because its completion is derived
	from one.
	(Constrain_Component_Type): If component comes from source and has no
	explicit constraint, no need to constrain in in a subtype of the
	enclosing record.
	(Constrain_Access, Constrain_Array): Allow itypes to be delayed.
	Minor change to propagate Is_Ada_2005 flag
	
	* trans.c (gnat_to_gnu, case N_Aggregate): Verify that
	Expansion_Delayed is False.
	(assoc_to_constructor): Ignore fields that have a
	Corresponding_Discriminant.
	(gnat_to_gnu) <N_Return_Statement>: Restructure. If the
	function returns "by target", dereference the target pointer using the
	type of the actual return value.
	<all>: Be prepared for a null gnu_result.
	(processed_inline_subprograms): Check flag_really_no_inline
	instead of flag_no_inline.
	(set_second_error_entity): Remove unused function.
	(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/decl.c.diff?cvsroot=gcc&r1=1.65&r2=1.66
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/gigi.h.diff?cvsroot=gcc&r1=1.33&r2=1.34
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/utils.c.diff?cvsroot=gcc&r1=1.92&r2=1.93
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/trans.c.diff?cvsroot=gcc&r1=1.90&r2=1.91
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/exp_ch13.adb.diff?cvsroot=gcc&r1=1.9&r2=1.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/freeze.adb.diff?cvsroot=gcc&r1=1.23&r2=1.24
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/sem_ch3.adb.diff?cvsroot=gcc&r1=1.57&r2=1.58



-- 


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


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

* [Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
                   ` (9 preceding siblings ...)
  2005-03-15 16:03 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-15 16:05 ` cvs-commit at gcc dot gnu dot org
  2005-03-15 16:06 ` charlet at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-15 16:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-15 16:00 -------
Subject: Bug 19900

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	charlet@gcc.gnu.org	2005-03-15 15:59:55

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

Log message:
	2005-03-08  Eric Botcazou  <ebotcazou@adacore.com>
	Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
	Nicolas Setton  <setton@adacore.com>
	Ed Schonberg  <schonberg@adacore.com>
	
	PR ada/19900
	PR ada/19408
	PR ada/19140
	PR ada/20255
	
	* decl.c (gnat_to_gnu_field): Reject aliased components with a
	representation clause that prescribes a size not equal to the rounded
	size of their types.
	(gnat_to_gnu_entity, case E_Component): Always look at
	Original_Record_Component if Present and not the entity.
	(gnat_to_gnu_entity, case E_Record_Subtype): Rework handling of subtypes
	of tagged extension types by not making field for components that are
	inside the parent.
	(gnat_to_gnu_entity) <E_Record_Type>: Fix typo in the alignment formula
	(gnat_to_gnu_entity) <E_Variable>: Do not convert again the
	expression to the type of the object when the object is constant.
	Reverse defer_debug_incomplete_list before traversing it, so that trees
	are processed in the order at which they were added to the list. This
	order is important when using the stabs debug format.
	If we are deferring the output of debug information, also defer this
	output for a function return type.
	When adding fields to a record, prevent emitting debug information
	for incomplete records, emit the information only when the record is
	complete.
	(components_to_record): New parameter defer_debug.
	(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.
	
	* gigi.h (write_record_type_debug_info): New function.
	Convert to use ANSI-style prototypes. Remove unused
	declarations for emit_stack_check, elab_all_gnat and
	set_second_error_entity.
	(gnat_to_gnu_field_decl): New decl.
	
	* utils.c (write_record_type_debug_info): New function.
	(finish_record_type): Delegate generation of debug information to
	write_record_type_debug_info.
	(update_pointer_to): Remove unneeded calls to rest_of_decl_compilation.
	(update_pointer_to): Fix pasto.
	(convert) <UNION_TYPE>: Accept slight type variations when
	converting to an unchecked union type.
	
	* exp_ch13.adb (Expand_N_Freeze_Entity): If Freeze_Type returns True,
	replace the N_Freeze_Entity with a null statement.
	
	* freeze.adb (Freeze_Expression): If the freeze nodes are generated
	within a constrained subcomponent of an enclosing record, place the
	freeze nodes in the scope stack entry for the enclosing record.
	(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 (Derived_Type_Declaration): New predicate
	Comes_From_Generic, to recognize accurately that the parent type in a
	derived type declaration can be traced back to a formal type, because
	it is one or is derived from one, or because its completion is derived
	from one.
	(Constrain_Component_Type): If component comes from source and has no
	explicit constraint, no need to constrain in in a subtype of the
	enclosing record.
	(Constrain_Access, Constrain_Array): Allow itypes to be delayed.
	Minor change to propagate Is_Ada_2005 flag
	
	* trans.c (gnat_to_gnu, case N_Aggregate): Verify that
	Expansion_Delayed is False.
	(assoc_to_constructor): Ignore fields that have a
	Corresponding_Discriminant.
	(gnat_to_gnu) <N_Return_Statement>: Restructure. If the
	function returns "by target", dereference the target pointer using the
	type of the actual return value.
	<all>: Be prepared for a null gnu_result.
	(processed_inline_subprograms): Check flag_really_no_inline
	instead of flag_no_inline.
	(set_second_error_entity): Remove unused function.
	(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/decl.c.diff?cvsroot=gcc&r1=1.65&r2=1.66
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/gigi.h.diff?cvsroot=gcc&r1=1.33&r2=1.34
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/utils.c.diff?cvsroot=gcc&r1=1.92&r2=1.93
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/trans.c.diff?cvsroot=gcc&r1=1.90&r2=1.91
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/exp_ch13.adb.diff?cvsroot=gcc&r1=1.9&r2=1.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/freeze.adb.diff?cvsroot=gcc&r1=1.23&r2=1.24
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/sem_ch3.adb.diff?cvsroot=gcc&r1=1.57&r2=1.58


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-15 16:00 -------
Subject: Bug 19900

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	charlet@gcc.gnu.org	2005-03-15 16:00:27

Modified files:
	gcc/ada        : exp_pakd.adb exp_ch6.adb exp_util.adb 
	                 exp_util.ads sem_eval.ads sem_eval.adb 

Log message:
	2005-03-08  Robert Dewar  <dewar@adacore.com>
	Ed Schonberg  <schonberg@adacore.com>
	Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
	
	PR ada/19900
	
	* exp_pakd.adb (Create_Packed_Array_Type): Do not set
	Must_Be_Byte_Aligned for cases where we do not need to use a
	System.Pack_nn unit.
	
	* exp_ch6.adb (Expand_Call): Call Expand_Actuals for functions as well
	as procedures.
	Needed now that we do some processing for IN parameters as well. This
	may well fix some unrelated errors.
	(Expand_Call): Handle case of unaligned objects (in particular those
	that come from packed arrays).
	(Expand_Inlined_Call): If the subprogram is a renaming as body, and the
	renamed entity is an inherited operation, re-expand the call using the
	original operation, which is the one to call.
	Detect attempt to inline parameterless recursive subprogram.
	(Represented_As_Scalar): Fix to work properly with private types
	(Is_Possibly_Unaligned_Object): Major rewrite to get a much more
	accurate estimate. Yields True in far fewer cases than before,
	improving the quality of code that depends on this test.
	(Remove_Side_Effects): Properly test for Expansion_Delayed and handle
	case when it's inside an N_Qualified_Expression.
	
	* exp_util.adb (Kill_Dead_Code): For a package declaration, iterate
	over both visible and private declarations to remove them from tree,
	and mark subprograms declared in package as eliminated, to prevent
	spurious use in subsequent compilation of generic units in the context.
	
	* exp_util.ads: Minor cleanup in variable names
	
	* sem_eval.ads, sem_eval.adb: Minor reformatting
	(Compile_Time_Known_Bounds): New function

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/exp_pakd.adb.diff?cvsroot=gcc&r1=1.17&r2=1.18
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/exp_ch6.adb.diff?cvsroot=gcc&r1=1.38&r2=1.39
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/exp_util.adb.diff?cvsroot=gcc&r1=1.32&r2=1.33
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/exp_util.ads.diff?cvsroot=gcc&r1=1.15&r2=1.16
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/sem_eval.ads.diff?cvsroot=gcc&r1=1.8&r2=1.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/sem_eval.adb.diff?cvsroot=gcc&r1=1.17&r2=1.18



-- 


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


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

* [Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
                   ` (10 preceding siblings ...)
  2005-03-15 16:05 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-15 16:06 ` charlet at gcc dot gnu dot org
  2005-03-17 18:47 ` cvs-commit at gcc dot gnu dot org
  2005-03-17 18:50 ` ebotcazou at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: charlet at gcc dot gnu dot org @ 2005-03-15 16:06 UTC (permalink / raw)
  To: gcc-bugs


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

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


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


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

* [Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
                   ` (11 preceding siblings ...)
  2005-03-15 16:06 ` charlet at gcc dot gnu dot org
@ 2005-03-17 18:47 ` cvs-commit at gcc dot gnu dot org
  2005-03-17 18:50 ` ebotcazou at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-17 18:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-17 18:46 -------
Subject: Bug 19900

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	ebotcazou@gcc.gnu.org	2005-03-17 18:46:44

Modified files:
	gcc/ada        : ChangeLog decl.c exp_util.adb trans.c 

Log message:
	PR ada/19408
	PR ada/19900
	Backport from mainline:
	
	2005-03-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
	* exp_util.adb (Remove_Side_Effects): Properly test for
	Expansion_Delayed and handle case when it's inside an
	N_Qualified_Expression.
	* decl.c (gnat_to_gnu_entity, case E_Component): Always look at
	Original_Record_Component if Present and not the entity.
	(gnat_to_gnu_entity, case E_Record_Subtype): Rework handling of subtype
	of tagged extension types by not making field for components that are
	inside the parent.
	* trans.c (gnat_to_gnu, case N_Aggregate): Verify that
	Expansion_Delayed is False.
	(assoc_to_constructor): Ignore fields that have a
	Corresponding_Discriminant.

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.6&r2=1.638.4.7
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.1&r2=1.65.6.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/exp_util.adb.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.32&r2=1.32.6.1
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.1&r2=1.90.6.2



-- 


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


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

* [Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1
  2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
                   ` (12 preceding siblings ...)
  2005-03-17 18:47 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-17 18:50 ` ebotcazou at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-03-17 18:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-03-17 18:50 -------
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=19900


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

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

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-11 16:58 [Bug ada/19900] New: ACATS c391002 c432002 ICE categorize_ctor_elements_1 laurent at guerby dot net
2005-02-11 19:00 ` [Bug ada/19900] " pinskia at gcc dot gnu dot org
2005-02-12  6:25 ` ebotcazou at gcc dot gnu dot org
2005-02-15 17:44 ` [Bug ada/19900] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-02-15 18:30 ` pinskia at gcc dot gnu dot org
2005-02-16  7:08 ` pinskia at gcc dot gnu dot org
2005-02-16  9:52 ` kenner at vlsi1 dot ultra dot nyu dot edu
2005-02-24 19:40 ` bosch at gcc dot gnu dot org
2005-03-05 19:58 ` [Bug ada/19900] [4.0/4.1 " pinskia at gcc dot gnu dot org
2005-03-06  4:06 ` kenner at vlsi1 dot ultra dot nyu dot edu
2005-03-15 16:03 ` cvs-commit at gcc dot gnu dot org
2005-03-15 16:05 ` cvs-commit at gcc dot gnu dot org
2005-03-15 16:06 ` charlet at gcc dot gnu dot org
2005-03-17 18:47 ` cvs-commit at gcc dot gnu dot org
2005-03-17 18:50 ` 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).