[Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1

2005-03-17 Thread cvs-commit at gcc dot gnu dot org

--- 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: [EMAIL PROTECTED]   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  [EMAIL PROTECTED]
* 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=gcconly_with_tag=gcc-4_0-branchr1=1.638.4.6r2=1.638.4.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/decl.c.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.65.6.1r2=1.65.6.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/exp_util.adb.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.32r2=1.32.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/trans.c.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.90.6.1r2=1.90.6.2



-- 


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


[Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1

2005-03-17 Thread ebotcazou at gcc dot gnu dot org

--- 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


[Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1

2005-03-15 Thread cvs-commit at gcc dot gnu dot org

--- 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: [EMAIL PROTECTED]   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  [EMAIL PROTECTED]
Richard Kenner  [EMAIL PROTECTED]
Nicolas Setton  [EMAIL PROTECTED]
Ed Schonberg  [EMAIL PROTECTED]

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, 

[Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1

2005-03-15 Thread cvs-commit at gcc dot gnu dot org

--- 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: [EMAIL PROTECTED]   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  [EMAIL PROTECTED]
Richard Kenner  [EMAIL PROTECTED]
Nicolas Setton  [EMAIL PROTECTED]
Ed Schonberg  [EMAIL PROTECTED]

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, 

[Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1

2005-03-15 Thread charlet at gcc dot gnu dot org

--- 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


[Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1

2005-03-05 Thread pinskia at gcc dot gnu dot org


-- 
   What|Removed |Added

   Target Milestone|--- |4.1.0


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


[Bug ada/19900] [4.0/4.1 Regression] ACATS c391002 c432002 ICE categorize_ctor_elements_1

2005-03-05 Thread kenner at vlsi1 dot ultra dot nyu dot edu

--- 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