--- /dev/null
+--- gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/sinfo.h.orig 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/sinfo.h 2004-06-02 00:54:16.000000000 +0200
+@@ -0,0 +1,847 @@
++/*--------------------------------------------------------------------------*/
++/* */
++/* GNAT COMPILER COMPONENTS */
++/* */
++/* S I N F O */
++/* */
++/* C Header File */
++/* */
++/* Copyright (C) 1992-2004, Free Software Foundation, Inc. */
++/* */
++/* GNAT is free software; you can redistribute it and/or modify it under */
++/* terms of the GNU General Public License as published by the Free Soft- */
++/* ware Foundation; either version 2, or (at your option) any later ver- */
++/* sion. GNAT is distributed in the hope that it will be useful, but WITH- */
++/* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY */
++/* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License */
++/* for more details. You should have received a copy of the GNU General */
++/* Public License distributed with GNAT; see file COPYING. If not, write */
++/* to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, */
++/* MA 02111-1307, USA. */
++/* */
++/* As a special exception, if other files instantiate generics from this */
++/* unit, or you link this unit with other files to produce an executable, */
++/* this unit does not by itself cause the resulting executable to be */
++/* covered by the GNU General Public License. This exception does not */
++/* however invalidate any other reasons why the executable file might be */
++/* covered by the GNU Public License. */
++/* */
++/* GNAT was originally developed by the GNAT team at New York University. */
++/* Extensive contributions were provided by Ada Core Technologies Inc. */
++/* */
++/*--------------------------------------------------------------------------*/
++
++ #define N_Unused_At_Start 0
++ #define N_At_Clause 1
++ #define N_Component_Clause 2
++ #define N_Enumeration_Representation_Clause 3
++ #define N_Mod_Clause 4
++ #define N_Record_Representation_Clause 5
++ #define N_Attribute_Definition_Clause 6
++ #define N_Empty 7
++ #define N_Pragma 8
++ #define N_Pragma_Argument_Association 9
++ #define N_Error 10
++ #define N_Defining_Character_Literal 11
++ #define N_Defining_Identifier 12
++ #define N_Defining_Operator_Symbol 13
++ #define N_Expanded_Name 14
++ #define N_Identifier 15
++ #define N_Operator_Symbol 16
++ #define N_Character_Literal 17
++ #define N_Op_Add 18
++ #define N_Op_Concat 19
++ #define N_Op_Expon 20
++ #define N_Op_Subtract 21
++ #define N_Op_Divide 22
++ #define N_Op_Mod 23
++ #define N_Op_Multiply 24
++ #define N_Op_Rem 25
++ #define N_Op_And 26
++ #define N_Op_Eq 27
++ #define N_Op_Ge 28
++ #define N_Op_Gt 29
++ #define N_Op_Le 30
++ #define N_Op_Lt 31
++ #define N_Op_Ne 32
++ #define N_Op_Or 33
++ #define N_Op_Xor 34
++ #define N_Op_Rotate_Left 35
++ #define N_Op_Rotate_Right 36
++ #define N_Op_Shift_Left 37
++ #define N_Op_Shift_Right 38
++ #define N_Op_Shift_Right_Arithmetic 39
++ #define N_Op_Abs 40
++ #define N_Op_Minus 41
++ #define N_Op_Not 42
++ #define N_Op_Plus 43
++ #define N_Attribute_Reference 44
++ #define N_And_Then 45
++ #define N_Conditional_Expression 46
++ #define N_Explicit_Dereference 47
++ #define N_Function_Call 48
++ #define N_In 49
++ #define N_Indexed_Component 50
++ #define N_Integer_Literal 51
++ #define N_Not_In 52
++ #define N_Null 53
++ #define N_Or_Else 54
++ #define N_Procedure_Call_Statement 55
++ #define N_Qualified_Expression 56
++ #define N_Raise_Constraint_Error 57
++ #define N_Raise_Program_Error 58
++ #define N_Raise_Storage_Error 59
++ #define N_Aggregate 60
++ #define N_Allocator 61
++ #define N_Extension_Aggregate 62
++ #define N_Range 63
++ #define N_Real_Literal 64
++ #define N_Reference 65
++ #define N_Selected_Component 66
++ #define N_Slice 67
++ #define N_String_Literal 68
++ #define N_Subprogram_Info 69
++ #define N_Type_Conversion 70
++ #define N_Unchecked_Expression 71
++ #define N_Unchecked_Type_Conversion 72
++ #define N_Subtype_Indication 73
++ #define N_Component_Declaration 74
++ #define N_Entry_Declaration 75
++ #define N_Formal_Object_Declaration 76
++ #define N_Formal_Type_Declaration 77
++ #define N_Full_Type_Declaration 78
++ #define N_Incomplete_Type_Declaration 79
++ #define N_Loop_Parameter_Specification 80
++ #define N_Object_Declaration 81
++ #define N_Protected_Type_Declaration 82
++ #define N_Private_Extension_Declaration 83
++ #define N_Private_Type_Declaration 84
++ #define N_Subtype_Declaration 85
++ #define N_Function_Specification 86
++ #define N_Procedure_Specification 87
++ #define N_Entry_Index_Specification 88
++ #define N_Freeze_Entity 89
++ #define N_Access_Function_Definition 90
++ #define N_Access_Procedure_Definition 91
++ #define N_Task_Type_Declaration 92
++ #define N_Package_Body_Stub 93
++ #define N_Protected_Body_Stub 94
++ #define N_Subprogram_Body_Stub 95
++ #define N_Task_Body_Stub 96
++ #define N_Function_Instantiation 97
++ #define N_Package_Instantiation 98
++ #define N_Procedure_Instantiation 99
++ #define N_Package_Body 100
++ #define N_Subprogram_Body 101
++ #define N_Protected_Body 102
++ #define N_Task_Body 103
++ #define N_Implicit_Label_Declaration 104
++ #define N_Package_Declaration 105
++ #define N_Single_Task_Declaration 106
++ #define N_Subprogram_Declaration 107
++ #define N_Use_Package_Clause 108
++ #define N_Generic_Package_Declaration 109
++ #define N_Generic_Subprogram_Declaration 110
++ #define N_Constrained_Array_Definition 111
++ #define N_Unconstrained_Array_Definition 112
++ #define N_Exception_Renaming_Declaration 113
++ #define N_Object_Renaming_Declaration 114
++ #define N_Package_Renaming_Declaration 115
++ #define N_Subprogram_Renaming_Declaration 116
++ #define N_Generic_Function_Renaming_Declaration 117
++ #define N_Generic_Package_Renaming_Declaration 118
++ #define N_Generic_Procedure_Renaming_Declaration 119
++ #define N_Abort_Statement 120
++ #define N_Accept_Statement 121
++ #define N_Assignment_Statement 122
++ #define N_Asynchronous_Select 123
++ #define N_Block_Statement 124
++ #define N_Case_Statement 125
++ #define N_Code_Statement 126
++ #define N_Conditional_Entry_Call 127
++ #define N_Delay_Relative_Statement 128
++ #define N_Delay_Until_Statement 129
++ #define N_Entry_Call_Statement 130
++ #define N_Free_Statement 131
++ #define N_Goto_Statement 132
++ #define N_Loop_Statement 133
++ #define N_Null_Statement 134
++ #define N_Raise_Statement 135
++ #define N_Requeue_Statement 136
++ #define N_Return_Statement 137
++ #define N_Selective_Accept 138
++ #define N_Timed_Entry_Call 139
++ #define N_Exit_Statement 140
++ #define N_If_Statement 141
++ #define N_Accept_Alternative 142
++ #define N_Delay_Alternative 143
++ #define N_Elsif_Part 144
++ #define N_Entry_Body_Formal_Part 145
++ #define N_Iteration_Scheme 146
++ #define N_Terminate_Alternative 147
++ #define N_Abortable_Part 148
++ #define N_Abstract_Subprogram_Declaration 149
++ #define N_Access_Definition 150
++ #define N_Access_To_Object_Definition 151
++ #define N_Case_Statement_Alternative 152
++ #define N_Compilation_Unit 153
++ #define N_Compilation_Unit_Aux 154
++ #define N_Component_Association 155
++ #define N_Component_Definition 156
++ #define N_Component_List 157
++ #define N_Derived_Type_Definition 158
++ #define N_Decimal_Fixed_Point_Definition 159
++ #define N_Defining_Program_Unit_Name 160
++ #define N_Delta_Constraint 161
++ #define N_Designator 162
++ #define N_Digits_Constraint 163
++ #define N_Discriminant_Association 164
++ #define N_Discriminant_Specification 165
++ #define N_Enumeration_Type_Definition 166
++ #define N_Entry_Body 167
++ #define N_Entry_Call_Alternative 168
++ #define N_Exception_Declaration 169
++ #define N_Exception_Handler 170
++ #define N_Floating_Point_Definition 171
++ #define N_Formal_Decimal_Fixed_Point_Definition 172
++ #define N_Formal_Derived_Type_Definition 173
++ #define N_Formal_Discrete_Type_Definition 174
++ #define N_Formal_Floating_Point_Definition 175
++ #define N_Formal_Modular_Type_Definition 176
++ #define N_Formal_Ordinary_Fixed_Point_Definition 177
++ #define N_Formal_Package_Declaration 178
++ #define N_Formal_Private_Type_Definition 179
++ #define N_Formal_Signed_Integer_Type_Definition 180
++ #define N_Formal_Subprogram_Declaration 181
++ #define N_Generic_Association 182
++ #define N_Handled_Sequence_Of_Statements 183
++ #define N_Index_Or_Discriminant_Constraint 184
++ #define N_Itype_Reference 185
++ #define N_Label 186
++ #define N_Modular_Type_Definition 187
++ #define N_Number_Declaration 188
++ #define N_Ordinary_Fixed_Point_Definition 189
++ #define N_Others_Choice 190
++ #define N_Package_Specification 191
++ #define N_Parameter_Association 192
++ #define N_Parameter_Specification 193
++ #define N_Protected_Definition 194
++ #define N_Range_Constraint 195
++ #define N_Real_Range_Specification 196
++ #define N_Record_Definition 197
++ #define N_Signed_Integer_Type_Definition 198
++ #define N_Single_Protected_Declaration 199
++ #define N_Subunit 200
++ #define N_Task_Definition 201
++ #define N_Triggering_Alternative 202
++ #define N_Use_Type_Clause 203
++ #define N_Validate_Unchecked_Conversion 204
++ #define N_Variant 205
++ #define N_Variant_Part 206
++ #define N_With_Clause 207
++ #define N_With_Type_Clause 208
++ #define N_Unused_At_End 209
++
++ #define Number_Node_Kinds 210
++ SUBTYPE (N_Access_To_Subprogram_Definition, Node_Kind,
++ N_Access_Function_Definition,
++ N_Access_Procedure_Definition)
++ SUBTYPE (N_Array_Type_Definition, Node_Kind,
++ N_Constrained_Array_Definition,
++ N_Unconstrained_Array_Definition)
++ SUBTYPE (N_Binary_Op, Node_Kind,
++ N_Op_Add,
++ N_Op_Shift_Right_Arithmetic)
++ SUBTYPE (N_Body_Stub, Node_Kind,
++ N_Package_Body_Stub,
++ N_Task_Body_Stub)
++ SUBTYPE (N_Declaration, Node_Kind,
++ N_Component_Declaration,
++ N_Procedure_Specification)
++ SUBTYPE (N_Direct_Name, Node_Kind,
++ N_Identifier,
++ N_Character_Literal)
++ SUBTYPE (N_Entity, Node_Kind,
++ N_Defining_Character_Literal,
++ N_Defining_Operator_Symbol)
++ SUBTYPE (N_Generic_Declaration, Node_Kind,
++ N_Generic_Package_Declaration,
++ N_Generic_Subprogram_Declaration)
++ SUBTYPE (N_Generic_Instantiation, Node_Kind,
++ N_Function_Instantiation,
++ N_Procedure_Instantiation)
++ SUBTYPE (N_Generic_Renaming_Declaration, Node_Kind,
++ N_Generic_Function_Renaming_Declaration,
++ N_Generic_Procedure_Renaming_Declaration)
++ SUBTYPE (N_Has_Chars, Node_Kind,
++ N_Attribute_Definition_Clause,
++ N_Op_Plus)
++ SUBTYPE (N_Has_Entity, Node_Kind,
++ N_Expanded_Name,
++ N_Attribute_Reference)
++ SUBTYPE (N_Has_Etype, Node_Kind,
++ N_Error,
++ N_Subtype_Indication)
++ SUBTYPE (N_Has_Treat_Fixed_As_Integer, Node_Kind,
++ N_Op_Divide,
++ N_Op_Rem)
++ SUBTYPE (N_Later_Decl_Item, Node_Kind,
++ N_Task_Type_Declaration,
++ N_Generic_Subprogram_Declaration)
++ SUBTYPE (N_Op, Node_Kind,
++ N_Op_Add,
++ N_Op_Plus)
++ SUBTYPE (N_Op_Boolean, Node_Kind,
++ N_Op_And,
++ N_Op_Xor)
++ SUBTYPE (N_Op_Compare, Node_Kind,
++ N_Op_Eq,
++ N_Op_Ne)
++ SUBTYPE (N_Op_Shift, Node_Kind,
++ N_Op_Rotate_Left,
++ N_Op_Shift_Right_Arithmetic)
++ SUBTYPE (N_Proper_Body, Node_Kind,
++ N_Package_Body,
++ N_Task_Body)
++ SUBTYPE (N_Raise_xxx_Error, Node_Kind,
++ N_Raise_Constraint_Error,
++ N_Raise_Storage_Error)
++ SUBTYPE (N_Renaming_Declaration, Node_Kind,
++ N_Exception_Renaming_Declaration,
++ N_Generic_Procedure_Renaming_Declaration)
++ SUBTYPE (N_Representation_Clause, Node_Kind,
++ N_At_Clause,
++ N_Attribute_Definition_Clause)
++ SUBTYPE (N_Statement_Other_Than_Procedure_Call, Node_Kind,
++ N_Abort_Statement,
++ N_If_Statement)
++ SUBTYPE (N_Has_Condition, Node_Kind,
++ N_Exit_Statement,
++ N_Terminate_Alternative)
++ SUBTYPE (N_Subexpr, Node_Kind,
++ N_Expanded_Name,
++ N_Unchecked_Type_Conversion)
++ SUBTYPE (N_Subprogram_Specification, Node_Kind,
++ N_Function_Specification,
++ N_Procedure_Specification)
++ SUBTYPE (N_Unary_Op, Node_Kind,
++ N_Op_Abs,
++ N_Op_Plus)
++ SUBTYPE (N_Unit_Body, Node_Kind,
++ N_Package_Body,
++ N_Subprogram_Body)
++ INLINE Boolean ABE_Is_Certain (Node_Id N)
++ { return Flag18 (N); }
++ INLINE Boolean Abort_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Node_Id Abortable_Part (Node_Id N)
++ { return Node2 (N); }
++ INLINE Boolean Abstract_Present (Node_Id N)
++ { return Flag4 (N); }
++ INLINE List_Id Accept_Handler_Records (Node_Id N)
++ { return List5 (N); }
++ INLINE Node_Id Accept_Statement (Node_Id N)
++ { return Node2 (N); }
++ INLINE Elist_Id Access_Types_To_Process (Node_Id N)
++ { return Elist2 (N); }
++ INLINE List_Id Actions (Node_Id N)
++ { return List1 (N); }
++ INLINE Node_Id Activation_Chain_Entity (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Acts_As_Spec (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Node_Id Aggregate_Bounds (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Aliased_Present (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Boolean All_Others (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Boolean All_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE List_Id Alternatives (Node_Id N)
++ { return List4 (N); }
++ INLINE Node_Id Ancestor_Part (Node_Id N)
++ { return Node3 (N); }
++ INLINE Node_Id Array_Aggregate (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Assignment_OK (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Node_Id Associated_Node (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id At_End_Proc (Node_Id N)
++ { return Node1 (N); }
++ INLINE Name_Id Attribute_Name (Node_Id N)
++ { return Name2 (N); }
++ INLINE Node_Id Aux_Decls_Node (Node_Id N)
++ { return Node5 (N); }
++ INLINE Boolean Backwards_OK (Node_Id N)
++ { return Flag6 (N); }
++ INLINE Boolean Bad_Is_Detected (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Boolean By_Ref (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Boolean Body_Required (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Node_Id Body_To_Inline (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Box_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Char_Code Char_Literal_Value (Node_Id N)
++ { return Char_Code2 (N); }
++ INLINE Name_Id Chars (Node_Id N)
++ { return Name1 (N); }
++ INLINE Boolean Check_Address_Alignment (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Node_Id Choice_Parameter (Node_Id N)
++ { return Node2 (N); }
++ INLINE List_Id Choices (Node_Id N)
++ { return List1 (N); }
++ INLINE Boolean Compile_Time_Known_Aggregate (Node_Id N)
++ { return Flag18 (N); }
++ INLINE List_Id Component_Associations (Node_Id N)
++ { return List2 (N); }
++ INLINE List_Id Component_Clauses (Node_Id N)
++ { return List3 (N); }
++ INLINE Node_Id Component_Definition (Node_Id N)
++ { return Node4 (N); }
++ INLINE List_Id Component_Items (Node_Id N)
++ { return List3 (N); }
++ INLINE Node_Id Component_List (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Component_Name (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Condition (Node_Id N)
++ { return Node1 (N); }
++ INLINE List_Id Condition_Actions (Node_Id N)
++ { return List3 (N); }
++ INLINE List_Id Config_Pragmas (Node_Id N)
++ { return List4 (N); }
++ INLINE Boolean Constant_Present (Node_Id N)
++ { return Flag17 (N); }
++ INLINE Node_Id Constraint (Node_Id N)
++ { return Node3 (N); }
++ INLINE List_Id Constraints (Node_Id N)
++ { return List1 (N); }
++ INLINE Boolean Context_Installed (Node_Id N)
++ { return Flag13 (N); }
++ INLINE List_Id Context_Items (Node_Id N)
++ { return List1 (N); }
++ INLINE Node_Id Controlling_Argument (Node_Id N)
++ { return Node1 (N); }
++ INLINE Boolean Conversion_OK (Node_Id N)
++ { return Flag14 (N); }
++ INLINE Node_Id Corresponding_Body (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Corresponding_Generic_Association (Node_Id N)
++ { return Node5 (N); }
++ INLINE Uint Corresponding_Integer_Value (Node_Id N)
++ { return Uint4 (N); }
++ INLINE Node_Id Corresponding_Spec (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Corresponding_Stub (Node_Id N)
++ { return Node3 (N); }
++ INLINE Entity_Id Dcheck_Function (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Debug_Statement (Node_Id N)
++ { return Node3 (N); }
++ INLINE List_Id Declarations (Node_Id N)
++ { return List2 (N); }
++ INLINE Node_Id Default_Expression (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Default_Name (Node_Id N)
++ { return Node2 (N); }
++ INLINE Entity_Id Defining_Identifier (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Defining_Unit_Name (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Delay_Alternative (Node_Id N)
++ { return Node4 (N); }
++ INLINE Boolean Delay_Finalize_Attach (Node_Id N)
++ { return Flag14 (N); }
++ INLINE Node_Id Delay_Statement (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Delta_Expression (Node_Id N)
++ { return Node3 (N); }
++ INLINE Node_Id Digits_Expression (Node_Id N)
++ { return Node2 (N); }
++ INLINE Boolean Discr_Check_Funcs_Built (Node_Id N)
++ { return Flag11 (N); }
++ INLINE List_Id Discrete_Choices (Node_Id N)
++ { return List4 (N); }
++ INLINE Node_Id Discrete_Range (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Discrete_Subtype_Definition (Node_Id N)
++ { return Node4 (N); }
++ INLINE List_Id Discrete_Subtype_Definitions (Node_Id N)
++ { return List2 (N); }
++ INLINE List_Id Discriminant_Specifications (Node_Id N)
++ { return List4 (N); }
++ INLINE Node_Id Discriminant_Type (Node_Id N)
++ { return Node5 (N); }
++ INLINE Boolean Do_Accessibility_Check (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Do_Discriminant_Check (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Do_Division_Check (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Do_Length_Check (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Boolean Do_Overflow_Check (Node_Id N)
++ { return Flag17 (N); }
++ INLINE Boolean Do_Range_Check (Node_Id N)
++ { return Flag9 (N); }
++ INLINE Boolean Do_Storage_Check (Node_Id N)
++ { return Flag17 (N); }
++ INLINE Boolean Do_Tag_Check (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Elaborate_All_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Boolean Elaborate_Present (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Node_Id Elaboration_Boolean (Node_Id N)
++ { return Node2 (N); }
++ INLINE List_Id Else_Actions (Node_Id N)
++ { return List3 (N); }
++ INLINE List_Id Else_Statements (Node_Id N)
++ { return List4 (N); }
++ INLINE List_Id Elsif_Parts (Node_Id N)
++ { return List3 (N); }
++ INLINE Node_Id Enclosing_Variant (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id End_Label (Node_Id N)
++ { return Node4 (N); }
++ INLINE Uint End_Span (Node_Id N)
++ { return Uint5 (N); }
++ INLINE Node_Id Entity (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Entity_Or_Associated_Node (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Entry_Body_Formal_Part (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Entry_Call_Alternative (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Entry_Call_Statement (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Entry_Direct_Name (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Entry_Index (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Entry_Index_Specification (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Etype (Node_Id N)
++ { return Node5 (N); }
++ INLINE List_Id Exception_Choices (Node_Id N)
++ { return List4 (N); }
++ INLINE List_Id Exception_Handlers (Node_Id N)
++ { return List5 (N); }
++ INLINE Boolean Exception_Junk (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Node_Id Explicit_Actual_Parameter (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Expansion_Delayed (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Node_Id Explicit_Generic_Actual_Parameter (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Expression (Node_Id N)
++ { return Node3 (N); }
++ INLINE List_Id Expressions (Node_Id N)
++ { return List1 (N); }
++ INLINE Node_Id First_Bit (Node_Id N)
++ { return Node3 (N); }
++ INLINE Entity_Id First_Inlined_Subprogram (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean First_Name (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Node_Id First_Named_Actual (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id First_Real_Statement (Node_Id N)
++ { return Node2 (N); }
++ INLINE Entity_Id First_Subtype_Link (Node_Id N)
++ { return Node5 (N); }
++ INLINE Boolean Float_Truncate (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Node_Id Formal_Type_Definition (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Forwards_OK (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Boolean From_At_Mod (Node_Id N)
++ { return Flag4 (N); }
++ INLINE List_Id Generic_Associations (Node_Id N)
++ { return List3 (N); }
++ INLINE List_Id Generic_Formal_Declarations (Node_Id N)
++ { return List2 (N); }
++ INLINE Node_Id Generic_Parent (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Generic_Parent_Type (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Handled_Statement_Sequence (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Handler_List_Entry (Node_Id N)
++ { return Node2 (N); }
++ INLINE Boolean Has_Created_Identifier (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Boolean Has_Dynamic_Length_Check (Node_Id N)
++ { return Flag10 (N); }
++ INLINE Boolean Has_Dynamic_Range_Check (Node_Id N)
++ { return Flag12 (N); }
++ INLINE Boolean Has_No_Elaboration_Code (Node_Id N)
++ { return Flag17 (N); }
++ INLINE Boolean Has_Priority_Pragma (Node_Id N)
++ { return Flag6 (N); }
++ INLINE Boolean Has_Private_View (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Boolean Has_Storage_Size_Pragma (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Boolean Has_Task_Info_Pragma (Node_Id N)
++ { return Flag7 (N); }
++ INLINE Boolean Has_Task_Name_Pragma (Node_Id N)
++ { return Flag8 (N); }
++ INLINE Boolean Has_Wide_Character (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Elist_Id Hidden_By_Use_Clause (Node_Id N)
++ { return Elist4 (N); }
++ INLINE Node_Id High_Bound (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Identifier (Node_Id N)
++ { return Node1 (N); }
++ INLINE Boolean Implicit_With (Node_Id N)
++ { return Flag16 (N); }
++ INLINE Boolean In_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Boolean Includes_Infinities (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Node_Id Instance_Spec (Node_Id N)
++ { return Node5 (N); }
++ INLINE Uint Intval (Node_Id N)
++ { return Uint3 (N); }
++ INLINE Boolean Is_Asynchronous_Call_Block (Node_Id N)
++ { return Flag7 (N); }
++ INLINE Boolean Is_Component_Left_Opnd (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Is_Component_Right_Opnd (Node_Id N)
++ { return Flag14 (N); }
++ INLINE Boolean Is_Controlling_Actual (Node_Id N)
++ { return Flag16 (N); }
++ INLINE Boolean Is_In_Discriminant_Check (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Boolean Is_Machine_Number (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Boolean Is_Null_Loop (Node_Id N)
++ { return Flag16 (N); }
++ INLINE Boolean Is_Overloaded (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Boolean Is_Power_Of_2_For_Shift (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Is_Protected_Subprogram_Body (Node_Id N)
++ { return Flag7 (N); }
++ INLINE Boolean Is_Static_Expression (Node_Id N)
++ { return Flag6 (N); }
++ INLINE Boolean Is_Subprogram_Descriptor (Node_Id N)
++ { return Flag16 (N); }
++ INLINE Boolean Is_Task_Allocation_Block (Node_Id N)
++ { return Flag6 (N); }
++ INLINE Boolean Is_Task_Master (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Node_Id Iteration_Scheme (Node_Id N)
++ { return Node2 (N); }
++ INLINE Entity_Id Itype (Node_Id N)
++ { return Node1 (N); }
++ INLINE Boolean Kill_Range_Check (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Node_Id Label_Construct (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Left_Opnd (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Last_Bit (Node_Id N)
++ { return Node4 (N); }
++ INLINE Boolean Last_Name (Node_Id N)
++ { return Flag6 (N); }
++ INLINE Node_Id Library_Unit (Node_Id N)
++ { return Node4 (N); }
++ INLINE Boolean Limited_View_Installed (Node_Id N)
++ { return Flag18 (N); }
++ INLINE Boolean Limited_Present (Node_Id N)
++ { return Flag17 (N); }
++ INLINE List_Id Literals (Node_Id N)
++ { return List1 (N); }
++ INLINE List_Id Loop_Actions (Node_Id N)
++ { return List2 (N); }
++ INLINE Node_Id Loop_Parameter_Specification (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Low_Bound (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Mod_Clause (Node_Id N)
++ { return Node2 (N); }
++ INLINE Boolean More_Ids (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Boolean Must_Be_Byte_Aligned (Node_Id N)
++ { return Flag14 (N); }
++ INLINE Boolean Must_Not_Freeze (Node_Id N)
++ { return Flag8 (N); }
++ INLINE Node_Id Name (Node_Id N)
++ { return Node2 (N); }
++ INLINE List_Id Names (Node_Id N)
++ { return List2 (N); }
++ INLINE Node_Id Next_Entity (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Next_Named_Actual (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Next_Rep_Item (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Next_Use_Clause (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean No_Ctrl_Actions (Node_Id N)
++ { return Flag7 (N); }
++ INLINE Boolean No_Elaboration_Check (Node_Id N)
++ { return Flag14 (N); }
++ INLINE Boolean No_Entities_Ref_In_Spec (Node_Id N)
++ { return Flag8 (N); }
++ INLINE Boolean No_Initialization (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean No_Truncation (Node_Id N)
++ { return Flag17 (N); }
++ INLINE Boolean Null_Present (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Null_Record_Present (Node_Id N)
++ { return Flag17 (N); }
++ INLINE Node_Id Object_Definition (Node_Id N)
++ { return Node4 (N); }
++ INLINE Boolean OK_For_Stream (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Node_Id Original_Discriminant (Node_Id N)
++ { return Node2 (N); }
++ INLINE Entity_Id Original_Entity (Node_Id N)
++ { return Node2 (N); }
++ INLINE List_Id Others_Discrete_Choices (Node_Id N)
++ { return List1 (N); }
++ INLINE Boolean Out_Present (Node_Id N)
++ { return Flag17 (N); }
++ INLINE List_Id Parameter_Associations (Node_Id N)
++ { return List3 (N); }
++ INLINE Boolean Parameter_List_Truncated (Node_Id N)
++ { return Flag17 (N); }
++ INLINE List_Id Parameter_Specifications (Node_Id N)
++ { return List3 (N); }
++ INLINE Node_Id Parameter_Type (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Parent_Spec (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Position (Node_Id N)
++ { return Node2 (N); }
++ INLINE List_Id Pragma_Argument_Associations (Node_Id N)
++ { return List2 (N); }
++ INLINE List_Id Pragmas_After (Node_Id N)
++ { return List5 (N); }
++ INLINE List_Id Pragmas_Before (Node_Id N)
++ { return List4 (N); }
++ INLINE Node_Id Prefix (Node_Id N)
++ { return Node3 (N); }
++ INLINE Uint Present_Expr (Node_Id N)
++ { return Uint3 (N); }
++ INLINE Boolean Prev_Ids (Node_Id N)
++ { return Flag6 (N); }
++ INLINE Boolean Print_In_Hex (Node_Id N)
++ { return Flag13 (N); }
++ INLINE List_Id Private_Declarations (Node_Id N)
++ { return List3 (N); }
++ INLINE Boolean Private_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Node_Id Procedure_To_Call (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Proper_Body (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Protected_Definition (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Protected_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Boolean Raises_Constraint_Error (Node_Id N)
++ { return Flag7 (N); }
++ INLINE Node_Id Range_Constraint (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Range_Expression (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Real_Range_Specification (Node_Id N)
++ { return Node4 (N); }
++ INLINE Ureal Realval (Node_Id N)
++ { return Ureal3 (N); }
++ INLINE Uint Reason (Node_Id N)
++ { return Uint3 (N); }
++ INLINE Node_Id Record_Extension_Part (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Redundant_Use (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Node_Id Return_Type (Node_Id N)
++ { return Node2 (N); }
++ INLINE Boolean Reverse_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Node_Id Right_Opnd (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Rounded_Result (Node_Id N)
++ { return Flag18 (N); }
++ INLINE Node_Id Scope (Node_Id N)
++ { return Node3 (N); }
++ INLINE List_Id Select_Alternatives (Node_Id N)
++ { return List1 (N); }
++ INLINE Node_Id Selector_Name (Node_Id N)
++ { return Node2 (N); }
++ INLINE List_Id Selector_Names (Node_Id N)
++ { return List1 (N); }
++ INLINE Boolean Shift_Count_OK (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Entity_Id Source_Type (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Specification (Node_Id N)
++ { return Node1 (N); }
++ INLINE List_Id Statements (Node_Id N)
++ { return List3 (N); }
++ INLINE Boolean Static_Processing_OK (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Node_Id Storage_Pool (Node_Id N)
++ { return Node1 (N); }
++ INLINE String_Id Strval (Node_Id N)
++ { return Str3 (N); }
++ INLINE Node_Id Subtype_Indication (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Subtype_Mark (Node_Id N)
++ { return Node4 (N); }
++ INLINE List_Id Subtype_Marks (Node_Id N)
++ { return List2 (N); }
++ INLINE Boolean Tagged_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Entity_Id Target_Type (Node_Id N)
++ { return Node2 (N); }
++ INLINE Entity_Id Task_Body_Procedure (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Task_Definition (Node_Id N)
++ { return Node3 (N); }
++ INLINE List_Id Then_Actions (Node_Id N)
++ { return List2 (N); }
++ INLINE List_Id Then_Statements (Node_Id N)
++ { return List2 (N); }
++ INLINE Boolean Treat_Fixed_As_Integer (Node_Id N)
++ { return Flag14 (N); }
++ INLINE Node_Id Triggering_Alternative (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Triggering_Statement (Node_Id N)
++ { return Node1 (N); }
++ INLINE Elist_Id TSS_Elist (Node_Id N)
++ { return Elist3 (N); }
++ INLINE Node_Id Type_Definition (Node_Id N)
++ { return Node3 (N); }
++ INLINE Node_Id Unit (Node_Id N)
++ { return Node2 (N); }
++ INLINE Boolean Unknown_Discriminants_Present (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Unreferenced_In_Spec (Node_Id N)
++ { return Flag7 (N); }
++ INLINE Node_Id Variant_Part (Node_Id N)
++ { return Node4 (N); }
++ INLINE List_Id Variants (Node_Id N)
++ { return List1 (N); }
++ INLINE List_Id Visible_Declarations (Node_Id N)
++ { return List2 (N); }
++ INLINE Boolean Was_Originally_Stub (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Zero_Cost_Handling (Node_Id N)
++ { return Flag5 (N); }
++
+--- gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/einfo.h.orig 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/einfo.h 2004-06-02 00:54:19.000000000 +0200
+@@ -0,0 +1,1814 @@
++/*--------------------------------------------------------------------------*/
++/* */
++/* GNAT COMPILER COMPONENTS */
++/* */
++/* E I N F O */
++/* */
++/* C Header File */
++/* */
++/* Copyright (C) 1992-2003 Free Software Foundation, Inc. */
++/* */
++/* GNAT is free software; you can redistribute it and/or modify it under */
++/* terms of the GNU General Public License as published by the Free Soft- */
++/* ware Foundation; either version 2, or (at your option) any later ver- */
++/* sion. GNAT is distributed in the hope that it will be useful, but WITH- */
++/* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY */
++/* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License */
++/* for more details. You should have received a copy of the GNU General */
++/* Public License distributed with GNAT; see file COPYING. If not, write */
++/* to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, */
++/* MA 02111-1307, USA. */
++/* */
++/* As a special exception, if other files instantiate generics from this */
++/* unit, or you link this unit with other files to produce an executable, */
++/* this unit does not by itself cause the resulting executable to be */
++/* covered by the GNU General Public License. This exception does not */
++/* however invalidate any other reasons why the executable file might be */
++/* covered by the GNU Public License. */
++/* */
++/* GNAT was originally developed by the GNAT team at New York University. */
++/* Extensive contributions were provided by Ada Core Technologies Inc. */
++/* */
++/*--------------------------------------------------------------------------*/
++
++ #define E_Void 0
++ #define E_Variable 1
++ #define E_Component 2
++ #define E_Constant 3
++ #define E_Discriminant 4
++ #define E_Loop_Parameter 5
++ #define E_In_Parameter 6
++ #define E_Out_Parameter 7
++ #define E_In_Out_Parameter 8
++ #define E_Generic_In_Out_Parameter 9
++ #define E_Generic_In_Parameter 10
++ #define E_Named_Integer 11
++ #define E_Named_Real 12
++ #define E_Enumeration_Type 13
++ #define E_Enumeration_Subtype 14
++ #define E_Signed_Integer_Type 15
++ #define E_Signed_Integer_Subtype 16
++ #define E_Modular_Integer_Type 17
++ #define E_Modular_Integer_Subtype 18
++ #define E_Ordinary_Fixed_Point_Type 19
++ #define E_Ordinary_Fixed_Point_Subtype 20
++ #define E_Decimal_Fixed_Point_Type 21
++ #define E_Decimal_Fixed_Point_Subtype 22
++ #define E_Floating_Point_Type 23
++ #define E_Floating_Point_Subtype 24
++ #define E_Access_Type 25
++ #define E_Access_Subtype 26
++ #define E_Access_Attribute_Type 27
++ #define E_Allocator_Type 28
++ #define E_General_Access_Type 29
++ #define E_Access_Subprogram_Type 30
++ #define E_Access_Protected_Subprogram_Type 31
++ #define E_Anonymous_Access_Type 32
++ #define E_Array_Type 33
++ #define E_Array_Subtype 34
++ #define E_String_Type 35
++ #define E_String_Subtype 36
++ #define E_String_Literal_Subtype 37
++ #define E_Class_Wide_Type 38
++ #define E_Class_Wide_Subtype 39
++ #define E_Record_Type 40
++ #define E_Record_Subtype 41
++ #define E_Record_Type_With_Private 42
++ #define E_Record_Subtype_With_Private 43
++ #define E_Private_Type 44
++ #define E_Private_Subtype 45
++ #define E_Limited_Private_Type 46
++ #define E_Limited_Private_Subtype 47
++ #define E_Incomplete_Type 48
++ #define E_Task_Type 49
++ #define E_Task_Subtype 50
++ #define E_Protected_Type 51
++ #define E_Protected_Subtype 52
++ #define E_Exception_Type 53
++ #define E_Subprogram_Type 54
++ #define E_Enumeration_Literal 55
++ #define E_Function 56
++ #define E_Operator 57
++ #define E_Procedure 58
++ #define E_Entry 59
++ #define E_Entry_Family 60
++ #define E_Block 61
++ #define E_Entry_Index_Parameter 62
++ #define E_Exception 63
++ #define E_Generic_Function 64
++ #define E_Generic_Procedure 65
++ #define E_Generic_Package 66
++ #define E_Label 67
++ #define E_Loop 68
++ #define E_Package 69
++ #define E_Package_Body 70
++ #define E_Protected_Object 71
++ #define E_Protected_Body 72
++ #define E_Task_Body 73
++ #define E_Subprogram_Body 74
++
++ SUBTYPE (Access_Kind, Entity_Kind,
++ E_Access_Type, E_Anonymous_Access_Type)
++
++ SUBTYPE (Array_Kind, Entity_Kind,
++ E_Array_Type, E_String_Literal_Subtype)
++
++ SUBTYPE (Class_Wide_Kind, Entity_Kind,
++ E_Class_Wide_Type, E_Class_Wide_Subtype)
++
++ SUBTYPE (Composite_Kind, Entity_Kind,
++ E_Array_Type, E_Protected_Subtype)
++
++ SUBTYPE (Concurrent_Kind, Entity_Kind,
++ E_Task_Type, E_Protected_Subtype)
++
++ SUBTYPE (Concurrent_Body_Kind, Entity_Kind,
++ E_Protected_Body, E_Task_Body)
++
++ SUBTYPE (Decimal_Fixed_Point_Kind, Entity_Kind,
++ E_Decimal_Fixed_Point_Type, E_Decimal_Fixed_Point_Subtype)
++
++ SUBTYPE (Digits_Kind, Entity_Kind,
++ E_Decimal_Fixed_Point_Type, E_Floating_Point_Subtype)
++
++ SUBTYPE (Discrete_Kind, Entity_Kind,
++ E_Enumeration_Type, E_Modular_Integer_Subtype)
++
++ SUBTYPE (Discrete_Or_Fixed_Point_Kind, Entity_Kind,
++ E_Enumeration_Type, E_Decimal_Fixed_Point_Subtype)
++
++ SUBTYPE (Elementary_Kind, Entity_Kind,
++ E_Enumeration_Type, E_Anonymous_Access_Type)
++
++ SUBTYPE (Enumeration_Kind, Entity_Kind,
++ E_Enumeration_Type, E_Enumeration_Subtype)
++
++ SUBTYPE (Entry_Kind, Entity_Kind,
++ E_Entry, E_Entry_Family)
++
++ SUBTYPE (Fixed_Point_Kind, Entity_Kind,
++ E_Ordinary_Fixed_Point_Type, E_Decimal_Fixed_Point_Subtype)
++
++ SUBTYPE (Float_Kind, Entity_Kind,
++ E_Floating_Point_Type, E_Floating_Point_Subtype)
++
++ SUBTYPE (Formal_Kind, Entity_Kind,
++ E_In_Parameter, E_In_Out_Parameter)
++
++ SUBTYPE (Generic_Subprogram_Kind, Entity_Kind,
++ E_Generic_Function, E_Generic_Procedure)
++
++ SUBTYPE (Generic_Unit_Kind, Entity_Kind,
++ E_Generic_Function, E_Generic_Package)
++
++ SUBTYPE (Incomplete_Or_Private_Kind, Entity_Kind,
++ E_Record_Type_With_Private, E_Incomplete_Type)
++
++ SUBTYPE (Integer_Kind, Entity_Kind,
++ E_Signed_Integer_Type, E_Modular_Integer_Subtype)
++
++ SUBTYPE (Modular_Integer_Kind, Entity_Kind,
++ E_Modular_Integer_Type, E_Modular_Integer_Subtype)
++
++ SUBTYPE (Named_Kind, Entity_Kind,
++ E_Named_Integer, E_Named_Real)
++
++ SUBTYPE (Numeric_Kind, Entity_Kind,
++ E_Signed_Integer_Type, E_Floating_Point_Subtype)
++
++ SUBTYPE (Object_Kind, Entity_Kind,
++ E_Variable, E_Generic_In_Parameter)
++
++ SUBTYPE (Ordinary_Fixed_Point_Kind, Entity_Kind,
++ E_Ordinary_Fixed_Point_Type, E_Ordinary_Fixed_Point_Subtype)
++
++ SUBTYPE (Overloadable_Kind, Entity_Kind,
++ E_Enumeration_Literal, E_Entry)
++
++ SUBTYPE (Private_Kind, Entity_Kind,
++ E_Record_Type_With_Private, E_Limited_Private_Subtype)
++
++ SUBTYPE (Protected_Kind, Entity_Kind,
++ E_Protected_Type, E_Protected_Subtype)
++
++ SUBTYPE (Real_Kind, Entity_Kind,
++ E_Ordinary_Fixed_Point_Type, E_Floating_Point_Subtype)
++
++ SUBTYPE (Record_Kind, Entity_Kind,
++ E_Class_Wide_Type, E_Record_Subtype_With_Private)
++
++ SUBTYPE (Scalar_Kind, Entity_Kind,
++ E_Enumeration_Type, E_Floating_Point_Subtype)
++
++ SUBTYPE (String_Kind, Entity_Kind,
++ E_String_Type, E_String_Literal_Subtype)
++
++ SUBTYPE (Subprogram_Kind, Entity_Kind,
++ E_Function, E_Procedure)
++
++ SUBTYPE (Signed_Integer_Kind, Entity_Kind,
++ E_Signed_Integer_Type, E_Signed_Integer_Subtype)
++
++ SUBTYPE (Task_Kind, Entity_Kind,
++ E_Task_Type, E_Task_Subtype)
++
++ SUBTYPE (Type_Kind, Entity_Kind,
++ E_Enumeration_Type, E_Subprogram_Type)
++
++ typedef char Component_Alignment_Kind;
++ #define Calign_Default 0
++ #define Calign_Component_Size 1
++ #define Calign_Component_Size_4 2
++ #define Calign_Storage_Unit 3
++
++ typedef Boolean B;
++ typedef Component_Alignment_Kind C;
++ typedef Entity_Id E;
++ typedef Mechanism_Type M;
++ typedef Node_Id N;
++ typedef Uint U;
++ typedef Ureal R;
++ typedef Elist_Id L;
++ typedef List_Id S;
++
++ INLINE L Accept_Address (E Id);
++ INLINE E Access_Disp_Table (E Id);
++ INLINE E Actual_Subtype (E Id);
++ INLINE B Address_Taken (E Id);
++ INLINE E Alias (E Id);
++ INLINE U Alignment (E Id);
++ INLINE E Associated_Final_Chain (E Id);
++ INLINE E Associated_Formal_Package (E Id);
++ INLINE N Associated_Node_For_Itype (E Id);
++ INLINE E Associated_Storage_Pool (E Id);
++ INLINE N Barrier_Function (E Id);
++ INLINE N Block_Node (E Id);
++ INLINE E Body_Entity (E Id);
++ INLINE B Body_Needed_For_SAL (E Id);
++ INLINE E CR_Discriminant (E Id);
++ INLINE B C_Pass_By_Copy (E Id);
++ INLINE B Can_Never_Be_Null (E Id);
++ INLINE B Checks_May_Be_Suppressed (E Id);
++ INLINE E Class_Wide_Type (E Id);
++ INLINE E Cloned_Subtype (E Id);
++
++ #define Component_Alignment einfo__component_alignment
++ C Component_Alignment (E Id);
++
++ INLINE N Component_Clause (E Id);
++ INLINE U Component_Bit_Offset (E Id);
++ INLINE U Component_Size (E Id);
++ INLINE E Component_Type (E Id);
++ INLINE E Corresponding_Concurrent_Type (E Id);
++ INLINE E Corresponding_Discriminant (E Id);
++ INLINE E Corresponding_Equality (E Id);
++ INLINE E Corresponding_Record_Type (E Id);
++ INLINE E Corresponding_Remote_Type (E Id);
++ INLINE N Current_Value (E Id);
++ INLINE B Debug_Info_Off (E Id);
++ INLINE E Debug_Renaming_Link (E Id);
++ INLINE E DTC_Entity (E Id);
++ INLINE U DT_Entry_Count (E Id);
++ INLINE U DT_Position (E Id);
++ INLINE E Default_Expr_Function (E Id);
++ INLINE B Default_Expressions_Processed (E Id);
++ INLINE N Default_Value (E Id);
++ INLINE B Delay_Cleanups (E Id);
++ INLINE B Delay_Subprogram_Descriptors (E Id);
++ INLINE R Delta_Value (E Id);
++ INLINE L Dependent_Instances (E Id);
++ INLINE B Depends_On_Private (E Id);
++ INLINE U Digits_Value (E Id);
++ INLINE E Directly_Designated_Type (E Id);
++ INLINE B Discard_Names (E Id);
++ INLINE E Discriminal (E Id);
++ INLINE E Discriminal_Link (E Id);
++ INLINE E Discriminant_Checking_Func (E Id);
++ INLINE L Discriminant_Constraint (E Id);
++ INLINE N Discriminant_Default_Value (E Id);
++ INLINE U Discriminant_Number (E Id);
++ INLINE B Elaborate_All_Desirable (E Id);
++ INLINE E Elaboration_Entity (E Id);
++ INLINE B Elaboration_Entity_Required (E Id);
++ INLINE E Enclosing_Scope (E Id);
++ INLINE B Entry_Accepted (E Id);
++ INLINE E Entry_Bodies_Array (E Id);
++ INLINE E Entry_Cancel_Parameter (E Id);
++ INLINE E Entry_Component (E Id);
++ INLINE E Entry_Formal (E Id);
++ INLINE E Entry_Index_Constant (E Id);
++ INLINE E Entry_Index_Type (E Id);
++ INLINE E Entry_Parameters_Type (E Id);
++ INLINE E Enum_Pos_To_Rep (E Id);
++ INLINE U Enumeration_Pos (E Id);
++ INLINE U Enumeration_Rep (E Id);
++ INLINE N Enumeration_Rep_Expr (E Id);
++ INLINE E Equivalent_Type (E Id);
++ INLINE U Esize (E Id);
++ INLINE U Exception_Code (E Id);
++ INLINE E Extra_Accessibility (E Id);
++ INLINE E Extra_Constrained (E Id);
++ INLINE E Extra_Formal (E Id);
++ INLINE E Finalization_Chain_Entity (E Id);
++
++ #define Finalize_Storage_Only einfo__finalize_storage_only
++ B Finalize_Storage_Only (E Id);
++
++ INLINE E First_Entity (E Id);
++ INLINE N First_Index (E Id);
++ INLINE E First_Literal (E Id);
++ INLINE E First_Optional_Parameter (E Id);
++ INLINE E First_Private_Entity (E Id);
++ INLINE N First_Rep_Item (E Id);
++ INLINE N Freeze_Node (E Id);
++ INLINE B From_With_Type (E Id);
++ INLINE E Full_View (E Id);
++ INLINE B Function_Returns_With_DSP (E Id);
++ INLINE E Generic_Homonym (E Id);
++ INLINE L Generic_Renamings (E Id);
++ INLINE S Handler_Records (E Id);
++ INLINE B Has_Aliased_Components (E Id);
++ INLINE B Has_Alignment_Clause (E Id);
++ INLINE B Has_All_Calls_Remote (E Id);
++ INLINE B Has_Atomic_Components (E Id);
++ INLINE B Has_Biased_Representation (E Id);
++ INLINE B Has_Completion (E Id);
++ INLINE B Has_Completion_In_Body (E Id);
++ INLINE B Has_Complex_Representation (E Id);
++ INLINE B Has_Component_Size_Clause (E Id);
++ INLINE B Has_Contiguous_Rep (E Id);
++ INLINE B Has_Controlled_Component (E Id);
++ INLINE B Has_Controlling_Result (E Id);
++ INLINE B Has_Convention_Pragma (E Id);
++ INLINE B Has_Delayed_Freeze (E Id);
++ INLINE B Has_Discriminants (E Id);
++ INLINE B Has_Enumeration_Rep_Clause (E Id);
++ INLINE B Has_Exit (E Id);
++ INLINE B Has_External_Tag_Rep_Clause (E Id);
++ INLINE B Has_Fully_Qualified_Name (E Id);
++ INLINE B Has_Gigi_Rep_Item (E Id);
++ INLINE B Has_Homonym (E Id);
++
++ #define Has_Interrupt_Handler einfo__has_interrupt_handler
++ B Has_Interrupt_Handler (E Id);
++
++ INLINE B Has_Machine_Radix_Clause (E Id);
++ INLINE B Has_Master_Entity (E Id);
++ INLINE B Has_Missing_Return (E Id);
++ INLINE B Has_Nested_Block_With_Handler (E Id);
++ INLINE B Has_Forward_Instantiation (E Id);
++ INLINE B Has_Non_Standard_Rep (E Id);
++ INLINE B Has_Object_Size_Clause (E Id);
++ INLINE B Has_Per_Object_Constraint (E Id);
++ INLINE B Has_Pragma_Controlled (E Id);
++ INLINE B Has_Pragma_Elaborate_Body (E Id);
++ INLINE B Has_Pragma_Inline (E Id);
++ INLINE B Has_Pragma_Pack (E Id);
++ INLINE B Has_Pragma_Pure_Function (E Id);
++ INLINE B Has_Pragma_Unreferenced (E Id);
++ INLINE B Has_Primitive_Operations (E Id);
++ INLINE B Has_Qualified_Name (E Id);
++ INLINE B Has_Record_Rep_Clause (E Id);
++ INLINE B Has_Recursive_Call (E Id);
++ INLINE B Has_Size_Clause (E Id);
++ INLINE B Has_Small_Clause (E Id);
++ INLINE B Has_Specified_Layout (E Id);
++ INLINE B Has_Storage_Size_Clause (E Id);
++ INLINE B Has_Subprogram_Descriptor (E Id);
++ INLINE B Has_Task (E Id);
++ INLINE B Has_Unchecked_Union (E Id);
++ INLINE B Has_Unknown_Discriminants (E Id);
++ INLINE B Has_Volatile_Components (E Id);
++ INLINE B Has_Xref_Entry (E Id);
++ INLINE E Hiding_Loop_Variable (E Id);
++ INLINE E Homonym (E Id);
++ INLINE B In_Package_Body (E Id);
++ INLINE B In_Private_Part (E Id);
++ INLINE B In_Use (E Id);
++ INLINE L Inner_Instances (E Id);
++ INLINE N Interface_Name (E Id);
++ INLINE B Is_AST_Entry (E Id);
++ INLINE B Is_Abstract (E Id);
++ INLINE B Is_Access_Constant (E Id);
++ INLINE B Is_Aliased (E Id);
++ INLINE B Is_Asynchronous (E Id);
++ INLINE B Is_Atomic (E Id);
++ INLINE B Is_Bit_Packed_Array (E Id);
++ INLINE B Is_CPP_Class (E Id);
++ INLINE B Is_Called (E Id);
++ INLINE B Is_Character_Type (E Id);
++ INLINE B Is_Child_Unit (E Id);
++ INLINE B Is_Class_Wide_Equivalent_Type (E Id);
++ INLINE B Is_Compilation_Unit (E Id);
++ INLINE B Is_Completely_Hidden (E Id);
++ INLINE B Is_Constr_Subt_For_UN_Aliased (E Id);
++ INLINE B Is_Constr_Subt_For_U_Nominal (E Id);
++ INLINE B Is_Constrained (E Id);
++ INLINE B Is_Constructor (E Id);
++ INLINE B Is_Controlled (E Id);
++ INLINE B Is_Controlling_Formal (E Id);
++ INLINE B Is_Discrim_SO_Function (E Id);
++ INLINE B Is_Dispatching_Operation (E Id);
++ INLINE B Is_Eliminated (E Id);
++ INLINE B Is_Entry_Formal (E Id);
++ INLINE B Is_Exported (E Id);
++ INLINE B Is_First_Subtype (E Id);
++ INLINE B Is_For_Access_Subtype (E Id);
++ INLINE B Is_Frozen (E Id);
++ INLINE B Is_Generic_Instance (E Id);
++ INLINE B Is_Hidden (E Id);
++ INLINE B Is_Hidden_Open_Scope (E Id);
++ INLINE B Is_Immediately_Visible (E Id);
++ INLINE B Is_Imported (E Id);
++ INLINE B Is_Inlined (E Id);
++ INLINE B Is_Instantiated (E Id);
++ INLINE B Is_Internal (E Id);
++ INLINE B Is_Interrupt_Handler (E Id);
++ INLINE B Is_Intrinsic_Subprogram (E Id);
++ INLINE B Is_Itype (E Id);
++ INLINE B Is_Known_Non_Null (E Id);
++ INLINE B Is_Known_Valid (E Id);
++ INLINE B Is_Limited_Composite (E Id);
++ INLINE B Is_Machine_Code_Subprogram (E Id);
++ INLINE B Is_Non_Static_Subtype (E Id);
++ INLINE B Is_Null_Init_Proc (E Id);
++ INLINE B Is_Optional_Parameter (E Id);
++ INLINE B Is_Package_Body_Entity (E Id);
++ INLINE B Is_Packed (E Id);
++ INLINE B Is_Packed_Array_Type (E Id);
++ INLINE B Is_Potentially_Use_Visible (E Id);
++ INLINE B Is_Preelaborated (E Id);
++ INLINE B Is_Private_Composite (E Id);
++ INLINE B Is_Private_Descendant (E Id);
++ INLINE B Is_Psected (E Id);
++ INLINE B Is_Public (E Id);
++ INLINE B Is_Pure (E Id);
++ INLINE B Is_Remote_Call_Interface (E Id);
++ INLINE B Is_Remote_Types (E Id);
++ INLINE B Is_Renaming_Of_Object (E Id);
++ INLINE B Is_Shared_Passive (E Id);
++ INLINE B Is_Statically_Allocated (E Id);
++ INLINE B Is_Tag (E Id);
++ INLINE B Is_Tagged_Type (E Id);
++ INLINE B Is_Thread_Body (E Id);
++ INLINE B Is_True_Constant (E Id);
++ INLINE B Is_Unchecked_Union (E Id);
++ INLINE B Is_Unsigned_Type (E Id);
++ INLINE B Is_VMS_Exception (E Id);
++ INLINE B Is_Valued_Procedure (E Id);
++ INLINE B Is_Visible_Child_Unit (E Id);
++
++ #define Is_Volatile einfo__is_volatile
++ B Is_Volatile (E Id);
++
++ #define Is_Wrapper_Package einfo__is_wrapper_package
++ B Is_Wrapper_Package (E Id);
++
++ INLINE B Kill_Elaboration_Checks (E Id);
++ INLINE B Kill_Range_Checks (E Id);
++ INLINE B Kill_Tag_Checks (E Id);
++ INLINE E Last_Entity (E Id);
++ INLINE L Limited_Views (E Id);
++ INLINE E Lit_Indexes (E Id);
++ INLINE E Lit_Strings (E Id);
++ INLINE B Machine_Radix_10 (E Id);
++ INLINE E Master_Id (E Id);
++ INLINE B Materialize_Entity (E Id);
++ INLINE M Mechanism (E Id);
++ INLINE U Modulus (E Id);
++ INLINE B Needs_Debug_Info (E Id);
++ INLINE B Needs_No_Actuals (E Id);
++ INLINE B Never_Set_In_Source (E Id);
++ INLINE E Next_Inlined_Subprogram (E Id);
++ INLINE B No_Pool_Assigned (E Id);
++ INLINE B No_Return (E Id);
++ INLINE B Non_Binary_Modulus (E Id);
++ INLINE E Non_Limited_View (E Id);
++ INLINE B Nonzero_Is_True (E Id);
++ INLINE U Normalized_First_Bit (E Id);
++ INLINE U Normalized_Position (E Id);
++ INLINE U Normalized_Position_Max (E Id);
++ INLINE E Object_Ref (E Id);
++ INLINE E Original_Array_Type (E Id);
++ INLINE E Original_Record_Component (E Id);
++ INLINE E Packed_Array_Type (E Id);
++ INLINE E Parent_Subtype (E Id);
++ INLINE L Primitive_Operations (E Id);
++ INLINE E Prival (E Id);
++ INLINE L Privals_Chain (E Id);
++ INLINE L Private_Dependents (E Id);
++ INLINE N Private_View (E Id);
++ INLINE E Protected_Body_Subprogram (E Id);
++ INLINE E Protected_Formal (E Id);
++ INLINE E Protected_Operation (E Id);
++ INLINE U RM_Size (E Id);
++ INLINE B Reachable (E Id);
++ INLINE B Referenced (E Id);
++ INLINE B Referenced_As_LHS (E Id);
++ INLINE N Referenced_Object (E Id);
++ INLINE N Register_Exception_Call (E Id);
++ INLINE E Related_Array_Object (E Id);
++ INLINE E Related_Instance (E Id);
++ INLINE N Renamed_Entity (E Id);
++ INLINE N Renamed_Object (E Id);
++ INLINE U Renaming_Map (E Id);
++ INLINE B Return_Present (E Id);
++ INLINE B Returns_By_Ref (E Id);
++ INLINE B Reverse_Bit_Order (E Id);
++ INLINE N Scalar_Range (E Id);
++ INLINE U Scale_Value (E Id);
++ INLINE U Scope_Depth_Value (E Id);
++ INLINE B Sec_Stack_Needed_For_Return (E Id);
++ INLINE S Shadow_Entities (E Id);
++ INLINE E Shared_Var_Assign_Proc (E Id);
++ INLINE E Shared_Var_Read_Proc (E Id);
++ INLINE N Size_Check_Code (E Id);
++ INLINE B Size_Known_At_Compile_Time (E Id);
++ INLINE B Size_Depends_On_Discriminant (E Id);
++ INLINE R Small_Value (E Id);
++ INLINE E Spec_Entity (E Id);
++ INLINE E Storage_Size_Variable (E Id);
++ INLINE L Stored_Constraint (E Id);
++ INLINE B Strict_Alignment (E Id);
++ INLINE U String_Literal_Length (E Id);
++ INLINE N String_Literal_Low_Bound (E Id);
++ INLINE B Suppress_Elaboration_Warnings (E Id);
++ INLINE B Suppress_Init_Proc (E Id);
++ INLINE B Suppress_Style_Checks (E Id);
++ INLINE B Treat_As_Volatile (E Id);
++ INLINE E Underlying_Full_View (E Id);
++ INLINE N Unset_Reference (E Id);
++ INLINE B Uses_Sec_Stack (E Id);
++ INLINE B Vax_Float (E Id);
++ INLINE B Warnings_Off (E Id);
++ INLINE B Is_Access_Type (E Id);
++ INLINE B Is_Array_Type (E Id);
++ INLINE B Is_Class_Wide_Type (E Id);
++ INLINE B Is_Composite_Type (E Id);
++ INLINE B Is_Concurrent_Body (E Id);
++ INLINE B Is_Concurrent_Record_Type (E Id);
++ INLINE B Is_Concurrent_Type (E Id);
++ INLINE B Is_Decimal_Fixed_Point_Type (E Id);
++ INLINE B Is_Digits_Type (E Id);
++ INLINE B Is_Discrete_Or_Fixed_Point_Type (E Id);
++ INLINE B Is_Discrete_Type (E Id);
++ INLINE B Is_Elementary_Type (E Id);
++ INLINE B Is_Entry (E Id);
++ INLINE B Is_Enumeration_Type (E Id);
++ INLINE B Is_Fixed_Point_Type (E Id);
++ INLINE B Is_Floating_Point_Type (E Id);
++ INLINE B Is_Formal (E Id);
++ INLINE B Is_Formal_Subprogram (E Id);
++ INLINE B Is_Generic_Actual_Type (E Id);
++ INLINE B Is_Generic_Unit (E Id);
++ INLINE B Is_Generic_Type (E Id);
++ INLINE B Is_Generic_Subprogram (E Id);
++ INLINE B Is_Incomplete_Or_Private_Type (E Id);
++ INLINE B Is_Integer_Type (E Id);
++ INLINE B Is_Limited_Record (E Id);
++ INLINE B Is_Modular_Integer_Type (E Id);
++ INLINE B Is_Named_Number (E Id);
++ INLINE B Is_Numeric_Type (E Id);
++ INLINE B Is_Object (E Id);
++ INLINE B Is_Ordinary_Fixed_Point_Type (E Id);
++ INLINE B Is_Overloadable (E Id);
++ INLINE B Is_Overriding_Operation (E Id);
++ INLINE B Is_Private_Type (E Id);
++ INLINE B Is_Protected_Type (E Id);
++ INLINE B Is_Real_Type (E Id);
++ INLINE B Is_Record_Type (E Id);
++ INLINE B Is_Scalar_Type (E Id);
++ INLINE B Is_Signed_Integer_Type (E Id);
++ INLINE B Is_Subprogram (E Id);
++ INLINE B Is_Task_Type (E Id);
++ INLINE B Is_Type (E Id);
++
++ #define Address_Clause einfo__address_clause
++ N Address_Clause (E Id);
++
++ #define Alignment_Clause einfo__alignment_clause
++ N Alignment_Clause (E Id);
++
++ #define Ancestor_Subtype einfo__ancestor_subtype
++ E Ancestor_Subtype (E Id);
++
++ #define Base_Type einfo__base_type
++ E Base_Type (E Id);
++
++ #define Constant_Value einfo__constant_value
++ N Constant_Value (E Id);
++
++ #define Declaration_Node einfo__declaration_node
++ N Declaration_Node (E Id);
++
++ #define Designated_Type einfo__designated_type
++ E Designated_Type (E Id);
++
++ #define Enclosing_Dynamic_Scope einfo__enclosing_dynamic_scope
++ E Enclosing_Dynamic_Scope (E Id);
++
++ #define First_Component einfo__first_component
++ E First_Component (E Id);
++
++ #define First_Discriminant einfo__first_discriminant
++ E First_Discriminant (E Id);
++
++ #define First_Formal einfo__first_formal
++ E First_Formal (E Id);
++
++ #define First_Stored_Discriminant einfo__first_stored_discriminant
++ E First_Stored_Discriminant (E Id);
++
++ #define First_Subtype einfo__first_subtype
++ E First_Subtype (E Id);
++
++ #define Has_Attach_Handler einfo__has_attach_handler
++ B Has_Attach_Handler (E Id);
++
++ #define Has_Entries einfo__has_entries
++ B Has_Entries (E Id);
++
++ #define Has_Foreign_Convention einfo__has_foreign_convention
++ B Has_Foreign_Convention (E Id);
++
++ #define Has_Private_Ancestor einfo__has_private_ancestor
++ B Has_Private_Ancestor (E Id);
++
++ INLINE B Has_Private_Declaration (E Id);
++
++ #define Implementation_Base_Type einfo__implementation_base_type
++ E Implementation_Base_Type (E Id);
++
++ #define Is_Always_Inlined einfo__is_always_inlined
++ B Is_Always_Inlined (E Id);
++
++ #define Is_Boolean_Type einfo__is_boolean_type
++ B Is_Boolean_Type (E Id);
++
++ #define Is_By_Copy_Type einfo__is_by_copy_type
++ B Is_By_Copy_Type (E Id);
++
++ #define Is_By_Reference_Type einfo__is_by_reference_type
++ B Is_By_Reference_Type (E Id);
++
++ #define Is_Derived_Type einfo__is_derived_type
++ B Is_Derived_Type (E Id);
++
++ #define Is_Dynamic_Scope einfo__is_dynamic_scope
++ B Is_Dynamic_Scope (E Id);
++
++ #define Is_Indefinite_Subtype einfo__is_indefinite_subtype
++ B Is_Indefinite_Subtype (E Id);
++
++ #define Is_Limited_Type einfo__is_limited_type
++ B Is_Limited_Type (E Id);
++
++ #define Is_Package einfo__is_package
++ B Is_Package (E Id);
++
++ #define Is_Protected_Private einfo__is_protected_private
++ B Is_Protected_Private (E Id);
++
++ #define Is_Protected_Record_Type einfo__is_protected_record_type
++ B Is_Protected_Record_Type (E Id);
++
++ #define Is_Return_By_Reference_Type einfo__is_return_by_reference_type
++ B Is_Return_By_Reference_Type (E Id);
++
++ #define Is_String_Type einfo__is_string_type
++ B Is_String_Type (E Id);
++
++ #define Is_Task_Record_Type einfo__is_task_record_type
++ B Is_Task_Record_Type (E Id);
++
++ #define Next_Component einfo__next_component
++ E Next_Component (E Id);
++
++ #define Next_Discriminant einfo__next_discriminant
++ E Next_Discriminant (E Id);
++
++ #define Next_Formal einfo__next_formal
++ E Next_Formal (E Id);
++
++ #define Next_Formal_With_Extras einfo__next_formal_with_extras
++ E Next_Formal_With_Extras (E Id);
++
++ INLINE E Next_Literal (E Id);
++
++ #define Next_Stored_Discriminant einfo__next_stored_discriminant
++ E Next_Stored_Discriminant (E Id);
++
++ #define Number_Dimensions einfo__number_dimensions
++ Pos Number_Dimensions (E Id);
++
++ #define Number_Discriminants einfo__number_discriminants
++ Pos Number_Discriminants (E Id);
++
++ #define Number_Entries einfo__number_entries
++ Nat Number_Entries (E Id);
++
++ #define Number_Formals einfo__number_formals
++ Pos Number_Formals (E Id);
++
++ INLINE Formal_Kind Parameter_Mode (E Id);
++
++ #define Root_Type einfo__root_type
++ E Root_Type (E Id);
++
++ #define Scope_Depth_Set einfo__scope_depth_set
++ B Scope_Depth_Set (E Id);
++
++ #define Size_Clause einfo__size_clause
++ N Size_Clause (E Id);
++
++ #define Tag_Component einfo__tag_component
++ E Tag_Component (E Id);
++
++ #define Type_High_Bound einfo__type_high_bound
++ N Type_High_Bound (E Id);
++
++ #define Type_Low_Bound einfo__type_low_bound
++ N Type_Low_Bound (E Id);
++
++ #define Underlying_Type einfo__underlying_type
++ E Underlying_Type (E Id);
++
++ #define Known_Alignment einfo__known_alignment
++ B Known_Alignment (Entity_Id E);
++
++ #define Known_Component_Bit_Offset einfo__known_component_bit_offset
++ B Known_Component_Bit_Offset (Entity_Id E);
++
++ #define Known_Component_Size einfo__known_component_size
++ B Known_Component_Size (Entity_Id E);
++
++ #define Known_Esize einfo__known_esize
++ B Known_Esize (Entity_Id E);
++
++ #define Known_Normalized_First_Bit einfo__known_normalized_first_bit
++ B Known_Normalized_First_Bit (Entity_Id E);
++
++ #define Known_Normalized_Position einfo__known_normalized_position
++ B Known_Normalized_Position (Entity_Id E);
++
++ #define Known_Normalized_Position_Max einfo__known_normalized_position_max
++ B Known_Normalized_Position_Max (Entity_Id E);
++
++ #define Known_RM_Size einfo__known_rm_size
++ B Known_RM_Size (Entity_Id E);
++
++ #define Known_Static_Component_Bit_Offset einfo__known_static_component_bit_offset
++ B Known_Static_Component_Bit_Offset (Entity_Id E);
++
++ #define Known_Static_Component_Size einfo__known_static_component_size
++ B Known_Static_Component_Size (Entity_Id E);
++
++ #define Known_Static_Esize einfo__known_static_esize
++ B Known_Static_Esize (Entity_Id E);
++
++ #define Known_Static_Normalized_First_Bit einfo__known_static_normalized_first_bit
++ B Known_Static_Normalized_First_Bit (Entity_Id E);
++
++ #define Known_Static_Normalized_Position einfo__known_static_normalized_position
++ B Known_Static_Normalized_Position (Entity_Id E);
++
++ #define Known_Static_Normalized_Position_Max einfo__known_static_normalized_position_max
++ B Known_Static_Normalized_Position_Max (Entity_Id E);
++
++ #define Known_Static_RM_Size einfo__known_static_rm_size
++ B Known_Static_RM_Size (Entity_Id E);
++
++ #define Unknown_Alignment einfo__unknown_alignment
++ B Unknown_Alignment (Entity_Id E);
++
++ #define Unknown_Component_Bit_Offset einfo__unknown_component_bit_offset
++ B Unknown_Component_Bit_Offset (Entity_Id E);
++
++ #define Unknown_Component_Size einfo__unknown_component_size
++ B Unknown_Component_Size (Entity_Id E);
++
++ #define Unknown_Esize einfo__unknown_esize
++ B Unknown_Esize (Entity_Id E);
++
++ #define Unknown_Normalized_First_Bit einfo__unknown_normalized_first_bit
++ B Unknown_Normalized_First_Bit (Entity_Id E);
++
++ #define Unknown_Normalized_Position einfo__unknown_normalized_position
++ B Unknown_Normalized_Position (Entity_Id E);
++
++ #define Unknown_Normalized_Position_Max einfo__unknown_normalized_position_max
++ B Unknown_Normalized_Position_Max (Entity_Id E);
++
++ #define Unknown_RM_Size einfo__unknown_rm_size
++ B Unknown_RM_Size (Entity_Id E);
++
++
++ INLINE L Accept_Address (E Id)
++ { return Elist21 (Id); }
++
++ INLINE E Access_Disp_Table (E Id)
++ { return Node16 (Implementation_Base_Type (Id)); }
++
++ INLINE E Actual_Subtype (E Id)
++ { return Node17 (Id); }
++
++ INLINE B Address_Taken (E Id)
++ { return Flag104 (Id); }
++
++ INLINE E Alias (E Id)
++ { return Node18 (Id); }
++
++ INLINE U Alignment (E Id)
++ { return Uint14 (Id); }
++
++ INLINE E Associated_Final_Chain (E Id)
++ { return Node23 (Id); }
++
++ INLINE E Associated_Formal_Package (E Id)
++ { return Node12 (Id); }
++
++ INLINE N Associated_Node_For_Itype (E Id)
++ { return Node8 (Id); }
++
++ INLINE E Associated_Storage_Pool (E Id)
++ { return Node22 (Root_Type (Id)); }
++
++ INLINE N Barrier_Function (E Id)
++ { return Node12 (Id); }
++
++ INLINE N Block_Node (E Id)
++ { return Node11 (Id); }
++
++ INLINE E Body_Entity (E Id)
++ { return Node19 (Id); }
++
++ INLINE B Body_Needed_For_SAL (E Id)
++ { return Flag40 (Id); }
++
++ INLINE B C_Pass_By_Copy (E Id)
++ { return Flag125 (Implementation_Base_Type (Id)); }
++
++ INLINE B Can_Never_Be_Null (E Id)
++ { return Flag38 (Id); }
++
++ INLINE B Checks_May_Be_Suppressed (E Id)
++ { return Flag31 (Id); }
++
++ INLINE E Class_Wide_Type (E Id)
++ { return Node9 (Id); }
++
++ INLINE E Cloned_Subtype (E Id)
++ { return Node16 (Id); }
++
++ INLINE U Component_Bit_Offset (E Id)
++ { return Uint11 (Id); }
++
++ INLINE N Component_Clause (E Id)
++ { return Node13 (Id); }
++
++ INLINE U Component_Size (E Id)
++ { return Uint22 (Implementation_Base_Type (Id)); }
++
++ INLINE E Component_Type (E Id)
++ { return Node20 (Implementation_Base_Type (Id)); }
++
++ INLINE E Corresponding_Concurrent_Type (E Id)
++ { return Node18 (Id); }
++
++ INLINE E Corresponding_Discriminant (E Id)
++ { return Node19 (Id); }
++
++ INLINE E Corresponding_Equality (E Id)
++ { return Node13 (Id); }
++
++ INLINE E Corresponding_Record_Type (E Id)
++ { return Node18 (Id); }
++
++ INLINE E Corresponding_Remote_Type (E Id)
++ { return Node22 (Id); }
++
++ INLINE N Current_Value (E Id)
++ { return Node9 (Id); }
++
++ INLINE E CR_Discriminant (E Id)
++ { return Node23 (Id); }
++
++ INLINE B Debug_Info_Off (E Id)
++ { return Flag166 (Id); }
++
++ INLINE E Debug_Renaming_Link (E Id)
++ { return Node13 (Id); }
++
++ INLINE E Default_Expr_Function (E Id)
++ { return Node21 (Id); }
++
++ INLINE B Default_Expressions_Processed (E Id)
++ { return Flag108 (Id); }
++
++ INLINE N Default_Value (E Id)
++ { return Node20 (Id); }
++
++ INLINE B Delay_Cleanups (E Id)
++ { return Flag114 (Id); }
++
++ INLINE B Delay_Subprogram_Descriptors (E Id)
++ { return Flag50 (Id); }
++
++ INLINE R Delta_Value (E Id)
++ { return Ureal18 (Id); }
++
++ INLINE L Dependent_Instances (E Id)
++ { return Elist8 (Id); }
++
++ INLINE B Depends_On_Private (E Id)
++ { return Flag14 (Id); }
++
++ INLINE U Digits_Value (E Id)
++ { return Uint17 (Id); }
++
++ INLINE E Directly_Designated_Type (E Id)
++ { return Node20 (Id); }
++
++ INLINE B Discard_Names (E Id)
++ { return Flag88 (Id); }
++
++ INLINE E Discriminal (E Id)
++ { return Node17 (Id); }
++
++ INLINE N Discriminal_Link (E Id)
++ { return Node10 (Id); }
++
++ INLINE E Discriminant_Checking_Func (E Id)
++ { return Node20 (Id); }
++
++ INLINE L Discriminant_Constraint (E Id)
++ { return Elist21 (Id); }
++
++ INLINE N Discriminant_Default_Value (E Id)
++ { return Node20 (Id); }
++
++ INLINE U Discriminant_Number (E Id)
++ { return Uint15 (Id); }
++
++ INLINE U DT_Entry_Count (E Id)
++ { return Uint15 (Id); }
++
++ INLINE U DT_Position (E Id)
++ { return Uint15 (Id); }
++
++ INLINE E DTC_Entity (E Id)
++ { return Node16 (Id); }
++
++ INLINE B Elaborate_All_Desirable (E Id)
++ { return Flag146 (Id); }
++
++ INLINE E Elaboration_Entity (E Id)
++ { return Node13 (Id); }
++
++ INLINE B Elaboration_Entity_Required (E Id)
++ { return Flag174 (Id); }
++
++ INLINE E Enclosing_Scope (E Id)
++ { return Node18 (Id); }
++
++ INLINE B Entry_Accepted (E Id)
++ { return Flag152 (Id); }
++
++ INLINE E Entry_Bodies_Array (E Id)
++ { return Node15 (Id); }
++
++ INLINE E Entry_Cancel_Parameter (E Id)
++ { return Node23 (Id); }
++
++ INLINE E Entry_Component (E Id)
++ { return Node11 (Id); }
++
++ INLINE E Entry_Formal (E Id)
++ { return Node16 (Id); }
++
++ INLINE N Entry_Index_Constant (E Id)
++ { return Node18 (Id); }
++
++ INLINE E Entry_Parameters_Type (E Id)
++ { return Node15 (Id); }
++
++ INLINE E Enum_Pos_To_Rep (E Id)
++ { return Node23 (Id); }
++
++ INLINE Uint Enumeration_Pos (E Id)
++ { return Uint11 (Id); }
++
++ INLINE U Enumeration_Rep (E Id)
++ { return Uint12 (Id); }
++
++ INLINE N Enumeration_Rep_Expr (E Id)
++ { return Node22 (Id); }
++
++ INLINE E Equivalent_Type (E Id)
++ { return Node18 (Id); }
++
++ INLINE Uint Esize (E Id)
++ { return Uint12 (Id); }
++
++ INLINE Uint Exception_Code (E Id)
++ { return Uint22 (Id); }
++
++ INLINE E Extra_Accessibility (E Id)
++ { return Node13 (Id); }
++
++ INLINE E Extra_Constrained (E Id)
++ { return Node23 (Id); }
++
++ INLINE E Extra_Formal (E Id)
++ { return Node15 (Id); }
++
++ INLINE E Finalization_Chain_Entity (E Id)
++ { return Node19 (Id); }
++
++ INLINE E First_Entity (E Id)
++ { return Node17 (Id); }
++
++ INLINE N First_Index (E Id)
++ { return Node17 (Id); }
++
++ INLINE E First_Literal (E Id)
++ { return Node17 (Id); }
++
++ INLINE E First_Optional_Parameter (E Id)
++ { return Node14 (Id); }
++
++ INLINE E First_Private_Entity (E Id)
++ { return Node16 (Id); }
++
++ INLINE E First_Rep_Item (E Id)
++ { return Node6 (Id); }
++
++ INLINE N Freeze_Node (E Id)
++ { return Node7 (Id); }
++
++ INLINE B From_With_Type (E Id)
++ { return Flag159 (Id); }
++
++ INLINE E Full_View (E Id)
++ { return Node11 (Id); }
++
++ INLINE B Function_Returns_With_DSP (E Id)
++ { return Flag169 (Id); }
++
++ INLINE E Generic_Homonym (E Id)
++ { return Node11 (Id); }
++
++ INLINE L Generic_Renamings (E Id)
++ { return Elist23 (Id); }
++
++ INLINE S Handler_Records (E Id)
++ { return List10 (Id); }
++
++ INLINE B Has_Aliased_Components (E Id)
++ { return Flag135 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Alignment_Clause (E Id)
++ { return Flag46 (Id); }
++
++ INLINE B Has_All_Calls_Remote (E Id)
++ { return Flag79 (Id); }
++
++ INLINE B Has_Atomic_Components (E Id)
++ { return Flag86 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Biased_Representation (E Id)
++ { return Flag139 (Id); }
++
++ INLINE B Has_Completion (E Id)
++ { return Flag26 (Id); }
++
++ INLINE B Has_Completion_In_Body (E Id)
++ { return Flag71 (Id); }
++
++ INLINE B Has_Complex_Representation (E Id)
++ { return Flag140 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Component_Size_Clause (E Id)
++ { return Flag68 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Controlled_Component (E Id)
++ { return Flag43 (Base_Type (Id)); }
++
++ INLINE B Has_Contiguous_Rep (E Id)
++ { return Flag181 (Id); }
++
++ INLINE B Has_Controlling_Result (E Id)
++ { return Flag98 (Id); }
++
++ INLINE B Has_Convention_Pragma (E Id)
++ { return Flag119 (Id); }
++
++ INLINE B Has_Delayed_Freeze (E Id)
++ { return Flag18 (Id); }
++
++ INLINE B Has_Discriminants (E Id)
++ { return Flag5 (Id); }
++
++ INLINE B Has_Enumeration_Rep_Clause (E Id)
++ { return Flag66 (Id); }
++
++ INLINE B Has_Exit (E Id)
++ { return Flag47 (Id); }
++
++ INLINE B Has_External_Tag_Rep_Clause (E Id)
++ { return Flag110 (Id); }
++
++ INLINE B Has_Forward_Instantiation (E Id)
++ { return Flag175 (Id); }
++
++ INLINE B Has_Fully_Qualified_Name (E Id)
++ { return Flag173 (Id); }
++
++ INLINE B Has_Gigi_Rep_Item (E Id)
++ { return Flag82 (Id); }
++
++ INLINE B Has_Homonym (E Id)
++ { return Flag56 (Id); }
++
++ INLINE B Has_Machine_Radix_Clause (E Id)
++ { return Flag83 (Id); }
++
++ INLINE B Has_Master_Entity (E Id)
++ { return Flag21 (Id); }
++
++ INLINE B Has_Missing_Return (E Id)
++ { return Flag142 (Id); }
++
++ INLINE B Has_Nested_Block_With_Handler (E Id)
++ { return Flag101 (Id); }
++
++ INLINE B Has_Non_Standard_Rep (E Id)
++ { return Flag75 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Object_Size_Clause (E Id)
++ { return Flag172 (Id); }
++
++ INLINE B Has_Per_Object_Constraint (E Id)
++ { return Flag154 (Id); }
++
++ INLINE B Has_Pragma_Controlled (E Id)
++ { return Flag27 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Pragma_Elaborate_Body (E Id)
++ { return Flag150 (Id); }
++
++ INLINE B Has_Pragma_Inline (E Id)
++ { return Flag157 (Id); }
++
++ INLINE B Has_Pragma_Pack (E Id)
++ { return Flag121 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Pragma_Pure_Function (E Id)
++ { return Flag179 (Id); }
++
++ INLINE B Has_Pragma_Unreferenced (E Id)
++ { return Flag180 (Id); }
++
++ INLINE B Has_Primitive_Operations (E Id)
++ { return Flag120 (Base_Type (Id)); }
++
++ INLINE B Has_Private_Declaration (E Id)
++ { return Flag155 (Id); }
++
++ INLINE B Has_Qualified_Name (E Id)
++ { return Flag161 (Id); }
++
++ INLINE B Has_Record_Rep_Clause (E Id)
++ { return Flag65 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Recursive_Call (E Id)
++ { return Flag143 (Id); }
++
++ INLINE B Has_Size_Clause (E Id)
++ { return Flag29 (Id); }
++
++ INLINE B Has_Small_Clause (E Id)
++ { return Flag67 (Id); }
++
++ INLINE B Has_Specified_Layout (E Id)
++ { return Flag100 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Storage_Size_Clause (E Id)
++ { return Flag23 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Subprogram_Descriptor (E Id)
++ { return Flag93 (Id); }
++
++ INLINE B Has_Task (E Id)
++ { return Flag30 (Base_Type (Id)); }
++
++ INLINE B Has_Unchecked_Union (E Id)
++ { return Flag123 (Base_Type (Id)); }
++
++ INLINE B Has_Unknown_Discriminants (E Id)
++ { return Flag72 (Id); }
++
++ INLINE B Has_Volatile_Components (E Id)
++ { return Flag87 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Xref_Entry (E Id)
++ { return Flag182 (Implementation_Base_Type (Id)); }
++
++ INLINE E Hiding_Loop_Variable (E Id)
++ { return Node8 (Id); }
++
++ INLINE E Homonym (E Id)
++ { return Node4 (Id); }
++
++ INLINE B In_Package_Body (E Id)
++ { return Flag48 (Id); }
++
++ INLINE B In_Private_Part (E Id)
++ { return Flag45 (Id); }
++
++ INLINE B In_Use (E Id)
++ { return Flag8 (Id); }
++
++ INLINE L Inner_Instances (E Id)
++ { return Elist23 (Id); }
++
++ INLINE N Interface_Name (E Id)
++ { return Node21 (Id); }
++
++ INLINE B Is_Abstract (E Id)
++ { return Flag19 (Id); }
++
++ INLINE B Is_Access_Constant (E Id)
++ { return Flag69 (Id); }
++
++ INLINE B Is_Aliased (E Id)
++ { return Flag15 (Id); }
++
++ INLINE B Is_AST_Entry (E Id)
++ { return Flag132 (Id); }
++
++ INLINE B Is_Asynchronous (E Id)
++ { return Flag81 (Id); }
++
++ INLINE B Is_Atomic (E Id)
++ { return Flag85 (Id); }
++
++ INLINE B Is_Bit_Packed_Array (E Id)
++ { return Flag122 (Implementation_Base_Type (Id)); }
++
++ INLINE B Is_Called (E Id)
++ { return Flag102 (Id); }
++
++ INLINE B Is_Character_Type (E Id)
++ { return Flag63 (Id); }
++
++ INLINE B Is_Child_Unit (E Id)
++ { return Flag73 (Id); }
++
++ INLINE B Is_Class_Wide_Equivalent_Type (E Id)
++ { return Flag35 (Id); }
++
++ INLINE B Is_Compilation_Unit (E Id)
++ { return Flag149 (Id); }
++
++ INLINE B Is_Completely_Hidden (E Id)
++ { return Flag103 (Id); }
++
++ INLINE B Is_Constr_Subt_For_U_Nominal (E Id)
++ { return Flag80 (Id); }
++
++ INLINE B Is_Constr_Subt_For_UN_Aliased (E Id)
++ { return Flag141 (Id); }
++
++ INLINE B Is_Constrained (E Id)
++ { return Flag12 (Id); }
++
++ INLINE B Is_Constructor (E Id)
++ { return Flag76 (Id); }
++
++ INLINE B Is_Controlled (E Id)
++ { return Flag42 (Base_Type (Id)); }
++
++ INLINE B Is_Controlling_Formal (E Id)
++ { return Flag97 (Id); }
++
++ INLINE B Is_CPP_Class (E Id)
++ { return Flag74 (Id); }
++
++ INLINE B Is_Discrim_SO_Function (E Id)
++ { return Flag176 (Id); }
++
++ INLINE B Is_Dispatching_Operation (E Id)
++ { return Flag6 (Id); }
++
++ INLINE B Is_Eliminated (E Id)
++ { return Flag124 (Id); }
++
++ INLINE B Is_Entry_Formal (E Id)
++ { return Flag52 (Id); }
++
++ INLINE B Is_Exported (E Id)
++ { return Flag99 (Id); }
++
++ INLINE B Is_First_Subtype (E Id)
++ { return Flag70 (Id); }
++
++ INLINE B Is_For_Access_Subtype (E Id)
++ { return Flag118 (Id); }
++
++ INLINE B Is_Formal_Subprogram (E Id)
++ { return Flag111 (Id); }
++
++ INLINE B Is_Frozen (E Id)
++ { return Flag4 (Id); }
++
++ INLINE B Is_Generic_Actual_Type (E Id)
++ { return Flag94 (Id); }
++
++ INLINE B Is_Generic_Instance (E Id)
++ { return Flag130 (Id); }
++
++ INLINE B Is_Generic_Type (E Id)
++ { return Flag13 (Id); }
++
++ INLINE B Is_Hidden (E Id)
++ { return Flag57 (Id); }
++
++ INLINE B Is_Hidden_Open_Scope (E Id)
++ { return Flag171 (Id); }
++
++ INLINE B Is_Immediately_Visible (E Id)
++ { return Flag7 (Id); }
++
++ INLINE B Is_Imported (E Id)
++ { return Flag24 (Id); }
++
++ INLINE B Is_Inlined (E Id)
++ { return Flag11 (Id); }
++
++ INLINE B Is_Instantiated (E Id)
++ { return Flag126 (Id); }
++
++ INLINE B Is_Internal (E Id)
++ { return Flag17 (Id); }
++
++ INLINE B Is_Interrupt_Handler (E Id)
++ { return Flag89 (Id); }
++
++ INLINE B Is_Intrinsic_Subprogram (E Id)
++ { return Flag64 (Id); }
++
++ INLINE B Is_Itype (E Id)
++ { return Flag91 (Id); }
++
++ INLINE B Is_Known_Non_Null (E Id)
++ { return Flag37 (Id); }
++
++ INLINE B Is_Known_Valid (E Id)
++ { return Flag170 (Id); }
++
++ INLINE B Is_Limited_Composite (E Id)
++ { return Flag106 (Id); }
++
++ INLINE B Is_Limited_Record (E Id)
++ { return Flag25 (Id); }
++
++ INLINE B Is_Machine_Code_Subprogram (E Id)
++ { return Flag137 (Id); }
++
++ INLINE B Is_Non_Static_Subtype (E Id)
++ { return Flag109 (Id); }
++
++ INLINE B Is_Null_Init_Proc (E Id)
++ { return Flag178 (Id); }
++
++ INLINE B Is_Optional_Parameter (E Id)
++ { return Flag134 (Id); }
++
++ INLINE B Is_Overriding_Operation (E Id)
++ { return Flag39 (Id); }
++
++ INLINE B Is_Package_Body_Entity (E Id)
++ { return Flag160 (Id); }
++
++ INLINE B Is_Packed (E Id)
++ { return Flag51 (Implementation_Base_Type (Id)); }
++
++ INLINE B Is_Packed_Array_Type (E Id)
++ { return Flag138 (Id); }
++
++ INLINE B Is_Potentially_Use_Visible (E Id)
++ { return Flag9 (Id); }
++
++ INLINE B Is_Preelaborated (E Id)
++ { return Flag59 (Id); }
++
++ INLINE B Is_Private_Composite (E Id)
++ { return Flag107 (Id); }
++
++ INLINE B Is_Private_Descendant (E Id)
++ { return Flag53 (Id); }
++
++ INLINE B Is_Psected (E Id)
++ { return Flag153 (Id); }
++
++ INLINE B Is_Public (E Id)
++ { return Flag10 (Id); }
++
++ INLINE B Is_Pure (E Id)
++ { return Flag44 (Id); }
++
++ INLINE B Is_Remote_Call_Interface (E Id)
++ { return Flag62 (Id); }
++
++ INLINE B Is_Remote_Types (E Id)
++ { return Flag61 (Id); }
++
++ INLINE B Is_Renaming_Of_Object (E Id)
++ { return Flag112 (Id); }
++
++ INLINE B Is_Shared_Passive (E Id)
++ { return Flag60 (Id); }
++
++ INLINE B Is_Statically_Allocated (E Id)
++ { return Flag28 (Id); }
++
++ INLINE B Is_Tag (E Id)
++ { return Flag78 (Id); }
++
++ INLINE B Is_Tagged_Type (E Id)
++ { return Flag55 (Id); }
++
++ INLINE B Is_Thread_Body (E Id)
++ { return Flag77 (Id); }
++
++ INLINE B Is_True_Constant (E Id)
++ { return Flag163 (Id); }
++
++ INLINE B Is_Unchecked_Union (E Id)
++ { return Flag117 (Id); }
++
++ INLINE B Is_Unsigned_Type (E Id)
++ { return Flag144 (Id); }
++
++ INLINE B Is_Valued_Procedure (E Id)
++ { return Flag127 (Id); }
++
++ INLINE B Is_Visible_Child_Unit (E Id)
++ { return Flag116 (Id); }
++
++ INLINE B Is_VMS_Exception (E Id)
++ { return Flag133 (Id); }
++
++ INLINE B Kill_Elaboration_Checks (E Id)
++ { return Flag32 (Id); }
++
++ INLINE B Kill_Range_Checks (E Id)
++ { return Flag33 (Id); }
++
++ INLINE B Kill_Tag_Checks (E Id)
++ { return Flag34 (Id); }
++
++ INLINE E Last_Entity (E Id)
++ { return Node20 (Id); }
++
++ INLINE L Limited_Views (E Id)
++ { return Elist23 (Id); }
++
++ INLINE E Lit_Indexes (E Id)
++ { return Node15 (Id); }
++
++ INLINE E Lit_Strings (E Id)
++ { return Node16 (Id); }
++
++ INLINE B Machine_Radix_10 (E Id)
++ { return Flag84 (Id); }
++
++ INLINE E Master_Id (E Id)
++ { return Node17 (Id); }
++
++ INLINE B Materialize_Entity (E Id)
++ { return Flag168 (Id); }
++
++ INLINE M Mechanism (E Id)
++ { return UI_To_Int (Uint8 (Id)); }
++
++ INLINE Uint Modulus (E Id)
++ { return Uint17 (Base_Type (Id)); }
++
++ INLINE B Needs_Debug_Info (E Id)
++ { return Flag147 (Id); }
++
++ INLINE B Needs_No_Actuals (E Id)
++ { return Flag22 (Id); }
++
++ INLINE B Never_Set_In_Source (E Id)
++ { return Flag115 (Id); }
++
++ INLINE E Next_Inlined_Subprogram (E Id)
++ { return Node12 (Id); }
++
++ INLINE B No_Pool_Assigned (E Id)
++ { return Flag131 (Root_Type (Id)); }
++
++ INLINE B No_Return (E Id)
++ { return Flag113 (Id); }
++
++ INLINE B Non_Binary_Modulus (E Id)
++ { return Flag58 (Base_Type (Id)); }
++
++ INLINE E Non_Limited_View (E Id)
++ { return Node17 (Id); }
++
++ INLINE B Nonzero_Is_True (E Id)
++ { return Flag162 (Base_Type (Id)); }
++
++ INLINE U Normalized_First_Bit (E Id)
++ { return Uint8 (Id); }
++
++ INLINE U Normalized_Position (E Id)
++ { return Uint14 (Id); }
++
++ INLINE U Normalized_Position_Max (E Id)
++ { return Uint10 (Id); }
++
++ INLINE E Object_Ref (E Id)
++ { return Node17 (Id); }
++
++ INLINE E Original_Array_Type (E Id)
++ { return Node21 (Id); }
++
++ INLINE E Original_Record_Component (E Id)
++ { return Node22 (Id); }
++
++ INLINE E Packed_Array_Type (E Id)
++ { return Node23 (Id); }
++
++ INLINE E Parent_Subtype (E Id)
++ { return Node19 (Id); }
++
++ INLINE L Primitive_Operations (E Id)
++ { return Elist15 (Id); }
++
++ INLINE E Prival (E Id)
++ { return Node17 (Id); }
++
++ INLINE L Privals_Chain (E Id)
++ { return Elist23 (Id); }
++
++ INLINE L Private_Dependents (E Id)
++ { return Elist18 (Id); }
++
++ INLINE N Private_View (E Id)
++ { return Node22 (Id); }
++
++ INLINE E Protected_Body_Subprogram (E Id)
++ { return Node11 (Id); }
++
++ INLINE E Protected_Formal (E Id)
++ { return Node22 (Id); }
++
++ INLINE N Protected_Operation (E Id)
++ { return Node23 (Id); }
++
++ INLINE B Reachable (E Id)
++ { return Flag49 (Id); }
++
++ INLINE B Referenced (E Id)
++ { return Flag156 (Id); }
++
++ INLINE B Referenced_As_LHS (E Id)
++ { return Flag36 (Id); }
++
++ INLINE N Referenced_Object (E Id)
++ { return Node10 (Id); }
++
++ INLINE N Register_Exception_Call (E Id)
++ { return Node20 (Id); }
++
++ INLINE E Related_Array_Object (E Id)
++ { return Node19 (Id); }
++
++ INLINE E Related_Instance (E Id)
++ { return Node15 (Id); }
++
++ INLINE N Renamed_Entity (E Id)
++ { return Node18 (Id); }
++
++ INLINE N Renamed_Object (E Id)
++ { return Node18 (Id); }
++
++ INLINE U Renaming_Map (E Id)
++ { return Uint9 (Id); }
++
++ INLINE B Return_Present (E Id)
++ { return Flag54 (Id); }
++
++ INLINE B Returns_By_Ref (E Id)
++ { return Flag90 (Id); }
++
++ INLINE B Reverse_Bit_Order (E Id)
++ { return Flag164 (Base_Type (Id)); }
++
++ INLINE U RM_Size (E Id)
++ { return Uint13 (Id); }
++
++ INLINE N Scalar_Range (E Id)
++ { return Node20 (Id); }
++
++ INLINE U Scale_Value (E Id)
++ { return Uint15 (Id); }
++
++ INLINE U Scope_Depth_Value (E Id)
++ { return Uint22 (Id); }
++
++ INLINE B Sec_Stack_Needed_For_Return (E Id)
++ { return Flag167 (Id); }
++
++ INLINE S Shadow_Entities (E Id)
++ { return List14 (Id); }
++
++ INLINE E Shared_Var_Assign_Proc (E Id)
++ { return Node22 (Id); }
++
++ INLINE E Shared_Var_Read_Proc (E Id)
++ { return Node15 (Id); }
++
++ INLINE N Size_Check_Code (E Id)
++ { return Node19 (Id); }
++
++ INLINE B Size_Depends_On_Discriminant (E Id)
++ { return Flag177 (Id); }
++
++ INLINE B Size_Known_At_Compile_Time (E Id)
++ { return Flag92 (Id); }
++
++ INLINE R Small_Value (E Id)
++ { return Ureal21 (Id); }
++
++ INLINE E Spec_Entity (E Id)
++ { return Node19 (Id); }
++
++ INLINE E Storage_Size_Variable (E Id)
++ { return Node15 (Implementation_Base_Type (Id)); }
++
++ INLINE L Stored_Constraint (E Id)
++ { return Elist23 (Id); }
++
++ INLINE B Strict_Alignment (E Id)
++ { return Flag145 (Implementation_Base_Type (Id)); }
++
++ INLINE U String_Literal_Length (E Id)
++ { return Uint16 (Id); }
++
++ INLINE N String_Literal_Low_Bound (E Id)
++ { return Node15 (Id); }
++
++ INLINE B Suppress_Elaboration_Warnings (E Id)
++ { return Flag148 (Id); }
++
++ INLINE B Suppress_Init_Proc (E Id)
++ { return Flag105 (Base_Type (Id)); }
++
++ INLINE B Suppress_Style_Checks (E Id)
++ { return Flag165 (Id); }
++
++ INLINE B Treat_As_Volatile (E Id)
++ { return Flag41 (Id); }
++
++ INLINE E Underlying_Full_View (E Id)
++ { return Node19 (Id); }
++
++ INLINE N Unset_Reference (E Id)
++ { return Node16 (Id); }
++
++ INLINE B Uses_Sec_Stack (E Id)
++ { return Flag95 (Id); }
++
++ INLINE B Vax_Float (E Id)
++ { return Flag151 (Base_Type (Id)); }
++
++ INLINE B Warnings_Off (E Id)
++ { return Flag96 (Id); }
++
++ INLINE B Is_Access_Type (E Id)
++ { return IN (Ekind (Id), Access_Kind); }
++
++ INLINE B Is_Array_Type (E Id)
++ { return IN (Ekind (Id), Array_Kind); }
++
++ INLINE B Is_Class_Wide_Type (E Id)
++ { return IN (Ekind (Id), Class_Wide_Kind); }
++
++ INLINE B Is_Composite_Type (E Id)
++ { return IN (Ekind (Id), Composite_Kind); }
++
++ INLINE B Is_Concurrent_Body (E Id)
++ { return IN (Ekind (Id), Concurrent_Body_Kind); }
++
++ INLINE B Is_Concurrent_Record_Type (E Id)
++ { return Flag20 (Id); }
++
++ INLINE B Is_Concurrent_Type (E Id)
++ { return IN (Ekind (Id), Concurrent_Kind); }
++
++ INLINE B Is_Decimal_Fixed_Point_Type (E Id)
++ { return IN (Ekind (Id), Decimal_Fixed_Point_Kind); }
++
++ INLINE B Is_Digits_Type (E Id)
++ { return IN (Ekind (Id), Digits_Kind); }
++
++ INLINE B Is_Discrete_Or_Fixed_Point_Type (E Id)
++ { return IN (Ekind (Id), Discrete_Or_Fixed_Point_Kind); }
++
++ INLINE B Is_Discrete_Type (E Id)
++ { return IN (Ekind (Id), Discrete_Kind); }
++
++ INLINE B Is_Elementary_Type (E Id)
++ { return IN (Ekind (Id), Elementary_Kind); }
++
++ INLINE B Is_Entry (E Id)
++ { return IN (Ekind (Id), Entry_Kind); }
++
++ INLINE B Is_Enumeration_Type (E Id)
++ { return IN (Ekind (Id), Enumeration_Kind); }
++
++ INLINE B Is_Fixed_Point_Type (E Id)
++ { return IN (Ekind (Id), Fixed_Point_Kind); }
++
++ INLINE B Is_Floating_Point_Type (E Id)
++ { return IN (Ekind (Id), Float_Kind); }
++
++ INLINE B Is_Formal (E Id)
++ { return IN (Ekind (Id), Formal_Kind); }
++
++ INLINE B Is_Generic_Subprogram (E Id)
++ { return IN (Ekind (Id), Generic_Subprogram_Kind); }
++
++ INLINE B Is_Generic_Unit (E Id)
++ { return IN (Ekind (Id), Generic_Unit_Kind); }
++
++ INLINE B Is_Incomplete_Or_Private_Type (E Id)
++ { return IN (Ekind (Id), Incomplete_Or_Private_Kind); }
++
++ INLINE B Is_Integer_Type (E Id)
++ { return IN (Ekind (Id), Integer_Kind); }
++
++ INLINE B Is_Modular_Integer_Type (E Id)
++ { return IN (Ekind (Id), Modular_Integer_Kind); }
++
++ INLINE B Is_Named_Number (E Id)
++ { return IN (Ekind (Id), Named_Kind); }
++
++ INLINE B Is_Numeric_Type (E Id)
++ { return IN (Ekind (Id), Numeric_Kind); }
++
++ INLINE B Is_Object (E Id)
++ { return IN (Ekind (Id), Object_Kind); }
++
++ INLINE B Is_Ordinary_Fixed_Point_Type (E Id)
++ { return IN (Ekind (Id), Ordinary_Fixed_Point_Kind); }
++
++ INLINE B Is_Overloadable (E Id)
++ { return IN (Ekind (Id), Overloadable_Kind); }
++
++ INLINE B Is_Private_Type (E Id)
++ { return IN (Ekind (Id), Private_Kind); }
++
++ INLINE B Is_Protected_Type (E Id)
++ { return IN (Ekind (Id), Protected_Kind); }
++
++ INLINE B Is_Real_Type (E Id)
++ { return IN (Ekind (Id), Real_Kind); }
++
++ INLINE B Is_Record_Type (E Id)
++ { return IN (Ekind (Id), Record_Kind); }
++
++ INLINE B Is_Scalar_Type (E Id)
++ { return IN (Ekind (Id), Scalar_Kind); }
++
++ INLINE B Is_Signed_Integer_Type (E Id)
++ { return IN (Ekind (Id), Signed_Integer_Kind); }
++
++ INLINE B Is_Subprogram (E Id)
++ { return IN (Ekind (Id), Subprogram_Kind); }
++
++ INLINE B Is_Task_Type (E Id)
++ { return IN (Ekind (Id), Task_Kind); }
++
++ INLINE B Is_Type (E Id)
++ { return IN (Ekind (Id), Type_Kind); }
++
++ INLINE N Entry_Index_Type (E Id)
++ { return Etype (Discrete_Subtype_Definition (Parent (Id))); }
++
++ INLINE Node_Id Next_Index (Node_Id Id)
++ { return Next (Id); }
++
++ INLINE E Next_Literal (E Id)
++ { return Next (Id); }
++
++ INLINE Formal_Kind Parameter_Mode (E Id)
++ { return Ekind (Id); }
++
++/* End of einfo.h (C version of Einfo package specification) */
+--- gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/nmake.adb.orig 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/nmake.adb 2004-06-02 00:52:35.000000000 +0200
+@@ -0,0 +1,2867 @@
++------------------------------------------------------------------------------
++-- --
++-- GNAT COMPILER COMPONENTS --
++-- --
++-- N M A K E --
++-- --
++-- B o d y --
++-- --
++-- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
++-- --
++-- GNAT is free software; you can redistribute it and/or modify it under --
++-- terms of the GNU General Public License as published by the Free Soft- --
++-- ware Foundation; either version 2, or (at your option) any later ver- --
++-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
++-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
++-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
++-- for more details. You should have received a copy of the GNU General --
++-- Public License distributed with GNAT; see file COPYING. If not, write --
++-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
++-- MA 02111-1307, USA. --
++-- --
++-- GNAT was originally developed by the GNAT team at New York University. --
++-- Extensive contributions were provided by Ada Core Technologies Inc. --
++-- --
++------------------------------------------------------------------------------
++
++pragma Style_Checks (All_Checks);
++-- Turn off subprogram order checking, since the routines here are
++-- generated automatically in order.
++
++
++with Atree; use Atree;
++with Sinfo; use Sinfo;
++with Snames; use Snames;
++with Stand; use Stand;
++
++package body Nmake is
++
++ function Make_Unused_At_Start (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Unused_At_Start, Sloc);
++ begin
++ return N;
++ end Make_Unused_At_Start;
++
++ function Make_Unused_At_End (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Unused_At_End, Sloc);
++ begin
++ return N;
++ end Make_Unused_At_End;
++
++ function Make_Identifier (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Identifier, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ return N;
++ end Make_Identifier;
++
++ function Make_Integer_Literal (Sloc : Source_Ptr;
++ Intval : Uint)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Integer_Literal, Sloc);
++ begin
++ Set_Intval (N, Intval);
++ return N;
++ end Make_Integer_Literal;
++
++ function Make_Real_Literal (Sloc : Source_Ptr;
++ Realval : Ureal)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Real_Literal, Sloc);
++ begin
++ Set_Realval (N, Realval);
++ return N;
++ end Make_Real_Literal;
++
++ function Make_Character_Literal (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Char_Literal_Value : Char_Code)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Character_Literal, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ Set_Char_Literal_Value (N, Char_Literal_Value);
++ return N;
++ end Make_Character_Literal;
++
++ function Make_String_Literal (Sloc : Source_Ptr;
++ Strval : String_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_String_Literal, Sloc);
++ begin
++ Set_Strval (N, Strval);
++ return N;
++ end Make_String_Literal;
++
++ function Make_Pragma (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Pragma_Argument_Associations : List_Id := No_List;
++ Debug_Statement : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Pragma, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ Set_Pragma_Argument_Associations
++ (N, Pragma_Argument_Associations);
++ Set_Debug_Statement (N, Debug_Statement);
++ return N;
++ end Make_Pragma;
++
++ function Make_Pragma_Argument_Association (Sloc : Source_Ptr;
++ Chars : Name_Id := No_Name;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Pragma_Argument_Association, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Pragma_Argument_Association;
++
++ function Make_Defining_Identifier (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Entity (N_Defining_Identifier, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ return N;
++ end Make_Defining_Identifier;
++
++ function Make_Full_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Type_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Full_Type_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Type_Definition (N, Type_Definition);
++ return N;
++ end Make_Full_Type_Declaration;
++
++ function Make_Subtype_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Subtype_Indication : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subtype_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Subtype_Indication (N, Subtype_Indication);
++ return N;
++ end Make_Subtype_Declaration;
++
++ function Make_Subtype_Indication (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Constraint : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subtype_Indication, Sloc);
++ begin
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Constraint (N, Constraint);
++ return N;
++ end Make_Subtype_Indication;
++
++ function Make_Object_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Aliased_Present : Boolean := False;
++ Constant_Present : Boolean := False;
++ Object_Definition : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Object_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Aliased_Present (N, Aliased_Present);
++ Set_Constant_Present (N, Constant_Present);
++ Set_Object_Definition (N, Object_Definition);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Object_Declaration;
++
++ function Make_Number_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Number_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Number_Declaration;
++
++ function Make_Derived_Type_Definition (Sloc : Source_Ptr;
++ Abstract_Present : Boolean := False;
++ Subtype_Indication : Node_Id;
++ Record_Extension_Part : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Derived_Type_Definition, Sloc);
++ begin
++ Set_Abstract_Present (N, Abstract_Present);
++ Set_Subtype_Indication (N, Subtype_Indication);
++ Set_Record_Extension_Part (N, Record_Extension_Part);
++ return N;
++ end Make_Derived_Type_Definition;
++
++ function Make_Range_Constraint (Sloc : Source_Ptr;
++ Range_Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Range_Constraint, Sloc);
++ begin
++ Set_Range_Expression (N, Range_Expression);
++ return N;
++ end Make_Range_Constraint;
++
++ function Make_Range (Sloc : Source_Ptr;
++ Low_Bound : Node_Id;
++ High_Bound : Node_Id;
++ Includes_Infinities : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Range, Sloc);
++ begin
++ Set_Low_Bound (N, Low_Bound);
++ Set_High_Bound (N, High_Bound);
++ Set_Includes_Infinities (N, Includes_Infinities);
++ return N;
++ end Make_Range;
++
++ function Make_Enumeration_Type_Definition (Sloc : Source_Ptr;
++ Literals : List_Id;
++ End_Label : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Enumeration_Type_Definition, Sloc);
++ begin
++ Set_Literals (N, Literals);
++ Set_End_Label (N, End_Label);
++ return N;
++ end Make_Enumeration_Type_Definition;
++
++ function Make_Defining_Character_Literal (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Entity (N_Defining_Character_Literal, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ return N;
++ end Make_Defining_Character_Literal;
++
++ function Make_Signed_Integer_Type_Definition (Sloc : Source_Ptr;
++ Low_Bound : Node_Id;
++ High_Bound : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Signed_Integer_Type_Definition, Sloc);
++ begin
++ Set_Low_Bound (N, Low_Bound);
++ Set_High_Bound (N, High_Bound);
++ return N;
++ end Make_Signed_Integer_Type_Definition;
++
++ function Make_Modular_Type_Definition (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Modular_Type_Definition, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Modular_Type_Definition;
++
++ function Make_Floating_Point_Definition (Sloc : Source_Ptr;
++ Digits_Expression : Node_Id;
++ Real_Range_Specification : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Floating_Point_Definition, Sloc);
++ begin
++ Set_Digits_Expression (N, Digits_Expression);
++ Set_Real_Range_Specification (N, Real_Range_Specification);
++ return N;
++ end Make_Floating_Point_Definition;
++
++ function Make_Real_Range_Specification (Sloc : Source_Ptr;
++ Low_Bound : Node_Id;
++ High_Bound : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Real_Range_Specification, Sloc);
++ begin
++ Set_Low_Bound (N, Low_Bound);
++ Set_High_Bound (N, High_Bound);
++ return N;
++ end Make_Real_Range_Specification;
++
++ function Make_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr;
++ Delta_Expression : Node_Id;
++ Real_Range_Specification : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Ordinary_Fixed_Point_Definition, Sloc);
++ begin
++ Set_Delta_Expression (N, Delta_Expression);
++ Set_Real_Range_Specification (N, Real_Range_Specification);
++ return N;
++ end Make_Ordinary_Fixed_Point_Definition;
++
++ function Make_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr;
++ Delta_Expression : Node_Id;
++ Digits_Expression : Node_Id;
++ Real_Range_Specification : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Decimal_Fixed_Point_Definition, Sloc);
++ begin
++ Set_Delta_Expression (N, Delta_Expression);
++ Set_Digits_Expression (N, Digits_Expression);
++ Set_Real_Range_Specification (N, Real_Range_Specification);
++ return N;
++ end Make_Decimal_Fixed_Point_Definition;
++
++ function Make_Digits_Constraint (Sloc : Source_Ptr;
++ Digits_Expression : Node_Id;
++ Range_Constraint : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Digits_Constraint, Sloc);
++ begin
++ Set_Digits_Expression (N, Digits_Expression);
++ Set_Range_Constraint (N, Range_Constraint);
++ return N;
++ end Make_Digits_Constraint;
++
++ function Make_Unconstrained_Array_Definition (Sloc : Source_Ptr;
++ Subtype_Marks : List_Id;
++ Component_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Unconstrained_Array_Definition, Sloc);
++ begin
++ Set_Subtype_Marks (N, Subtype_Marks);
++ Set_Component_Definition (N, Component_Definition);
++ return N;
++ end Make_Unconstrained_Array_Definition;
++
++ function Make_Constrained_Array_Definition (Sloc : Source_Ptr;
++ Discrete_Subtype_Definitions : List_Id;
++ Component_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Constrained_Array_Definition, Sloc);
++ begin
++ Set_Discrete_Subtype_Definitions
++ (N, Discrete_Subtype_Definitions);
++ Set_Component_Definition (N, Component_Definition);
++ return N;
++ end Make_Constrained_Array_Definition;
++
++ function Make_Component_Definition (Sloc : Source_Ptr;
++ Aliased_Present : Boolean := False;
++ Subtype_Indication : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Component_Definition, Sloc);
++ begin
++ Set_Aliased_Present (N, Aliased_Present);
++ Set_Subtype_Indication (N, Subtype_Indication);
++ return N;
++ end Make_Component_Definition;
++
++ function Make_Discriminant_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Type : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Discriminant_Specification, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Type (N, Discriminant_Type);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Discriminant_Specification;
++
++ function Make_Index_Or_Discriminant_Constraint (Sloc : Source_Ptr;
++ Constraints : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Index_Or_Discriminant_Constraint, Sloc);
++ begin
++ Set_Constraints (N, Constraints);
++ return N;
++ end Make_Index_Or_Discriminant_Constraint;
++
++ function Make_Discriminant_Association (Sloc : Source_Ptr;
++ Selector_Names : List_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Discriminant_Association, Sloc);
++ begin
++ Set_Selector_Names (N, Selector_Names);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Discriminant_Association;
++
++ function Make_Record_Definition (Sloc : Source_Ptr;
++ End_Label : Node_Id := Empty;
++ Abstract_Present : Boolean := False;
++ Tagged_Present : Boolean := False;
++ Limited_Present : Boolean := False;
++ Component_List : Node_Id;
++ Null_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Record_Definition, Sloc);
++ begin
++ Set_End_Label (N, End_Label);
++ Set_Abstract_Present (N, Abstract_Present);
++ Set_Tagged_Present (N, Tagged_Present);
++ Set_Limited_Present (N, Limited_Present);
++ Set_Component_List (N, Component_List);
++ Set_Null_Present (N, Null_Present);
++ return N;
++ end Make_Record_Definition;
++
++ function Make_Component_List (Sloc : Source_Ptr;
++ Component_Items : List_Id;
++ Variant_Part : Node_Id := Empty;
++ Null_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Component_List, Sloc);
++ begin
++ Set_Component_Items (N, Component_Items);
++ Set_Variant_Part (N, Variant_Part);
++ Set_Null_Present (N, Null_Present);
++ return N;
++ end Make_Component_List;
++
++ function Make_Component_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Component_Definition : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Component_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Component_Definition (N, Component_Definition);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Component_Declaration;
++
++ function Make_Variant_Part (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Variants : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Variant_Part, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Variants (N, Variants);
++ return N;
++ end Make_Variant_Part;
++
++ function Make_Variant (Sloc : Source_Ptr;
++ Discrete_Choices : List_Id;
++ Component_List : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Variant, Sloc);
++ begin
++ Set_Discrete_Choices (N, Discrete_Choices);
++ Set_Component_List (N, Component_List);
++ return N;
++ end Make_Variant;
++
++ function Make_Others_Choice (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Others_Choice, Sloc);
++ begin
++ return N;
++ end Make_Others_Choice;
++
++ function Make_Access_To_Object_Definition (Sloc : Source_Ptr;
++ All_Present : Boolean := False;
++ Subtype_Indication : Node_Id;
++ Constant_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Access_To_Object_Definition, Sloc);
++ begin
++ Set_All_Present (N, All_Present);
++ Set_Subtype_Indication (N, Subtype_Indication);
++ Set_Constant_Present (N, Constant_Present);
++ return N;
++ end Make_Access_To_Object_Definition;
++
++ function Make_Access_Function_Definition (Sloc : Source_Ptr;
++ Protected_Present : Boolean := False;
++ Parameter_Specifications : List_Id := No_List;
++ Subtype_Mark : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Access_Function_Definition, Sloc);
++ begin
++ Set_Protected_Present (N, Protected_Present);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ Set_Subtype_Mark (N, Subtype_Mark);
++ return N;
++ end Make_Access_Function_Definition;
++
++ function Make_Access_Procedure_Definition (Sloc : Source_Ptr;
++ Protected_Present : Boolean := False;
++ Parameter_Specifications : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Access_Procedure_Definition, Sloc);
++ begin
++ Set_Protected_Present (N, Protected_Present);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ return N;
++ end Make_Access_Procedure_Definition;
++
++ function Make_Access_Definition (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Access_Definition, Sloc);
++ begin
++ Set_Subtype_Mark (N, Subtype_Mark);
++ return N;
++ end Make_Access_Definition;
++
++ function Make_Incomplete_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Incomplete_Type_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Unknown_Discriminants_Present
++ (N, Unknown_Discriminants_Present);
++ return N;
++ end Make_Incomplete_Type_Declaration;
++
++ function Make_Explicit_Dereference (Sloc : Source_Ptr;
++ Prefix : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Explicit_Dereference, Sloc);
++ begin
++ Set_Prefix (N, Prefix);
++ return N;
++ end Make_Explicit_Dereference;
++
++ function Make_Indexed_Component (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Expressions : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Indexed_Component, Sloc);
++ begin
++ Set_Prefix (N, Prefix);
++ Set_Expressions (N, Expressions);
++ return N;
++ end Make_Indexed_Component;
++
++ function Make_Slice (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Discrete_Range : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Slice, Sloc);
++ begin
++ Set_Prefix (N, Prefix);
++ Set_Discrete_Range (N, Discrete_Range);
++ return N;
++ end Make_Slice;
++
++ function Make_Selected_Component (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Selector_Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Selected_Component, Sloc);
++ begin
++ Set_Prefix (N, Prefix);
++ Set_Selector_Name (N, Selector_Name);
++ return N;
++ end Make_Selected_Component;
++
++ function Make_Attribute_Reference (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Attribute_Name : Name_Id;
++ Expressions : List_Id := No_List;
++ Must_Be_Byte_Aligned : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Attribute_Reference, Sloc);
++ begin
++ Set_Prefix (N, Prefix);
++ Set_Attribute_Name (N, Attribute_Name);
++ Set_Expressions (N, Expressions);
++ Set_Must_Be_Byte_Aligned (N, Must_Be_Byte_Aligned);
++ return N;
++ end Make_Attribute_Reference;
++
++ function Make_Aggregate (Sloc : Source_Ptr;
++ Expressions : List_Id := No_List;
++ Component_Associations : List_Id := No_List;
++ Null_Record_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Aggregate, Sloc);
++ begin
++ Set_Expressions (N, Expressions);
++ Set_Component_Associations (N, Component_Associations);
++ Set_Null_Record_Present (N, Null_Record_Present);
++ return N;
++ end Make_Aggregate;
++
++ function Make_Component_Association (Sloc : Source_Ptr;
++ Choices : List_Id;
++ Expression : Node_Id;
++ Box_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Component_Association, Sloc);
++ begin
++ Set_Choices (N, Choices);
++ Set_Expression (N, Expression);
++ Set_Box_Present (N, Box_Present);
++ return N;
++ end Make_Component_Association;
++
++ function Make_Extension_Aggregate (Sloc : Source_Ptr;
++ Ancestor_Part : Node_Id;
++ Expressions : List_Id := No_List;
++ Component_Associations : List_Id := No_List;
++ Null_Record_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Extension_Aggregate, Sloc);
++ begin
++ Set_Ancestor_Part (N, Ancestor_Part);
++ Set_Expressions (N, Expressions);
++ Set_Component_Associations (N, Component_Associations);
++ Set_Null_Record_Present (N, Null_Record_Present);
++ return N;
++ end Make_Extension_Aggregate;
++
++ function Make_Null (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Null, Sloc);
++ begin
++ return N;
++ end Make_Null;
++
++ function Make_And_Then (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_And_Then, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ return N;
++ end Make_And_Then;
++
++ function Make_Or_Else (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Or_Else, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ return N;
++ end Make_Or_Else;
++
++ function Make_In (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_In, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ return N;
++ end Make_In;
++
++ function Make_Not_In (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Not_In, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ return N;
++ end Make_Not_In;
++
++ function Make_Op_And (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_And, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_And);
++ Set_Entity (N, Standard_Op_And);
++ return N;
++ end Make_Op_And;
++
++ function Make_Op_Or (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Or, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Or);
++ Set_Entity (N, Standard_Op_Or);
++ return N;
++ end Make_Op_Or;
++
++ function Make_Op_Xor (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Xor, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Xor);
++ Set_Entity (N, Standard_Op_Xor);
++ return N;
++ end Make_Op_Xor;
++
++ function Make_Op_Eq (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Eq, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Eq);
++ Set_Entity (N, Standard_Op_Eq);
++ return N;
++ end Make_Op_Eq;
++
++ function Make_Op_Ne (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Ne, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Ne);
++ Set_Entity (N, Standard_Op_Ne);
++ return N;
++ end Make_Op_Ne;
++
++ function Make_Op_Lt (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Lt, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Lt);
++ Set_Entity (N, Standard_Op_Lt);
++ return N;
++ end Make_Op_Lt;
++
++ function Make_Op_Le (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Le, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Le);
++ Set_Entity (N, Standard_Op_Le);
++ return N;
++ end Make_Op_Le;
++
++ function Make_Op_Gt (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Gt, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Gt);
++ Set_Entity (N, Standard_Op_Gt);
++ return N;
++ end Make_Op_Gt;
++
++ function Make_Op_Ge (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Ge, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Ge);
++ Set_Entity (N, Standard_Op_Ge);
++ return N;
++ end Make_Op_Ge;
++
++ function Make_Op_Add (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Add, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Add);
++ Set_Entity (N, Standard_Op_Add);
++ return N;
++ end Make_Op_Add;
++
++ function Make_Op_Subtract (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Subtract, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Subtract);
++ Set_Entity (N, Standard_Op_Subtract);
++ return N;
++ end Make_Op_Subtract;
++
++ function Make_Op_Concat (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Concat, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Concat);
++ Set_Entity (N, Standard_Op_Concat);
++ return N;
++ end Make_Op_Concat;
++
++ function Make_Op_Multiply (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Multiply, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Multiply);
++ Set_Entity (N, Standard_Op_Multiply);
++ return N;
++ end Make_Op_Multiply;
++
++ function Make_Op_Divide (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Divide, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Divide);
++ Set_Entity (N, Standard_Op_Divide);
++ return N;
++ end Make_Op_Divide;
++
++ function Make_Op_Mod (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Mod, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Mod);
++ Set_Entity (N, Standard_Op_Mod);
++ return N;
++ end Make_Op_Mod;
++
++ function Make_Op_Rem (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Rem, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Rem);
++ Set_Entity (N, Standard_Op_Rem);
++ return N;
++ end Make_Op_Rem;
++
++ function Make_Op_Expon (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Expon, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Expon);
++ Set_Entity (N, Standard_Op_Expon);
++ return N;
++ end Make_Op_Expon;
++
++ function Make_Op_Plus (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Plus, Sloc);
++ begin
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Add);
++ Set_Entity (N, Standard_Op_Plus);
++ return N;
++ end Make_Op_Plus;
++
++ function Make_Op_Minus (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Minus, Sloc);
++ begin
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Subtract);
++ Set_Entity (N, Standard_Op_Minus);
++ return N;
++ end Make_Op_Minus;
++
++ function Make_Op_Abs (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Abs, Sloc);
++ begin
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Abs);
++ Set_Entity (N, Standard_Op_Abs);
++ return N;
++ end Make_Op_Abs;
++
++ function Make_Op_Not (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Not, Sloc);
++ begin
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Not);
++ Set_Entity (N, Standard_Op_Not);
++ return N;
++ end Make_Op_Not;
++
++ function Make_Type_Conversion (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Type_Conversion, Sloc);
++ begin
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Type_Conversion;
++
++ function Make_Qualified_Expression (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Qualified_Expression, Sloc);
++ begin
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Qualified_Expression;
++
++ function Make_Allocator (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Allocator, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Allocator;
++
++ function Make_Null_Statement (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Null_Statement, Sloc);
++ begin
++ return N;
++ end Make_Null_Statement;
++
++ function Make_Label (Sloc : Source_Ptr;
++ Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Label, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ return N;
++ end Make_Label;
++
++ function Make_Assignment_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Assignment_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Assignment_Statement;
++
++ function Make_If_Statement (Sloc : Source_Ptr;
++ Condition : Node_Id;
++ Then_Statements : List_Id;
++ Elsif_Parts : List_Id := No_List;
++ Else_Statements : List_Id := No_List;
++ End_Span : Uint := No_Uint)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_If_Statement, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Then_Statements (N, Then_Statements);
++ Set_Elsif_Parts (N, Elsif_Parts);
++ Set_Else_Statements (N, Else_Statements);
++ Set_End_Span (N, End_Span);
++ return N;
++ end Make_If_Statement;
++
++ function Make_Elsif_Part (Sloc : Source_Ptr;
++ Condition : Node_Id;
++ Then_Statements : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Elsif_Part, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Then_Statements (N, Then_Statements);
++ return N;
++ end Make_Elsif_Part;
++
++ function Make_Case_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id;
++ Alternatives : List_Id;
++ End_Span : Uint := No_Uint)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Case_Statement, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ Set_Alternatives (N, Alternatives);
++ Set_End_Span (N, End_Span);
++ return N;
++ end Make_Case_Statement;
++
++ function Make_Case_Statement_Alternative (Sloc : Source_Ptr;
++ Discrete_Choices : List_Id;
++ Statements : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Case_Statement_Alternative, Sloc);
++ begin
++ Set_Discrete_Choices (N, Discrete_Choices);
++ Set_Statements (N, Statements);
++ return N;
++ end Make_Case_Statement_Alternative;
++
++ function Make_Loop_Statement (Sloc : Source_Ptr;
++ Identifier : Node_Id := Empty;
++ Iteration_Scheme : Node_Id := Empty;
++ Statements : List_Id;
++ End_Label : Node_Id;
++ Has_Created_Identifier : Boolean := False;
++ Is_Null_Loop : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Loop_Statement, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ Set_Iteration_Scheme (N, Iteration_Scheme);
++ Set_Statements (N, Statements);
++ Set_End_Label (N, End_Label);
++ Set_Has_Created_Identifier (N, Has_Created_Identifier);
++ Set_Is_Null_Loop (N, Is_Null_Loop);
++ return N;
++ end Make_Loop_Statement;
++
++ function Make_Iteration_Scheme (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Loop_Parameter_Specification : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Iteration_Scheme, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Loop_Parameter_Specification
++ (N, Loop_Parameter_Specification);
++ return N;
++ end Make_Iteration_Scheme;
++
++ function Make_Loop_Parameter_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Reverse_Present : Boolean := False;
++ Discrete_Subtype_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Loop_Parameter_Specification, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Reverse_Present (N, Reverse_Present);
++ Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
++ return N;
++ end Make_Loop_Parameter_Specification;
++
++ function Make_Block_Statement (Sloc : Source_Ptr;
++ Identifier : Node_Id := Empty;
++ Declarations : List_Id := No_List;
++ Handled_Statement_Sequence : Node_Id;
++ Has_Created_Identifier : Boolean := False;
++ Is_Task_Allocation_Block : Boolean := False;
++ Is_Asynchronous_Call_Block : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Block_Statement, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ Set_Declarations (N, Declarations);
++ Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
++ Set_Has_Created_Identifier (N, Has_Created_Identifier);
++ Set_Is_Task_Allocation_Block (N, Is_Task_Allocation_Block);
++ Set_Is_Asynchronous_Call_Block (N, Is_Asynchronous_Call_Block);
++ return N;
++ end Make_Block_Statement;
++
++ function Make_Exit_Statement (Sloc : Source_Ptr;
++ Name : Node_Id := Empty;
++ Condition : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Exit_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Condition (N, Condition);
++ return N;
++ end Make_Exit_Statement;
++
++ function Make_Goto_Statement (Sloc : Source_Ptr;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Goto_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ return N;
++ end Make_Goto_Statement;
++
++ function Make_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subprogram_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ return N;
++ end Make_Subprogram_Declaration;
++
++ function Make_Abstract_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Abstract_Subprogram_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ return N;
++ end Make_Abstract_Subprogram_Declaration;
++
++ function Make_Function_Specification (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Parameter_Specifications : List_Id := No_List;
++ Subtype_Mark : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Function_Specification, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ Set_Subtype_Mark (N, Subtype_Mark);
++ return N;
++ end Make_Function_Specification;
++
++ function Make_Procedure_Specification (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Parameter_Specifications : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Procedure_Specification, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ return N;
++ end Make_Procedure_Specification;
++
++ function Make_Designator (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Designator, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Identifier (N, Identifier);
++ return N;
++ end Make_Designator;
++
++ function Make_Defining_Program_Unit_Name (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Defining_Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Defining_Program_Unit_Name, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Defining_Identifier (N, Defining_Identifier);
++ return N;
++ end Make_Defining_Program_Unit_Name;
++
++ function Make_Operator_Symbol (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Strval : String_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Operator_Symbol, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ Set_Strval (N, Strval);
++ return N;
++ end Make_Operator_Symbol;
++
++ function Make_Defining_Operator_Symbol (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Entity (N_Defining_Operator_Symbol, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ return N;
++ end Make_Defining_Operator_Symbol;
++
++ function Make_Parameter_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ In_Present : Boolean := False;
++ Out_Present : Boolean := False;
++ Parameter_Type : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Parameter_Specification, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_In_Present (N, In_Present);
++ Set_Out_Present (N, Out_Present);
++ Set_Parameter_Type (N, Parameter_Type);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Parameter_Specification;
++
++ function Make_Subprogram_Body (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id;
++ Bad_Is_Detected : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subprogram_Body, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ Set_Declarations (N, Declarations);
++ Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
++ Set_Bad_Is_Detected (N, Bad_Is_Detected);
++ return N;
++ end Make_Subprogram_Body;
++
++ function Make_Procedure_Call_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Parameter_Associations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Procedure_Call_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Parameter_Associations (N, Parameter_Associations);
++ return N;
++ end Make_Procedure_Call_Statement;
++
++ function Make_Function_Call (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Parameter_Associations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Function_Call, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Parameter_Associations (N, Parameter_Associations);
++ return N;
++ end Make_Function_Call;
++
++ function Make_Parameter_Association (Sloc : Source_Ptr;
++ Selector_Name : Node_Id;
++ Explicit_Actual_Parameter : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Parameter_Association, Sloc);
++ begin
++ Set_Selector_Name (N, Selector_Name);
++ Set_Explicit_Actual_Parameter (N, Explicit_Actual_Parameter);
++ return N;
++ end Make_Parameter_Association;
++
++ function Make_Return_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Return_Statement, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Return_Statement;
++
++ function Make_Package_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Package_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ return N;
++ end Make_Package_Declaration;
++
++ function Make_Package_Specification (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Visible_Declarations : List_Id;
++ Private_Declarations : List_Id := No_List;
++ End_Label : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Package_Specification, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Visible_Declarations (N, Visible_Declarations);
++ Set_Private_Declarations (N, Private_Declarations);
++ Set_End_Label (N, End_Label);
++ return N;
++ end Make_Package_Specification;
++
++ function Make_Package_Body (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Package_Body, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Declarations (N, Declarations);
++ Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
++ return N;
++ end Make_Package_Body;
++
++ function Make_Private_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False;
++ Abstract_Present : Boolean := False;
++ Tagged_Present : Boolean := False;
++ Limited_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Private_Type_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Unknown_Discriminants_Present
++ (N, Unknown_Discriminants_Present);
++ Set_Abstract_Present (N, Abstract_Present);
++ Set_Tagged_Present (N, Tagged_Present);
++ Set_Limited_Present (N, Limited_Present);
++ return N;
++ end Make_Private_Type_Declaration;
++
++ function Make_Private_Extension_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False;
++ Abstract_Present : Boolean := False;
++ Subtype_Indication : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Private_Extension_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Unknown_Discriminants_Present
++ (N, Unknown_Discriminants_Present);
++ Set_Abstract_Present (N, Abstract_Present);
++ Set_Subtype_Indication (N, Subtype_Indication);
++ return N;
++ end Make_Private_Extension_Declaration;
++
++ function Make_Use_Package_Clause (Sloc : Source_Ptr;
++ Names : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Use_Package_Clause, Sloc);
++ begin
++ Set_Names (N, Names);
++ return N;
++ end Make_Use_Package_Clause;
++
++ function Make_Use_Type_Clause (Sloc : Source_Ptr;
++ Subtype_Marks : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Use_Type_Clause, Sloc);
++ begin
++ Set_Subtype_Marks (N, Subtype_Marks);
++ return N;
++ end Make_Use_Type_Clause;
++
++ function Make_Object_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Subtype_Mark : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Object_Renaming_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Name (N, Name);
++ return N;
++ end Make_Object_Renaming_Declaration;
++
++ function Make_Exception_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Exception_Renaming_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Name (N, Name);
++ return N;
++ end Make_Exception_Renaming_Declaration;
++
++ function Make_Package_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Package_Renaming_Declaration, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ return N;
++ end Make_Package_Renaming_Declaration;
++
++ function Make_Subprogram_Renaming_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subprogram_Renaming_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ Set_Name (N, Name);
++ return N;
++ end Make_Subprogram_Renaming_Declaration;
++
++ function Make_Generic_Package_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Generic_Package_Renaming_Declaration, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ return N;
++ end Make_Generic_Package_Renaming_Declaration;
++
++ function Make_Generic_Procedure_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Generic_Procedure_Renaming_Declaration, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ return N;
++ end Make_Generic_Procedure_Renaming_Declaration;
++
++ function Make_Generic_Function_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Generic_Function_Renaming_Declaration, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ return N;
++ end Make_Generic_Function_Renaming_Declaration;
++
++ function Make_Task_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Task_Definition : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Task_Type_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Task_Definition (N, Task_Definition);
++ return N;
++ end Make_Task_Type_Declaration;
++
++ function Make_Single_Task_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Task_Definition : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Single_Task_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Task_Definition (N, Task_Definition);
++ return N;
++ end Make_Single_Task_Declaration;
++
++ function Make_Task_Definition (Sloc : Source_Ptr;
++ Visible_Declarations : List_Id;
++ Private_Declarations : List_Id := No_List;
++ End_Label : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Task_Definition, Sloc);
++ begin
++ Set_Visible_Declarations (N, Visible_Declarations);
++ Set_Private_Declarations (N, Private_Declarations);
++ Set_End_Label (N, End_Label);
++ return N;
++ end Make_Task_Definition;
++
++ function Make_Task_Body (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Task_Body, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Declarations (N, Declarations);
++ Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
++ return N;
++ end Make_Task_Body;
++
++ function Make_Protected_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Protected_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Protected_Type_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Protected_Definition (N, Protected_Definition);
++ return N;
++ end Make_Protected_Type_Declaration;
++
++ function Make_Single_Protected_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Protected_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Single_Protected_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Protected_Definition (N, Protected_Definition);
++ return N;
++ end Make_Single_Protected_Declaration;
++
++ function Make_Protected_Definition (Sloc : Source_Ptr;
++ Visible_Declarations : List_Id;
++ Private_Declarations : List_Id := No_List;
++ End_Label : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Protected_Definition, Sloc);
++ begin
++ Set_Visible_Declarations (N, Visible_Declarations);
++ Set_Private_Declarations (N, Private_Declarations);
++ Set_End_Label (N, End_Label);
++ return N;
++ end Make_Protected_Definition;
++
++ function Make_Protected_Body (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Declarations : List_Id;
++ End_Label : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Protected_Body, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Declarations (N, Declarations);
++ Set_End_Label (N, End_Label);
++ return N;
++ end Make_Protected_Body;
++
++ function Make_Entry_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discrete_Subtype_Definition : Node_Id := Empty;
++ Parameter_Specifications : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Entry_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ return N;
++ end Make_Entry_Declaration;
++
++ function Make_Accept_Statement (Sloc : Source_Ptr;
++ Entry_Direct_Name : Node_Id;
++ Entry_Index : Node_Id := Empty;
++ Parameter_Specifications : List_Id := No_List;
++ Handled_Statement_Sequence : Node_Id;
++ Declarations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Accept_Statement, Sloc);
++ begin
++ Set_Entry_Direct_Name (N, Entry_Direct_Name);
++ Set_Entry_Index (N, Entry_Index);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
++ Set_Declarations (N, Declarations);
++ return N;
++ end Make_Accept_Statement;
++
++ function Make_Entry_Body (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Entry_Body_Formal_Part : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Entry_Body, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Entry_Body_Formal_Part (N, Entry_Body_Formal_Part);
++ Set_Declarations (N, Declarations);
++ Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
++ return N;
++ end Make_Entry_Body;
++
++ function Make_Entry_Body_Formal_Part (Sloc : Source_Ptr;
++ Entry_Index_Specification : Node_Id := Empty;
++ Parameter_Specifications : List_Id := No_List;
++ Condition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Entry_Body_Formal_Part, Sloc);
++ begin
++ Set_Entry_Index_Specification (N, Entry_Index_Specification);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ Set_Condition (N, Condition);
++ return N;
++ end Make_Entry_Body_Formal_Part;
++
++ function Make_Entry_Index_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discrete_Subtype_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Entry_Index_Specification, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
++ return N;
++ end Make_Entry_Index_Specification;
++
++ function Make_Entry_Call_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Parameter_Associations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Entry_Call_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Parameter_Associations (N, Parameter_Associations);
++ return N;
++ end Make_Entry_Call_Statement;
++
++ function Make_Requeue_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Abort_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Requeue_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Abort_Present (N, Abort_Present);
++ return N;
++ end Make_Requeue_Statement;
++
++ function Make_Delay_Until_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Delay_Until_Statement, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Delay_Until_Statement;
++
++ function Make_Delay_Relative_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Delay_Relative_Statement, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Delay_Relative_Statement;
++
++ function Make_Selective_Accept (Sloc : Source_Ptr;
++ Select_Alternatives : List_Id;
++ Else_Statements : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Selective_Accept, Sloc);
++ begin
++ Set_Select_Alternatives (N, Select_Alternatives);
++ Set_Else_Statements (N, Else_Statements);
++ return N;
++ end Make_Selective_Accept;
++
++ function Make_Accept_Alternative (Sloc : Source_Ptr;
++ Accept_Statement : Node_Id;
++ Condition : Node_Id := Empty;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Accept_Alternative, Sloc);
++ begin
++ Set_Accept_Statement (N, Accept_Statement);
++ Set_Condition (N, Condition);
++ Set_Statements (N, Statements);
++ Set_Pragmas_Before (N, Pragmas_Before);
++ return N;
++ end Make_Accept_Alternative;
++
++ function Make_Delay_Alternative (Sloc : Source_Ptr;
++ Delay_Statement : Node_Id;
++ Condition : Node_Id := Empty;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Delay_Alternative, Sloc);
++ begin
++ Set_Delay_Statement (N, Delay_Statement);
++ Set_Condition (N, Condition);
++ Set_Statements (N, Statements);
++ Set_Pragmas_Before (N, Pragmas_Before);
++ return N;
++ end Make_Delay_Alternative;
++
++ function Make_Terminate_Alternative (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Pragmas_Before : List_Id := No_List;
++ Pragmas_After : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Terminate_Alternative, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Pragmas_Before (N, Pragmas_Before);
++ Set_Pragmas_After (N, Pragmas_After);
++ return N;
++ end Make_Terminate_Alternative;
++
++ function Make_Timed_Entry_Call (Sloc : Source_Ptr;
++ Entry_Call_Alternative : Node_Id;
++ Delay_Alternative : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Timed_Entry_Call, Sloc);
++ begin
++ Set_Entry_Call_Alternative (N, Entry_Call_Alternative);
++ Set_Delay_Alternative (N, Delay_Alternative);
++ return N;
++ end Make_Timed_Entry_Call;
++
++ function Make_Entry_Call_Alternative (Sloc : Source_Ptr;
++ Entry_Call_Statement : Node_Id;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Entry_Call_Alternative, Sloc);
++ begin
++ Set_Entry_Call_Statement (N, Entry_Call_Statement);
++ Set_Statements (N, Statements);
++ Set_Pragmas_Before (N, Pragmas_Before);
++ return N;
++ end Make_Entry_Call_Alternative;
++
++ function Make_Conditional_Entry_Call (Sloc : Source_Ptr;
++ Entry_Call_Alternative : Node_Id;
++ Else_Statements : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Conditional_Entry_Call, Sloc);
++ begin
++ Set_Entry_Call_Alternative (N, Entry_Call_Alternative);
++ Set_Else_Statements (N, Else_Statements);
++ return N;
++ end Make_Conditional_Entry_Call;
++
++ function Make_Asynchronous_Select (Sloc : Source_Ptr;
++ Triggering_Alternative : Node_Id;
++ Abortable_Part : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Asynchronous_Select, Sloc);
++ begin
++ Set_Triggering_Alternative (N, Triggering_Alternative);
++ Set_Abortable_Part (N, Abortable_Part);
++ return N;
++ end Make_Asynchronous_Select;
++
++ function Make_Triggering_Alternative (Sloc : Source_Ptr;
++ Triggering_Statement : Node_Id;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Triggering_Alternative, Sloc);
++ begin
++ Set_Triggering_Statement (N, Triggering_Statement);
++ Set_Statements (N, Statements);
++ Set_Pragmas_Before (N, Pragmas_Before);
++ return N;
++ end Make_Triggering_Alternative;
++
++ function Make_Abortable_Part (Sloc : Source_Ptr;
++ Statements : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Abortable_Part, Sloc);
++ begin
++ Set_Statements (N, Statements);
++ return N;
++ end Make_Abortable_Part;
++
++ function Make_Abort_Statement (Sloc : Source_Ptr;
++ Names : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Abort_Statement, Sloc);
++ begin
++ Set_Names (N, Names);
++ return N;
++ end Make_Abort_Statement;
++
++ function Make_Compilation_Unit (Sloc : Source_Ptr;
++ Context_Items : List_Id;
++ Private_Present : Boolean := False;
++ Unit : Node_Id;
++ Aux_Decls_Node : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Compilation_Unit, Sloc);
++ begin
++ Set_Context_Items (N, Context_Items);
++ Set_Private_Present (N, Private_Present);
++ Set_Unit (N, Unit);
++ Set_Aux_Decls_Node (N, Aux_Decls_Node);
++ return N;
++ end Make_Compilation_Unit;
++
++ function Make_Compilation_Unit_Aux (Sloc : Source_Ptr;
++ Declarations : List_Id := No_List;
++ Actions : List_Id := No_List;
++ Pragmas_After : List_Id := No_List;
++ Config_Pragmas : List_Id := Empty_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Compilation_Unit_Aux, Sloc);
++ begin
++ Set_Declarations (N, Declarations);
++ Set_Actions (N, Actions);
++ Set_Pragmas_After (N, Pragmas_After);
++ Set_Config_Pragmas (N, Config_Pragmas);
++ return N;
++ end Make_Compilation_Unit_Aux;
++
++ function Make_With_Clause (Sloc : Source_Ptr;
++ Name : Node_Id;
++ First_Name : Boolean := True;
++ Last_Name : Boolean := True;
++ Limited_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_With_Clause, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_First_Name (N, First_Name);
++ Set_Last_Name (N, Last_Name);
++ Set_Limited_Present (N, Limited_Present);
++ return N;
++ end Make_With_Clause;
++
++ function Make_With_Type_Clause (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Tagged_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_With_Type_Clause, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Tagged_Present (N, Tagged_Present);
++ return N;
++ end Make_With_Type_Clause;
++
++ function Make_Subprogram_Body_Stub (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subprogram_Body_Stub, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ return N;
++ end Make_Subprogram_Body_Stub;
++
++ function Make_Package_Body_Stub (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Package_Body_Stub, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ return N;
++ end Make_Package_Body_Stub;
++
++ function Make_Task_Body_Stub (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Task_Body_Stub, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ return N;
++ end Make_Task_Body_Stub;
++
++ function Make_Protected_Body_Stub (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Protected_Body_Stub, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ return N;
++ end Make_Protected_Body_Stub;
++
++ function Make_Subunit (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Proper_Body : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subunit, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Proper_Body (N, Proper_Body);
++ return N;
++ end Make_Subunit;
++
++ function Make_Exception_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Exception_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ return N;
++ end Make_Exception_Declaration;
++
++ function Make_Handled_Sequence_Of_Statements (Sloc : Source_Ptr;
++ Statements : List_Id;
++ End_Label : Node_Id := Empty;
++ Exception_Handlers : List_Id := No_List;
++ At_End_Proc : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Handled_Sequence_Of_Statements, Sloc);
++ begin
++ Set_Statements (N, Statements);
++ Set_End_Label (N, End_Label);
++ Set_Exception_Handlers (N, Exception_Handlers);
++ Set_At_End_Proc (N, At_End_Proc);
++ return N;
++ end Make_Handled_Sequence_Of_Statements;
++
++ function Make_Exception_Handler (Sloc : Source_Ptr;
++ Choice_Parameter : Node_Id := Empty;
++ Exception_Choices : List_Id;
++ Statements : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Exception_Handler, Sloc);
++ begin
++ Set_Choice_Parameter (N, Choice_Parameter);
++ Set_Exception_Choices (N, Exception_Choices);
++ Set_Statements (N, Statements);
++ return N;
++ end Make_Exception_Handler;
++
++ function Make_Raise_Statement (Sloc : Source_Ptr;
++ Name : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Raise_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ return N;
++ end Make_Raise_Statement;
++
++ function Make_Generic_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Generic_Formal_Declarations : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Generic_Subprogram_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
++ return N;
++ end Make_Generic_Subprogram_Declaration;
++
++ function Make_Generic_Package_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Generic_Formal_Declarations : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Generic_Package_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
++ return N;
++ end Make_Generic_Package_Declaration;
++
++ function Make_Package_Instantiation (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Package_Instantiation, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ Set_Generic_Associations (N, Generic_Associations);
++ return N;
++ end Make_Package_Instantiation;
++
++ function Make_Procedure_Instantiation (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Procedure_Instantiation, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ Set_Generic_Associations (N, Generic_Associations);
++ return N;
++ end Make_Procedure_Instantiation;
++
++ function Make_Function_Instantiation (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Function_Instantiation, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ Set_Generic_Associations (N, Generic_Associations);
++ return N;
++ end Make_Function_Instantiation;
++
++ function Make_Generic_Association (Sloc : Source_Ptr;
++ Selector_Name : Node_Id := Empty;
++ Explicit_Generic_Actual_Parameter : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Generic_Association, Sloc);
++ begin
++ Set_Selector_Name (N, Selector_Name);
++ Set_Explicit_Generic_Actual_Parameter
++ (N, Explicit_Generic_Actual_Parameter);
++ return N;
++ end Make_Generic_Association;
++
++ function Make_Formal_Object_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ In_Present : Boolean := False;
++ Out_Present : Boolean := False;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Object_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_In_Present (N, In_Present);
++ Set_Out_Present (N, Out_Present);
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Formal_Object_Declaration;
++
++ function Make_Formal_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Formal_Type_Definition : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Type_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Formal_Type_Definition (N, Formal_Type_Definition);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Unknown_Discriminants_Present
++ (N, Unknown_Discriminants_Present);
++ return N;
++ end Make_Formal_Type_Declaration;
++
++ function Make_Formal_Private_Type_Definition (Sloc : Source_Ptr;
++ Abstract_Present : Boolean := False;
++ Tagged_Present : Boolean := False;
++ Limited_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Private_Type_Definition, Sloc);
++ begin
++ Set_Abstract_Present (N, Abstract_Present);
++ Set_Tagged_Present (N, Tagged_Present);
++ Set_Limited_Present (N, Limited_Present);
++ return N;
++ end Make_Formal_Private_Type_Definition;
++
++ function Make_Formal_Derived_Type_Definition (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Private_Present : Boolean := False;
++ Abstract_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Derived_Type_Definition, Sloc);
++ begin
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Private_Present (N, Private_Present);
++ Set_Abstract_Present (N, Abstract_Present);
++ return N;
++ end Make_Formal_Derived_Type_Definition;
++
++ function Make_Formal_Discrete_Type_Definition (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Discrete_Type_Definition, Sloc);
++ begin
++ return N;
++ end Make_Formal_Discrete_Type_Definition;
++
++ function Make_Formal_Signed_Integer_Type_Definition (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Signed_Integer_Type_Definition, Sloc);
++ begin
++ return N;
++ end Make_Formal_Signed_Integer_Type_Definition;
++
++ function Make_Formal_Modular_Type_Definition (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Modular_Type_Definition, Sloc);
++ begin
++ return N;
++ end Make_Formal_Modular_Type_Definition;
++
++ function Make_Formal_Floating_Point_Definition (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Floating_Point_Definition, Sloc);
++ begin
++ return N;
++ end Make_Formal_Floating_Point_Definition;
++
++ function Make_Formal_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Ordinary_Fixed_Point_Definition, Sloc);
++ begin
++ return N;
++ end Make_Formal_Ordinary_Fixed_Point_Definition;
++
++ function Make_Formal_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Decimal_Fixed_Point_Definition, Sloc);
++ begin
++ return N;
++ end Make_Formal_Decimal_Fixed_Point_Definition;
++
++ function Make_Formal_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Default_Name : Node_Id := Empty;
++ Box_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Subprogram_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ Set_Default_Name (N, Default_Name);
++ Set_Box_Present (N, Box_Present);
++ return N;
++ end Make_Formal_Subprogram_Declaration;
++
++ function Make_Formal_Package_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List;
++ Box_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Package_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Name (N, Name);
++ Set_Generic_Associations (N, Generic_Associations);
++ Set_Box_Present (N, Box_Present);
++ return N;
++ end Make_Formal_Package_Declaration;
++
++ function Make_Attribute_Definition_Clause (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Chars : Name_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Attribute_Definition_Clause, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Chars (N, Chars);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Attribute_Definition_Clause;
++
++ function Make_Enumeration_Representation_Clause (Sloc : Source_Ptr;
++ Identifier : Node_Id;
++ Array_Aggregate : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Enumeration_Representation_Clause, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ Set_Array_Aggregate (N, Array_Aggregate);
++ return N;
++ end Make_Enumeration_Representation_Clause;
++
++ function Make_Record_Representation_Clause (Sloc : Source_Ptr;
++ Identifier : Node_Id;
++ Mod_Clause : Node_Id := Empty;
++ Component_Clauses : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Record_Representation_Clause, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ Set_Mod_Clause (N, Mod_Clause);
++ Set_Component_Clauses (N, Component_Clauses);
++ return N;
++ end Make_Record_Representation_Clause;
++
++ function Make_Component_Clause (Sloc : Source_Ptr;
++ Component_Name : Node_Id;
++ Position : Node_Id;
++ First_Bit : Node_Id;
++ Last_Bit : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Component_Clause, Sloc);
++ begin
++ Set_Component_Name (N, Component_Name);
++ Set_Position (N, Position);
++ Set_First_Bit (N, First_Bit);
++ Set_Last_Bit (N, Last_Bit);
++ return N;
++ end Make_Component_Clause;
++
++ function Make_Code_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Code_Statement, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Code_Statement;
++
++ function Make_Op_Rotate_Left (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Rotate_Left, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Rotate_Left);
++ Set_Entity (N, Standard_Op_Rotate_Left);
++ return N;
++ end Make_Op_Rotate_Left;
++
++ function Make_Op_Rotate_Right (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Rotate_Right, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Rotate_Right);
++ Set_Entity (N, Standard_Op_Rotate_Right);
++ return N;
++ end Make_Op_Rotate_Right;
++
++ function Make_Op_Shift_Left (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Shift_Left, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Shift_Left);
++ Set_Entity (N, Standard_Op_Shift_Left);
++ return N;
++ end Make_Op_Shift_Left;
++
++ function Make_Op_Shift_Right_Arithmetic (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Shift_Right_Arithmetic, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Shift_Right_Arithmetic);
++ Set_Entity (N, Standard_Op_Shift_Right_Arithmetic);
++ return N;
++ end Make_Op_Shift_Right_Arithmetic;
++
++ function Make_Op_Shift_Right (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Shift_Right, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Shift_Right);
++ Set_Entity (N, Standard_Op_Shift_Right);
++ return N;
++ end Make_Op_Shift_Right;
++
++ function Make_Delta_Constraint (Sloc : Source_Ptr;
++ Delta_Expression : Node_Id;
++ Range_Constraint : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Delta_Constraint, Sloc);
++ begin
++ Set_Delta_Expression (N, Delta_Expression);
++ Set_Range_Constraint (N, Range_Constraint);
++ return N;
++ end Make_Delta_Constraint;
++
++ function Make_At_Clause (Sloc : Source_Ptr;
++ Identifier : Node_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_At_Clause, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_At_Clause;
++
++ function Make_Mod_Clause (Sloc : Source_Ptr;
++ Expression : Node_Id;
++ Pragmas_Before : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Mod_Clause, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ Set_Pragmas_Before (N, Pragmas_Before);
++ return N;
++ end Make_Mod_Clause;
++
++ function Make_Conditional_Expression (Sloc : Source_Ptr;
++ Expressions : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Conditional_Expression, Sloc);
++ begin
++ Set_Expressions (N, Expressions);
++ return N;
++ end Make_Conditional_Expression;
++
++ function Make_Expanded_Name (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Prefix : Node_Id;
++ Selector_Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Expanded_Name, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ Set_Prefix (N, Prefix);
++ Set_Selector_Name (N, Selector_Name);
++ return N;
++ end Make_Expanded_Name;
++
++ function Make_Free_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Free_Statement, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Free_Statement;
++
++ function Make_Freeze_Entity (Sloc : Source_Ptr;
++ Actions : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Freeze_Entity, Sloc);
++ begin
++ Set_Actions (N, Actions);
++ return N;
++ end Make_Freeze_Entity;
++
++ function Make_Implicit_Label_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Implicit_Label_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ return N;
++ end Make_Implicit_Label_Declaration;
++
++ function Make_Itype_Reference (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Itype_Reference, Sloc);
++ begin
++ return N;
++ end Make_Itype_Reference;
++
++ function Make_Raise_Constraint_Error (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Reason : Uint)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Raise_Constraint_Error, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Reason (N, Reason);
++ return N;
++ end Make_Raise_Constraint_Error;
++
++ function Make_Raise_Program_Error (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Reason : Uint)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Raise_Program_Error, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Reason (N, Reason);
++ return N;
++ end Make_Raise_Program_Error;
++
++ function Make_Raise_Storage_Error (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Reason : Uint)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Raise_Storage_Error, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Reason (N, Reason);
++ return N;
++ end Make_Raise_Storage_Error;
++
++ function Make_Reference (Sloc : Source_Ptr;
++ Prefix : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Reference, Sloc);
++ begin
++ Set_Prefix (N, Prefix);
++ return N;
++ end Make_Reference;
++
++ function Make_Subprogram_Info (Sloc : Source_Ptr;
++ Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subprogram_Info, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ return N;
++ end Make_Subprogram_Info;
++
++ function Make_Unchecked_Expression (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Unchecked_Expression, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Unchecked_Expression;
++
++ function Make_Unchecked_Type_Conversion (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Unchecked_Type_Conversion, Sloc);
++ begin
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Unchecked_Type_Conversion;
++
++ function Make_Validate_Unchecked_Conversion (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Validate_Unchecked_Conversion, Sloc);
++ begin
++ return N;
++ end Make_Validate_Unchecked_Conversion;
++
++end Nmake;
+--- gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/nmake.ads.orig 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/nmake.ads 2004-06-02 00:52:35.000000000 +0200
+@@ -0,0 +1,1351 @@
++------------------------------------------------------------------------------
++-- --
++-- GNAT COMPILER COMPONENTS --
++-- --
++-- N M A K E --
++-- --
++-- S p e c --
++-- --
++-- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
++-- --
++-- GNAT is free software; you can redistribute it and/or modify it under --
++-- terms of the GNU General Public License as published by the Free Soft- --
++-- ware Foundation; either version 2, or (at your option) any later ver- --
++-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
++-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
++-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
++-- for more details. You should have received a copy of the GNU General --
++-- Public License distributed with GNAT; see file COPYING. If not, write --
++-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
++-- MA 02111-1307, USA. --
++-- --
++-- GNAT was originally developed by the GNAT team at New York University. --
++-- Extensive contributions were provided by Ada Core Technologies Inc. --
++-- --
++------------------------------------------------------------------------------
++
++pragma Style_Checks (All_Checks);
++-- Turn off subprogram order checking, since the routines here are
++-- generated automatically in order.
++
++
++with Nlists; use Nlists;
++with Types; use Types;
++with Uintp; use Uintp;
++with Urealp; use Urealp;
++
++package Nmake is
++
++-- This package contains a set of routines used to construct tree nodes
++-- using a functional style. There is one routine for each node type defined
++-- in Sinfo with the general interface:
++
++-- function Make_xxx (Sloc : Source_Ptr,
++-- Field_Name_1 : Field_Name_1_Type [:= default]
++-- Field_Name_2 : Field_Name_2_Type [:= default]
++-- ...)
++-- return Node_Id
++
++-- Only syntactic fields are included (i.e. fields marked as "-Sem" or "-Lib"
++-- in the Sinfo spec are excluded). In addition, the following four syntactic
++-- fields are excluded:
++
++-- Prev_Ids
++-- More_Ids
++-- Comes_From_Source
++-- Paren_Count
++
++-- since they are very rarely set in expanded code. If they need to be set,
++-- to other than the default values (False, False, False, zero), then the
++-- appropriate Set_xxx procedures must be used on the returned value.
++
++-- Default values are provided only for flag fields (where the default is
++-- False), and for optional fields. An optional field is one where the
++-- comment line describing the field contains the string "(set to xxx if".
++-- For such fields, a default value of xxx is provided."
++
++-- Warning: since calls to Make_xxx routines are normal function calls, the
++-- arguments can be evaluated in any order. This means that at most one such
++-- argument can have side effects (e.g. be a call to a parse routine).
++
++ function Make_Unused_At_Start (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Unused_At_Start);
++
++ function Make_Unused_At_End (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Unused_At_End);
++
++ function Make_Identifier (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id;
++ pragma Inline (Make_Identifier);
++
++ function Make_Integer_Literal (Sloc : Source_Ptr;
++ Intval : Uint)
++ return Node_Id;
++ pragma Inline (Make_Integer_Literal);
++
++ function Make_Real_Literal (Sloc : Source_Ptr;
++ Realval : Ureal)
++ return Node_Id;
++ pragma Inline (Make_Real_Literal);
++
++ function Make_Character_Literal (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Char_Literal_Value : Char_Code)
++ return Node_Id;
++ pragma Inline (Make_Character_Literal);
++
++ function Make_String_Literal (Sloc : Source_Ptr;
++ Strval : String_Id)
++ return Node_Id;
++ pragma Inline (Make_String_Literal);
++
++ function Make_Pragma (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Pragma_Argument_Associations : List_Id := No_List;
++ Debug_Statement : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Pragma);
++
++ function Make_Pragma_Argument_Association (Sloc : Source_Ptr;
++ Chars : Name_Id := No_Name;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Pragma_Argument_Association);
++
++ function Make_Defining_Identifier (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id;
++ pragma Inline (Make_Defining_Identifier);
++
++ function Make_Full_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Type_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Full_Type_Declaration);
++
++ function Make_Subtype_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Subtype_Indication : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subtype_Declaration);
++
++ function Make_Subtype_Indication (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Constraint : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subtype_Indication);
++
++ function Make_Object_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Aliased_Present : Boolean := False;
++ Constant_Present : Boolean := False;
++ Object_Definition : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Object_Declaration);
++
++ function Make_Number_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Number_Declaration);
++
++ function Make_Derived_Type_Definition (Sloc : Source_Ptr;
++ Abstract_Present : Boolean := False;
++ Subtype_Indication : Node_Id;
++ Record_Extension_Part : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Derived_Type_Definition);
++
++ function Make_Range_Constraint (Sloc : Source_Ptr;
++ Range_Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Range_Constraint);
++
++ function Make_Range (Sloc : Source_Ptr;
++ Low_Bound : Node_Id;
++ High_Bound : Node_Id;
++ Includes_Infinities : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Range);
++
++ function Make_Enumeration_Type_Definition (Sloc : Source_Ptr;
++ Literals : List_Id;
++ End_Label : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Enumeration_Type_Definition);
++
++ function Make_Defining_Character_Literal (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id;
++ pragma Inline (Make_Defining_Character_Literal);
++
++ function Make_Signed_Integer_Type_Definition (Sloc : Source_Ptr;
++ Low_Bound : Node_Id;
++ High_Bound : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Signed_Integer_Type_Definition);
++
++ function Make_Modular_Type_Definition (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Modular_Type_Definition);
++
++ function Make_Floating_Point_Definition (Sloc : Source_Ptr;
++ Digits_Expression : Node_Id;
++ Real_Range_Specification : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Floating_Point_Definition);
++
++ function Make_Real_Range_Specification (Sloc : Source_Ptr;
++ Low_Bound : Node_Id;
++ High_Bound : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Real_Range_Specification);
++
++ function Make_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr;
++ Delta_Expression : Node_Id;
++ Real_Range_Specification : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Ordinary_Fixed_Point_Definition);
++
++ function Make_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr;
++ Delta_Expression : Node_Id;
++ Digits_Expression : Node_Id;
++ Real_Range_Specification : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Decimal_Fixed_Point_Definition);
++
++ function Make_Digits_Constraint (Sloc : Source_Ptr;
++ Digits_Expression : Node_Id;
++ Range_Constraint : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Digits_Constraint);
++
++ function Make_Unconstrained_Array_Definition (Sloc : Source_Ptr;
++ Subtype_Marks : List_Id;
++ Component_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Unconstrained_Array_Definition);
++
++ function Make_Constrained_Array_Definition (Sloc : Source_Ptr;
++ Discrete_Subtype_Definitions : List_Id;
++ Component_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Constrained_Array_Definition);
++
++ function Make_Component_Definition (Sloc : Source_Ptr;
++ Aliased_Present : Boolean := False;
++ Subtype_Indication : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Component_Definition);
++
++ function Make_Discriminant_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Type : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Discriminant_Specification);
++
++ function Make_Index_Or_Discriminant_Constraint (Sloc : Source_Ptr;
++ Constraints : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Index_Or_Discriminant_Constraint);
++
++ function Make_Discriminant_Association (Sloc : Source_Ptr;
++ Selector_Names : List_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Discriminant_Association);
++
++ function Make_Record_Definition (Sloc : Source_Ptr;
++ End_Label : Node_Id := Empty;
++ Abstract_Present : Boolean := False;
++ Tagged_Present : Boolean := False;
++ Limited_Present : Boolean := False;
++ Component_List : Node_Id;
++ Null_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Record_Definition);
++
++ function Make_Component_List (Sloc : Source_Ptr;
++ Component_Items : List_Id;
++ Variant_Part : Node_Id := Empty;
++ Null_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Component_List);
++
++ function Make_Component_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Component_Definition : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Component_Declaration);
++
++ function Make_Variant_Part (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Variants : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Variant_Part);
++
++ function Make_Variant (Sloc : Source_Ptr;
++ Discrete_Choices : List_Id;
++ Component_List : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Variant);
++
++ function Make_Others_Choice (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Others_Choice);
++
++ function Make_Access_To_Object_Definition (Sloc : Source_Ptr;
++ All_Present : Boolean := False;
++ Subtype_Indication : Node_Id;
++ Constant_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Access_To_Object_Definition);
++
++ function Make_Access_Function_Definition (Sloc : Source_Ptr;
++ Protected_Present : Boolean := False;
++ Parameter_Specifications : List_Id := No_List;
++ Subtype_Mark : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Access_Function_Definition);
++
++ function Make_Access_Procedure_Definition (Sloc : Source_Ptr;
++ Protected_Present : Boolean := False;
++ Parameter_Specifications : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Access_Procedure_Definition);
++
++ function Make_Access_Definition (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Access_Definition);
++
++ function Make_Incomplete_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Incomplete_Type_Declaration);
++
++ function Make_Explicit_Dereference (Sloc : Source_Ptr;
++ Prefix : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Explicit_Dereference);
++
++ function Make_Indexed_Component (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Expressions : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Indexed_Component);
++
++ function Make_Slice (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Discrete_Range : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Slice);
++
++ function Make_Selected_Component (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Selector_Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Selected_Component);
++
++ function Make_Attribute_Reference (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Attribute_Name : Name_Id;
++ Expressions : List_Id := No_List;
++ Must_Be_Byte_Aligned : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Attribute_Reference);
++
++ function Make_Aggregate (Sloc : Source_Ptr;
++ Expressions : List_Id := No_List;
++ Component_Associations : List_Id := No_List;
++ Null_Record_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Aggregate);
++
++ function Make_Component_Association (Sloc : Source_Ptr;
++ Choices : List_Id;
++ Expression : Node_Id;
++ Box_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Component_Association);
++
++ function Make_Extension_Aggregate (Sloc : Source_Ptr;
++ Ancestor_Part : Node_Id;
++ Expressions : List_Id := No_List;
++ Component_Associations : List_Id := No_List;
++ Null_Record_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Extension_Aggregate);
++
++ function Make_Null (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Null);
++
++ function Make_And_Then (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_And_Then);
++
++ function Make_Or_Else (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Or_Else);
++
++ function Make_In (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_In);
++
++ function Make_Not_In (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Not_In);
++
++ function Make_Op_And (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_And);
++
++ function Make_Op_Or (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Or);
++
++ function Make_Op_Xor (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Xor);
++
++ function Make_Op_Eq (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Eq);
++
++ function Make_Op_Ne (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Ne);
++
++ function Make_Op_Lt (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Lt);
++
++ function Make_Op_Le (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Le);
++
++ function Make_Op_Gt (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Gt);
++
++ function Make_Op_Ge (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Ge);
++
++ function Make_Op_Add (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Add);
++
++ function Make_Op_Subtract (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Subtract);
++
++ function Make_Op_Concat (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Concat);
++
++ function Make_Op_Multiply (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Multiply);
++
++ function Make_Op_Divide (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Divide);
++
++ function Make_Op_Mod (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Mod);
++
++ function Make_Op_Rem (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Rem);
++
++ function Make_Op_Expon (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Expon);
++
++ function Make_Op_Plus (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Plus);
++
++ function Make_Op_Minus (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Minus);
++
++ function Make_Op_Abs (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Abs);
++
++ function Make_Op_Not (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Not);
++
++ function Make_Type_Conversion (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Type_Conversion);
++
++ function Make_Qualified_Expression (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Qualified_Expression);
++
++ function Make_Allocator (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Allocator);
++
++ function Make_Null_Statement (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Null_Statement);
++
++ function Make_Label (Sloc : Source_Ptr;
++ Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Label);
++
++ function Make_Assignment_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Assignment_Statement);
++
++ function Make_If_Statement (Sloc : Source_Ptr;
++ Condition : Node_Id;
++ Then_Statements : List_Id;
++ Elsif_Parts : List_Id := No_List;
++ Else_Statements : List_Id := No_List;
++ End_Span : Uint := No_Uint)
++ return Node_Id;
++ pragma Inline (Make_If_Statement);
++
++ function Make_Elsif_Part (Sloc : Source_Ptr;
++ Condition : Node_Id;
++ Then_Statements : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Elsif_Part);
++
++ function Make_Case_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id;
++ Alternatives : List_Id;
++ End_Span : Uint := No_Uint)
++ return Node_Id;
++ pragma Inline (Make_Case_Statement);
++
++ function Make_Case_Statement_Alternative (Sloc : Source_Ptr;
++ Discrete_Choices : List_Id;
++ Statements : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Case_Statement_Alternative);
++
++ function Make_Loop_Statement (Sloc : Source_Ptr;
++ Identifier : Node_Id := Empty;
++ Iteration_Scheme : Node_Id := Empty;
++ Statements : List_Id;
++ End_Label : Node_Id;
++ Has_Created_Identifier : Boolean := False;
++ Is_Null_Loop : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Loop_Statement);
++
++ function Make_Iteration_Scheme (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Loop_Parameter_Specification : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Iteration_Scheme);
++
++ function Make_Loop_Parameter_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Reverse_Present : Boolean := False;
++ Discrete_Subtype_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Loop_Parameter_Specification);
++
++ function Make_Block_Statement (Sloc : Source_Ptr;
++ Identifier : Node_Id := Empty;
++ Declarations : List_Id := No_List;
++ Handled_Statement_Sequence : Node_Id;
++ Has_Created_Identifier : Boolean := False;
++ Is_Task_Allocation_Block : Boolean := False;
++ Is_Asynchronous_Call_Block : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Block_Statement);
++
++ function Make_Exit_Statement (Sloc : Source_Ptr;
++ Name : Node_Id := Empty;
++ Condition : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Exit_Statement);
++
++ function Make_Goto_Statement (Sloc : Source_Ptr;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Goto_Statement);
++
++ function Make_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subprogram_Declaration);
++
++ function Make_Abstract_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Abstract_Subprogram_Declaration);
++
++ function Make_Function_Specification (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Parameter_Specifications : List_Id := No_List;
++ Subtype_Mark : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Function_Specification);
++
++ function Make_Procedure_Specification (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Parameter_Specifications : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Procedure_Specification);
++
++ function Make_Designator (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Designator);
++
++ function Make_Defining_Program_Unit_Name (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Defining_Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Defining_Program_Unit_Name);
++
++ function Make_Operator_Symbol (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Strval : String_Id)
++ return Node_Id;
++ pragma Inline (Make_Operator_Symbol);
++
++ function Make_Defining_Operator_Symbol (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id;
++ pragma Inline (Make_Defining_Operator_Symbol);
++
++ function Make_Parameter_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ In_Present : Boolean := False;
++ Out_Present : Boolean := False;
++ Parameter_Type : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Parameter_Specification);
++
++ function Make_Subprogram_Body (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id;
++ Bad_Is_Detected : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Subprogram_Body);
++
++ function Make_Procedure_Call_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Parameter_Associations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Procedure_Call_Statement);
++
++ function Make_Function_Call (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Parameter_Associations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Function_Call);
++
++ function Make_Parameter_Association (Sloc : Source_Ptr;
++ Selector_Name : Node_Id;
++ Explicit_Actual_Parameter : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Parameter_Association);
++
++ function Make_Return_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Return_Statement);
++
++ function Make_Package_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Package_Declaration);
++
++ function Make_Package_Specification (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Visible_Declarations : List_Id;
++ Private_Declarations : List_Id := No_List;
++ End_Label : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Package_Specification);
++
++ function Make_Package_Body (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Package_Body);
++
++ function Make_Private_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False;
++ Abstract_Present : Boolean := False;
++ Tagged_Present : Boolean := False;
++ Limited_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Private_Type_Declaration);
++
++ function Make_Private_Extension_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False;
++ Abstract_Present : Boolean := False;
++ Subtype_Indication : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Private_Extension_Declaration);
++
++ function Make_Use_Package_Clause (Sloc : Source_Ptr;
++ Names : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Use_Package_Clause);
++
++ function Make_Use_Type_Clause (Sloc : Source_Ptr;
++ Subtype_Marks : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Use_Type_Clause);
++
++ function Make_Object_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Subtype_Mark : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Object_Renaming_Declaration);
++
++ function Make_Exception_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Exception_Renaming_Declaration);
++
++ function Make_Package_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Package_Renaming_Declaration);
++
++ function Make_Subprogram_Renaming_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subprogram_Renaming_Declaration);
++
++ function Make_Generic_Package_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Generic_Package_Renaming_Declaration);
++
++ function Make_Generic_Procedure_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Generic_Procedure_Renaming_Declaration);
++
++ function Make_Generic_Function_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Generic_Function_Renaming_Declaration);
++
++ function Make_Task_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Task_Definition : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Task_Type_Declaration);
++
++ function Make_Single_Task_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Task_Definition : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Single_Task_Declaration);
++
++ function Make_Task_Definition (Sloc : Source_Ptr;
++ Visible_Declarations : List_Id;
++ Private_Declarations : List_Id := No_List;
++ End_Label : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Task_Definition);
++
++ function Make_Task_Body (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Task_Body);
++
++ function Make_Protected_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Protected_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Protected_Type_Declaration);
++
++ function Make_Single_Protected_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Protected_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Single_Protected_Declaration);
++
++ function Make_Protected_Definition (Sloc : Source_Ptr;
++ Visible_Declarations : List_Id;
++ Private_Declarations : List_Id := No_List;
++ End_Label : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Protected_Definition);
++
++ function Make_Protected_Body (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Declarations : List_Id;
++ End_Label : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Protected_Body);
++
++ function Make_Entry_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discrete_Subtype_Definition : Node_Id := Empty;
++ Parameter_Specifications : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Entry_Declaration);
++
++ function Make_Accept_Statement (Sloc : Source_Ptr;
++ Entry_Direct_Name : Node_Id;
++ Entry_Index : Node_Id := Empty;
++ Parameter_Specifications : List_Id := No_List;
++ Handled_Statement_Sequence : Node_Id;
++ Declarations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Accept_Statement);
++
++ function Make_Entry_Body (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Entry_Body_Formal_Part : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Entry_Body);
++
++ function Make_Entry_Body_Formal_Part (Sloc : Source_Ptr;
++ Entry_Index_Specification : Node_Id := Empty;
++ Parameter_Specifications : List_Id := No_List;
++ Condition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Entry_Body_Formal_Part);
++
++ function Make_Entry_Index_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discrete_Subtype_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Entry_Index_Specification);
++
++ function Make_Entry_Call_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Parameter_Associations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Entry_Call_Statement);
++
++ function Make_Requeue_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Abort_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Requeue_Statement);
++
++ function Make_Delay_Until_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Delay_Until_Statement);
++
++ function Make_Delay_Relative_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Delay_Relative_Statement);
++
++ function Make_Selective_Accept (Sloc : Source_Ptr;
++ Select_Alternatives : List_Id;
++ Else_Statements : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Selective_Accept);
++
++ function Make_Accept_Alternative (Sloc : Source_Ptr;
++ Accept_Statement : Node_Id;
++ Condition : Node_Id := Empty;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Accept_Alternative);
++
++ function Make_Delay_Alternative (Sloc : Source_Ptr;
++ Delay_Statement : Node_Id;
++ Condition : Node_Id := Empty;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Delay_Alternative);
++
++ function Make_Terminate_Alternative (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Pragmas_Before : List_Id := No_List;
++ Pragmas_After : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Terminate_Alternative);
++
++ function Make_Timed_Entry_Call (Sloc : Source_Ptr;
++ Entry_Call_Alternative : Node_Id;
++ Delay_Alternative : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Timed_Entry_Call);
++
++ function Make_Entry_Call_Alternative (Sloc : Source_Ptr;
++ Entry_Call_Statement : Node_Id;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Entry_Call_Alternative);
++
++ function Make_Conditional_Entry_Call (Sloc : Source_Ptr;
++ Entry_Call_Alternative : Node_Id;
++ Else_Statements : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Conditional_Entry_Call);
++
++ function Make_Asynchronous_Select (Sloc : Source_Ptr;
++ Triggering_Alternative : Node_Id;
++ Abortable_Part : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Asynchronous_Select);
++
++ function Make_Triggering_Alternative (Sloc : Source_Ptr;
++ Triggering_Statement : Node_Id;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Triggering_Alternative);
++
++ function Make_Abortable_Part (Sloc : Source_Ptr;
++ Statements : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Abortable_Part);
++
++ function Make_Abort_Statement (Sloc : Source_Ptr;
++ Names : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Abort_Statement);
++
++ function Make_Compilation_Unit (Sloc : Source_Ptr;
++ Context_Items : List_Id;
++ Private_Present : Boolean := False;
++ Unit : Node_Id;
++ Aux_Decls_Node : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Compilation_Unit);
++
++ function Make_Compilation_Unit_Aux (Sloc : Source_Ptr;
++ Declarations : List_Id := No_List;
++ Actions : List_Id := No_List;
++ Pragmas_After : List_Id := No_List;
++ Config_Pragmas : List_Id := Empty_List)
++ return Node_Id;
++ pragma Inline (Make_Compilation_Unit_Aux);
++
++ function Make_With_Clause (Sloc : Source_Ptr;
++ Name : Node_Id;
++ First_Name : Boolean := True;
++ Last_Name : Boolean := True;
++ Limited_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_With_Clause);
++
++ function Make_With_Type_Clause (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Tagged_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_With_Type_Clause);
++
++ function Make_Subprogram_Body_Stub (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subprogram_Body_Stub);
++
++ function Make_Package_Body_Stub (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Package_Body_Stub);
++
++ function Make_Task_Body_Stub (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Task_Body_Stub);
++
++ function Make_Protected_Body_Stub (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Protected_Body_Stub);
++
++ function Make_Subunit (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Proper_Body : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subunit);
++
++ function Make_Exception_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Exception_Declaration);
++
++ function Make_Handled_Sequence_Of_Statements (Sloc : Source_Ptr;
++ Statements : List_Id;
++ End_Label : Node_Id := Empty;
++ Exception_Handlers : List_Id := No_List;
++ At_End_Proc : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Handled_Sequence_Of_Statements);
++
++ function Make_Exception_Handler (Sloc : Source_Ptr;
++ Choice_Parameter : Node_Id := Empty;
++ Exception_Choices : List_Id;
++ Statements : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Exception_Handler);
++
++ function Make_Raise_Statement (Sloc : Source_Ptr;
++ Name : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Raise_Statement);
++
++ function Make_Generic_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Generic_Formal_Declarations : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Generic_Subprogram_Declaration);
++
++ function Make_Generic_Package_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Generic_Formal_Declarations : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Generic_Package_Declaration);
++
++ function Make_Package_Instantiation (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Package_Instantiation);
++
++ function Make_Procedure_Instantiation (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Procedure_Instantiation);
++
++ function Make_Function_Instantiation (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Function_Instantiation);
++
++ function Make_Generic_Association (Sloc : Source_Ptr;
++ Selector_Name : Node_Id := Empty;
++ Explicit_Generic_Actual_Parameter : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Generic_Association);
++
++ function Make_Formal_Object_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ In_Present : Boolean := False;
++ Out_Present : Boolean := False;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Formal_Object_Declaration);
++
++ function Make_Formal_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Formal_Type_Definition : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Formal_Type_Declaration);
++
++ function Make_Formal_Private_Type_Definition (Sloc : Source_Ptr;
++ Abstract_Present : Boolean := False;
++ Tagged_Present : Boolean := False;
++ Limited_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Formal_Private_Type_Definition);
++
++ function Make_Formal_Derived_Type_Definition (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Private_Present : Boolean := False;
++ Abstract_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Formal_Derived_Type_Definition);
++
++ function Make_Formal_Discrete_Type_Definition (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Formal_Discrete_Type_Definition);
++
++ function Make_Formal_Signed_Integer_Type_Definition (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Formal_Signed_Integer_Type_Definition);
++
++ function Make_Formal_Modular_Type_Definition (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Formal_Modular_Type_Definition);
++
++ function Make_Formal_Floating_Point_Definition (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Formal_Floating_Point_Definition);
++
++ function Make_Formal_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Formal_Ordinary_Fixed_Point_Definition);
++
++ function Make_Formal_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Formal_Decimal_Fixed_Point_Definition);
++
++ function Make_Formal_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Default_Name : Node_Id := Empty;
++ Box_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Formal_Subprogram_Declaration);
++
++ function Make_Formal_Package_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List;
++ Box_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Formal_Package_Declaration);
++
++ function Make_Attribute_Definition_Clause (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Chars : Name_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Attribute_Definition_Clause);
++
++ function Make_Enumeration_Representation_Clause (Sloc : Source_Ptr;
++ Identifier : Node_Id;
++ Array_Aggregate : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Enumeration_Representation_Clause);
++
++ function Make_Record_Representation_Clause (Sloc : Source_Ptr;
++ Identifier : Node_Id;
++ Mod_Clause : Node_Id := Empty;
++ Component_Clauses : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Record_Representation_Clause);
++
++ function Make_Component_Clause (Sloc : Source_Ptr;
++ Component_Name : Node_Id;
++ Position : Node_Id;
++ First_Bit : Node_Id;
++ Last_Bit : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Component_Clause);
++
++ function Make_Code_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Code_Statement);
++
++ function Make_Op_Rotate_Left (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Rotate_Left);
++
++ function Make_Op_Rotate_Right (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Rotate_Right);
++
++ function Make_Op_Shift_Left (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Shift_Left);
++
++ function Make_Op_Shift_Right_Arithmetic (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Shift_Right_Arithmetic);
++
++ function Make_Op_Shift_Right (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Shift_Right);
++
++ function Make_Delta_Constraint (Sloc : Source_Ptr;
++ Delta_Expression : Node_Id;
++ Range_Constraint : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Delta_Constraint);
++
++ function Make_At_Clause (Sloc : Source_Ptr;
++ Identifier : Node_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_At_Clause);
++
++ function Make_Mod_Clause (Sloc : Source_Ptr;
++ Expression : Node_Id;
++ Pragmas_Before : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Mod_Clause);
++
++ function Make_Conditional_Expression (Sloc : Source_Ptr;
++ Expressions : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Conditional_Expression);
++
++ function Make_Expanded_Name (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Prefix : Node_Id;
++ Selector_Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Expanded_Name);
++
++ function Make_Free_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Free_Statement);
++
++ function Make_Freeze_Entity (Sloc : Source_Ptr;
++ Actions : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Freeze_Entity);
++
++ function Make_Implicit_Label_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Implicit_Label_Declaration);
++
++ function Make_Itype_Reference (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Itype_Reference);
++
++ function Make_Raise_Constraint_Error (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Reason : Uint)
++ return Node_Id;
++ pragma Inline (Make_Raise_Constraint_Error);
++
++ function Make_Raise_Program_Error (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Reason : Uint)
++ return Node_Id;
++ pragma Inline (Make_Raise_Program_Error);
++
++ function Make_Raise_Storage_Error (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Reason : Uint)
++ return Node_Id;
++ pragma Inline (Make_Raise_Storage_Error);
++
++ function Make_Reference (Sloc : Source_Ptr;
++ Prefix : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Reference);
++
++ function Make_Subprogram_Info (Sloc : Source_Ptr;
++ Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subprogram_Info);
++
++ function Make_Unchecked_Expression (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Unchecked_Expression);
++
++ function Make_Unchecked_Type_Conversion (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Unchecked_Type_Conversion);
++
++ function Make_Validate_Unchecked_Conversion (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Validate_Unchecked_Conversion);
++
++end Nmake;
+--- gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/treeprs.ads.orig 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/treeprs.ads 2004-06-02 00:54:11.000000000 +0200
+@@ -0,0 +1,801 @@
++------------------------------------------------------------------------------
++-- --
++-- GNAT COMPILER COMPONENTS --
++-- --
++-- T R E E P R S --
++-- --
++-- S p e c --
++-- --
++-- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
++-- --
++-- GNAT is free software; you can redistribute it and/or modify it under --
++-- terms of the GNU General Public License as published by the Free Soft- --
++-- ware Foundation; either version 2, or (at your option) any later ver- --
++-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
++-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
++-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
++-- for more details. You should have received a copy of the GNU General --
++-- Public License distributed with GNAT; see file COPYING. If not, write --
++-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
++-- MA 02111-1307, USA. --
++-- --
++-- GNAT was originally developed by the GNAT team at New York University. --
++-- Extensive contributions were provided by Ada Core Technologies Inc. --
++-- --
++------------------------------------------------------------------------------
++
++
++-- This package contains the declaration of the string used by the Tree_Print
++-- package. It must be updated whenever the arrangements of the field names
++-- in package Sinfo is changed. The utility program XTREEPRS is used to
++-- do this update correctly using the template treeprs.adt as input.
++
++with Sinfo; use Sinfo;
++
++package Treeprs is
++
++ --------------------------------
++ -- String Data for Node Print --
++ --------------------------------
++
++ -- String data for print out. The Pchars array is a long string with the
++ -- the entry for each node type consisting of a single blank, followed by
++ -- a series of entries, one for each Op or Flag field used for the node.
++ -- Each entry has a single character which identifies the field, followed
++ -- by the synonym name. The starting location for a given node type is
++ -- found from the corresponding entry in the Pchars_Pos_Array.
++
++ -- The following characters identify the field. These are characters
++ -- which could never occur in a field name, so they also mark the
++ -- end of the previous name.
++
++ subtype Fchar is Character range '#' .. '9';
++
++ F_Field1 : constant Fchar := '#'; -- Character'Val (16#23#)
++ F_Field2 : constant Fchar := '$'; -- Character'Val (16#24#)
++ F_Field3 : constant Fchar := '%'; -- Character'Val (16#25#)
++ F_Field4 : constant Fchar := '&'; -- Character'Val (16#26#)
++ F_Field5 : constant Fchar := '''; -- Character'Val (16#27#)
++ F_Flag1 : constant Fchar := '('; -- Character'Val (16#28#)
++ F_Flag2 : constant Fchar := ')'; -- Character'Val (16#29#)
++ F_Flag3 : constant Fchar := '*'; -- Character'Val (16#2A#)
++ F_Flag4 : constant Fchar := '+'; -- Character'Val (16#2B#)
++ F_Flag5 : constant Fchar := ','; -- Character'Val (16#2C#)
++ F_Flag6 : constant Fchar := '-'; -- Character'Val (16#2D#)
++ F_Flag7 : constant Fchar := '.'; -- Character'Val (16#2E#)
++ F_Flag8 : constant Fchar := '/'; -- Character'Val (16#2F#)
++ F_Flag9 : constant Fchar := '0'; -- Character'Val (16#30#)
++ F_Flag10 : constant Fchar := '1'; -- Character'Val (16#31#)
++ F_Flag11 : constant Fchar := '2'; -- Character'Val (16#32#)
++ F_Flag12 : constant Fchar := '3'; -- Character'Val (16#33#)
++ F_Flag13 : constant Fchar := '4'; -- Character'Val (16#34#)
++ F_Flag14 : constant Fchar := '5'; -- Character'Val (16#35#)
++ F_Flag15 : constant Fchar := '6'; -- Character'Val (16#36#)
++ F_Flag16 : constant Fchar := '7'; -- Character'Val (16#37#)
++ F_Flag17 : constant Fchar := '8'; -- Character'Val (16#38#)
++ F_Flag18 : constant Fchar := '9'; -- Character'Val (16#39#)
++
++ -- Note this table does not include entity field and flags whose access
++ -- functions are in Einfo (these are handled by the Print_Entity_Info
++ -- procedure in Treepr, which uses the routines in Einfo to get the
++ -- proper symbolic information). In addition, the following fields are
++ -- handled by Treepr, and do not appear in the Pchars array:
++
++ -- Analyzed
++ -- Cannot_Be_Constant
++ -- Chars
++ -- Comes_From_Source
++ -- Error_Posted
++ -- Etype
++ -- Is_Controlling_Actual
++ -- Is_Overloaded
++ -- Is_Static_Expression
++ -- Left_Opnd
++ -- Must_Check_Expr
++ -- Must_Not_Freeze
++ -- No_Overflow_Expr
++ -- Paren_Count
++ -- Raises_Constraint_Error
++ -- Right_Opnd
++
++ Pchars : constant String :=
++ -- Unused_At_Start
++ "" &
++ -- At_Clause
++ "#Identifier%Expression" &
++ -- Component_Clause
++ "#Component_Name$Position%First_Bit&Last_Bit" &
++ -- Enumeration_Representation_Clause
++ "#Identifier%Array_Aggregate&Next_Rep_Item" &
++ -- Mod_Clause
++ "%Expression&Pragmas_Before" &
++ -- Record_Representation_Clause
++ "#Identifier$Mod_Clause%Component_Clauses&Next_Rep_Item" &
++ -- Attribute_Definition_Clause
++ "$Name%Expression&Next_Rep_Item+From_At_Mod2Check_Address_Alignment" &
++ -- Empty
++ "" &
++ -- Pragma
++ "$Pragma_Argument_Associations%Debug_Statement&Next_Rep_Item" &
++ -- Pragma_Argument_Association
++ "%Expression" &
++ -- Error
++ "" &
++ -- Defining_Character_Literal
++ "$Next_Entity%Scope" &
++ -- Defining_Identifier
++ "$Next_Entity%Scope" &
++ -- Defining_Operator_Symbol
++ "$Next_Entity%Scope" &
++ -- Expanded_Name
++ "%Prefix$Selector_Name&Entity&Associated_Node4Redundant_Use2Has_Privat" &
++ "e_View" &
++ -- Identifier
++ "&Entity&Associated_Node$Original_Discriminant4Redundant_Use2Has_Priva" &
++ "te_View" &
++ -- Operator_Symbol
++ "%Strval&Entity&Associated_Node2Has_Private_View" &
++ -- Character_Literal
++ "$Char_Literal_Value&Entity&Associated_Node2Has_Private_View" &
++ -- Op_Add
++ "" &
++ -- Op_Concat
++ "4Is_Component_Left_Opnd5Is_Component_Right_Opnd" &
++ -- Op_Expon
++ "4Is_Power_Of_2_For_Shift" &
++ -- Op_Subtract
++ "" &
++ -- Op_Divide
++ "5Treat_Fixed_As_Integer4Do_Division_Check9Rounded_Result" &
++ -- Op_Mod
++ "5Treat_Fixed_As_Integer4Do_Division_Check" &
++ -- Op_Multiply
++ "5Treat_Fixed_As_Integer9Rounded_Result" &
++ -- Op_Rem
++ "5Treat_Fixed_As_Integer4Do_Division_Check" &
++ -- Op_And
++ "+Do_Length_Check" &
++ -- Op_Eq
++ "" &
++ -- Op_Ge
++ "" &
++ -- Op_Gt
++ "" &
++ -- Op_Le
++ "" &
++ -- Op_Lt
++ "" &
++ -- Op_Ne
++ "" &
++ -- Op_Or
++ "+Do_Length_Check" &
++ -- Op_Xor
++ "+Do_Length_Check" &
++ -- Op_Rotate_Left
++ "+Shift_Count_OK" &
++ -- Op_Rotate_Right
++ "+Shift_Count_OK" &
++ -- Op_Shift_Left
++ "+Shift_Count_OK" &
++ -- Op_Shift_Right
++ "+Shift_Count_OK" &
++ -- Op_Shift_Right_Arithmetic
++ "+Shift_Count_OK" &
++ -- Op_Abs
++ "" &
++ -- Op_Minus
++ "" &
++ -- Op_Not
++ "" &
++ -- Op_Plus
++ "" &
++ -- Attribute_Reference
++ "%Prefix$Attribute_Name#Expressions&Entity&Associated_Node8Do_Overflow" &
++ "_Check4Redundant_Use+OK_For_Stream5Must_Be_Byte_Aligned" &
++ -- And_Then
++ "#Actions" &
++ -- Conditional_Expression
++ "#Expressions$Then_Actions%Else_Actions" &
++ -- Explicit_Dereference
++ "%Prefix" &
++ -- Function_Call
++ "$Name%Parameter_Associations&First_Named_Actual#Controlling_Argument4" &
++ "Do_Tag_Check5No_Elaboration_Check8Parameter_List_Truncated9ABE_Is_" &
++ "Certain" &
++ -- In
++ "" &
++ -- Indexed_Component
++ "%Prefix#Expressions" &
++ -- Integer_Literal
++ "$Original_Entity%Intval4Print_In_Hex" &
++ -- Not_In
++ "" &
++ -- Null
++ "" &
++ -- Or_Else
++ "#Actions" &
++ -- Procedure_Call_Statement
++ "$Name%Parameter_Associations&First_Named_Actual#Controlling_Argument4" &
++ "Do_Tag_Check5No_Elaboration_Check8Parameter_List_Truncated9ABE_Is_" &
++ "Certain" &
++ -- Qualified_Expression
++ "&Subtype_Mark%Expression" &
++ -- Raise_Constraint_Error
++ "#Condition%Reason" &
++ -- Raise_Program_Error
++ "#Condition%Reason" &
++ -- Raise_Storage_Error
++ "#Condition%Reason" &
++ -- Aggregate
++ "#Expressions$Component_Associations8Null_Record_Present%Aggregate_Bou" &
++ "nds&Associated_Node+Static_Processing_OK9Compile_Time_Known_Aggreg" &
++ "ate2Expansion_Delayed" &
++ -- Allocator
++ "%Expression#Storage_Pool&Procedure_To_Call4No_Initialization8Do_Stora" &
++ "ge_Check" &
++ -- Extension_Aggregate
++ "%Ancestor_Part&Associated_Node#Expressions$Component_Associations8Nul" &
++ "l_Record_Present2Expansion_Delayed" &
++ -- Range
++ "#Low_Bound$High_Bound2Includes_Infinities" &
++ -- Real_Literal
++ "$Original_Entity%Realval&Corresponding_Integer_Value2Is_Machine_Numbe" &
++ "r" &
++ -- Reference
++ "%Prefix" &
++ -- Selected_Component
++ "%Prefix$Selector_Name&Associated_Node4Do_Discriminant_Check2Is_In_Dis" &
++ "criminant_Check" &
++ -- Slice
++ "%Prefix&Discrete_Range" &
++ -- String_Literal
++ "%Strval2Has_Wide_Character" &
++ -- Subprogram_Info
++ "#Identifier" &
++ -- Type_Conversion
++ "&Subtype_Mark%Expression4Do_Tag_Check+Do_Length_Check8Do_Overflow_Che" &
++ "ck2Float_Truncate9Rounded_Result5Conversion_OK" &
++ -- Unchecked_Expression
++ "%Expression" &
++ -- Unchecked_Type_Conversion
++ "&Subtype_Mark%Expression2Kill_Range_Check8No_Truncation" &
++ -- Subtype_Indication
++ "&Subtype_Mark%Constraint/Must_Not_Freeze" &
++ -- Component_Declaration
++ "#Defining_Identifier&Component_Definition%Expression,More_Ids-Prev_Id" &
++ "s" &
++ -- Entry_Declaration
++ "#Defining_Identifier&Discrete_Subtype_Definition%Parameter_Specificat" &
++ "ions'Corresponding_Body" &
++ -- Formal_Object_Declaration
++ "#Defining_Identifier6In_Present8Out_Present&Subtype_Mark%Expression,M" &
++ "ore_Ids-Prev_Ids" &
++ -- Formal_Type_Declaration
++ "#Defining_Identifier%Formal_Type_Definition&Discriminant_Specificatio" &
++ "ns4Unknown_Discriminants_Present" &
++ -- Full_Type_Declaration
++ "#Defining_Identifier&Discriminant_Specifications%Type_Definition2Disc" &
++ "r_Check_Funcs_Built" &
++ -- Incomplete_Type_Declaration
++ "#Defining_Identifier&Discriminant_Specifications4Unknown_Discriminant" &
++ "s_Present" &
++ -- Loop_Parameter_Specification
++ "#Defining_Identifier6Reverse_Present&Discrete_Subtype_Definition" &
++ -- Object_Declaration
++ "#Defining_Identifier+Aliased_Present8Constant_Present&Object_Definiti" &
++ "on%Expression$Handler_List_Entry'Corresponding_Generic_Association" &
++ ",More_Ids-Prev_Ids4No_Initialization6Assignment_OK2Exception_Junk5" &
++ "Delay_Finalize_Attach7Is_Subprogram_Descriptor" &
++ -- Protected_Type_Declaration
++ "#Defining_Identifier&Discriminant_Specifications%Protected_Definition" &
++ "'Corresponding_Body" &
++ -- Private_Extension_Declaration
++ "#Defining_Identifier&Discriminant_Specifications4Unknown_Discriminant" &
++ "s_Present+Abstract_Present'Subtype_Indication" &
++ -- Private_Type_Declaration
++ "#Defining_Identifier&Discriminant_Specifications4Unknown_Discriminant" &
++ "s_Present+Abstract_Present6Tagged_Present8Limited_Present" &
++ -- Subtype_Declaration
++ "#Defining_Identifier'Subtype_Indication&Generic_Parent_Type2Exception" &
++ "_Junk" &
++ -- Function_Specification
++ "#Defining_Unit_Name$Elaboration_Boolean%Parameter_Specifications&Subt" &
++ "ype_Mark'Generic_Parent" &
++ -- Procedure_Specification
++ "#Defining_Unit_Name$Elaboration_Boolean%Parameter_Specifications'Gene" &
++ "ric_Parent" &
++ -- Entry_Index_Specification
++ "#Defining_Identifier&Discrete_Subtype_Definition" &
++ -- Freeze_Entity
++ "&Entity$Access_Types_To_Process%TSS_Elist#Actions'First_Subtype_Link" &
++ -- Access_Function_Definition
++ "6Protected_Present%Parameter_Specifications&Subtype_Mark" &
++ -- Access_Procedure_Definition
++ "6Protected_Present%Parameter_Specifications" &
++ -- Task_Type_Declaration
++ "#Defining_Identifier$Task_Body_Procedure&Discriminant_Specifications%" &
++ "Task_Definition'Corresponding_Body" &
++ -- Package_Body_Stub
++ "#Defining_Identifier&Library_Unit'Corresponding_Body" &
++ -- Protected_Body_Stub
++ "#Defining_Identifier&Library_Unit'Corresponding_Body" &
++ -- Subprogram_Body_Stub
++ "#Specification&Library_Unit'Corresponding_Body" &
++ -- Task_Body_Stub
++ "#Defining_Identifier&Library_Unit'Corresponding_Body" &
++ -- Function_Instantiation
++ "#Defining_Unit_Name$Name%Generic_Associations&Parent_Spec'Instance_Sp" &
++ "ec9ABE_Is_Certain" &
++ -- Package_Instantiation
++ "#Defining_Unit_Name$Name%Generic_Associations&Parent_Spec'Instance_Sp" &
++ "ec9ABE_Is_Certain" &
++ -- Procedure_Instantiation
++ "#Defining_Unit_Name$Name&Parent_Spec%Generic_Associations'Instance_Sp" &
++ "ec9ABE_Is_Certain" &
++ -- Package_Body
++ "#Defining_Unit_Name$Declarations&Handled_Statement_Sequence'Correspon" &
++ "ding_Spec4Was_Originally_Stub" &
++ -- Subprogram_Body
++ "#Specification$Declarations&Handled_Statement_Sequence%Activation_Cha" &
++ "in_Entity'Corresponding_Spec+Acts_As_Spec6Bad_Is_Detected8Do_Stora" &
++ "ge_Check-Has_Priority_Pragma.Is_Protected_Subprogram_Body,Is_Task_" &
++ "Master4Was_Originally_Stub" &
++ -- Protected_Body
++ "#Defining_Identifier$Declarations&End_Label'Corresponding_Spec4Was_Or" &
++ "iginally_Stub" &
++ -- Task_Body
++ "#Defining_Identifier$Declarations&Handled_Statement_Sequence,Is_Task_" &
++ "Master%Activation_Chain_Entity'Corresponding_Spec4Was_Originally_S" &
++ "tub" &
++ -- Implicit_Label_Declaration
++ "#Defining_Identifier$Label_Construct" &
++ -- Package_Declaration
++ "#Specification'Corresponding_Body&Parent_Spec%Activation_Chain_Entity" &
++ -- Single_Task_Declaration
++ "#Defining_Identifier%Task_Definition" &
++ -- Subprogram_Declaration
++ "#Specification%Body_To_Inline'Corresponding_Body&Parent_Spec" &
++ -- Use_Package_Clause
++ "$Names%Next_Use_Clause&Hidden_By_Use_Clause" &
++ -- Generic_Package_Declaration
++ "#Specification'Corresponding_Body$Generic_Formal_Declarations&Parent_" &
++ "Spec%Activation_Chain_Entity" &
++ -- Generic_Subprogram_Declaration
++ "#Specification'Corresponding_Body$Generic_Formal_Declarations&Parent_" &
++ "Spec" &
++ -- Constrained_Array_Definition
++ "$Discrete_Subtype_Definitions&Component_Definition" &
++ -- Unconstrained_Array_Definition
++ "$Subtype_Marks&Component_Definition" &
++ -- Exception_Renaming_Declaration
++ "#Defining_Identifier$Name" &
++ -- Object_Renaming_Declaration
++ "#Defining_Identifier&Subtype_Mark$Name'Corresponding_Generic_Associat" &
++ "ion" &
++ -- Package_Renaming_Declaration
++ "#Defining_Unit_Name$Name&Parent_Spec" &
++ -- Subprogram_Renaming_Declaration
++ "#Specification$Name&Parent_Spec'Corresponding_Spec" &
++ -- Generic_Function_Renaming_Declaration
++ "#Defining_Unit_Name$Name&Parent_Spec" &
++ -- Generic_Package_Renaming_Declaration
++ "#Defining_Unit_Name$Name&Parent_Spec" &
++ -- Generic_Procedure_Renaming_Declaration
++ "#Defining_Unit_Name$Name&Parent_Spec" &
++ -- Abort_Statement
++ "$Names" &
++ -- Accept_Statement
++ "#Entry_Direct_Name'Entry_Index%Parameter_Specifications&Handled_State" &
++ "ment_Sequence$Declarations" &
++ -- Assignment_Statement
++ "$Name%Expression4Do_Tag_Check+Do_Length_Check,Forwards_OK-Backwards_O" &
++ "K.No_Ctrl_Actions" &
++ -- Asynchronous_Select
++ "#Triggering_Alternative$Abortable_Part" &
++ -- Block_Statement
++ "#Identifier$Declarations&Handled_Statement_Sequence,Is_Task_Master%Ac" &
++ "tivation_Chain_Entity6Has_Created_Identifier-Is_Task_Allocation_Bl" &
++ "ock.Is_Asynchronous_Call_Block" &
++ -- Case_Statement
++ "%Expression&Alternatives'End_Span" &
++ -- Code_Statement
++ "%Expression" &
++ -- Conditional_Entry_Call
++ "#Entry_Call_Alternative&Else_Statements" &
++ -- Delay_Relative_Statement
++ "%Expression" &
++ -- Delay_Until_Statement
++ "%Expression" &
++ -- Entry_Call_Statement
++ "$Name%Parameter_Associations&First_Named_Actual" &
++ -- Free_Statement
++ "%Expression#Storage_Pool&Procedure_To_Call" &
++ -- Goto_Statement
++ "$Name2Exception_Junk" &
++ -- Loop_Statement
++ "#Identifier$Iteration_Scheme%Statements&End_Label6Has_Created_Identif" &
++ "ier7Is_Null_Loop" &
++ -- Null_Statement
++ "" &
++ -- Raise_Statement
++ "$Name" &
++ -- Requeue_Statement
++ "$Name6Abort_Present" &
++ -- Return_Statement
++ "%Expression#Storage_Pool&Procedure_To_Call4Do_Tag_Check$Return_Type,B" &
++ "y_Ref" &
++ -- Selective_Accept
++ "#Select_Alternatives&Else_Statements" &
++ -- Timed_Entry_Call
++ "#Entry_Call_Alternative&Delay_Alternative" &
++ -- Exit_Statement
++ "$Name#Condition" &
++ -- If_Statement
++ "#Condition$Then_Statements%Elsif_Parts&Else_Statements'End_Span" &
++ -- Accept_Alternative
++ "$Accept_Statement#Condition%Statements&Pragmas_Before'Accept_Handler_" &
++ "Records" &
++ -- Delay_Alternative
++ "$Delay_Statement#Condition%Statements&Pragmas_Before" &
++ -- Elsif_Part
++ "#Condition$Then_Statements%Condition_Actions" &
++ -- Entry_Body_Formal_Part
++ "&Entry_Index_Specification%Parameter_Specifications#Condition" &
++ -- Iteration_Scheme
++ "#Condition%Condition_Actions&Loop_Parameter_Specification" &
++ -- Terminate_Alternative
++ "#Condition&Pragmas_Before'Pragmas_After" &
++ -- Abortable_Part
++ "%Statements" &
++ -- Abstract_Subprogram_Declaration
++ "#Specification" &
++ -- Access_Definition
++ "&Subtype_Mark" &
++ -- Access_To_Object_Definition
++ "6All_Present'Subtype_Indication8Constant_Present" &
++ -- Case_Statement_Alternative
++ "&Discrete_Choices%Statements" &
++ -- Compilation_Unit
++ "&Library_Unit#Context_Items6Private_Present$Unit'Aux_Decls_Node8Has_N" &
++ "o_Elaboration_Code4Body_Required+Acts_As_Spec%First_Inlined_Subpro" &
++ "gram" &
++ -- Compilation_Unit_Aux
++ "$Declarations#Actions'Pragmas_After&Config_Pragmas" &
++ -- Component_Association
++ "#Choices$Loop_Actions%Expression6Box_Present" &
++ -- Component_Definition
++ "+Aliased_Present'Subtype_Indication" &
++ -- Component_List
++ "%Component_Items&Variant_Part4Null_Present" &
++ -- Derived_Type_Definition
++ "+Abstract_Present'Subtype_Indication%Record_Extension_Part" &
++ -- Decimal_Fixed_Point_Definition
++ "%Delta_Expression$Digits_Expression&Real_Range_Specification" &
++ -- Defining_Program_Unit_Name
++ "$Name#Defining_Identifier" &
++ -- Delta_Constraint
++ "%Delta_Expression&Range_Constraint" &
++ -- Designator
++ "$Name#Identifier" &
++ -- Digits_Constraint
++ "$Digits_Expression&Range_Constraint" &
++ -- Discriminant_Association
++ "#Selector_Names%Expression" &
++ -- Discriminant_Specification
++ "#Defining_Identifier'Discriminant_Type%Expression,More_Ids-Prev_Ids" &
++ -- Enumeration_Type_Definition
++ "#Literals&End_Label" &
++ -- Entry_Body
++ "#Defining_Identifier'Entry_Body_Formal_Part$Declarations&Handled_Stat" &
++ "ement_Sequence%Activation_Chain_Entity" &
++ -- Entry_Call_Alternative
++ "#Entry_Call_Statement%Statements&Pragmas_Before" &
++ -- Exception_Declaration
++ "#Defining_Identifier%Expression,More_Ids-Prev_Ids" &
++ -- Exception_Handler
++ "$Choice_Parameter&Exception_Choices%Statements,Zero_Cost_Handling" &
++ -- Floating_Point_Definition
++ "$Digits_Expression&Real_Range_Specification" &
++ -- Formal_Decimal_Fixed_Point_Definition
++ "" &
++ -- Formal_Derived_Type_Definition
++ "&Subtype_Mark6Private_Present+Abstract_Present" &
++ -- Formal_Discrete_Type_Definition
++ "" &
++ -- Formal_Floating_Point_Definition
++ "" &
++ -- Formal_Modular_Type_Definition
++ "" &
++ -- Formal_Ordinary_Fixed_Point_Definition
++ "" &
++ -- Formal_Package_Declaration
++ "#Defining_Identifier$Name%Generic_Associations6Box_Present'Instance_S" &
++ "pec9ABE_Is_Certain" &
++ -- Formal_Private_Type_Definition
++ "+Abstract_Present6Tagged_Present8Limited_Present" &
++ -- Formal_Signed_Integer_Type_Definition
++ "" &
++ -- Formal_Subprogram_Declaration
++ "#Specification$Default_Name6Box_Present" &
++ -- Generic_Association
++ "$Selector_Name#Explicit_Generic_Actual_Parameter" &
++ -- Handled_Sequence_Of_Statements
++ "%Statements&End_Label'Exception_Handlers#At_End_Proc$First_Real_State" &
++ "ment,Zero_Cost_Handling" &
++ -- Index_Or_Discriminant_Constraint
++ "#Constraints" &
++ -- Itype_Reference
++ "#Itype" &
++ -- Label
++ "#Identifier2Exception_Junk" &
++ -- Modular_Type_Definition
++ "%Expression" &
++ -- Number_Declaration
++ "#Defining_Identifier%Expression,More_Ids-Prev_Ids" &
++ -- Ordinary_Fixed_Point_Definition
++ "%Delta_Expression&Real_Range_Specification" &
++ -- Others_Choice
++ "#Others_Discrete_Choices2All_Others" &
++ -- Package_Specification
++ "#Defining_Unit_Name$Visible_Declarations%Private_Declarations&End_Lab" &
++ "el'Generic_Parent9Limited_View_Installed" &
++ -- Parameter_Association
++ "$Selector_Name%Explicit_Actual_Parameter&Next_Named_Actual" &
++ -- Parameter_Specification
++ "#Defining_Identifier6In_Present8Out_Present$Parameter_Type%Expression" &
++ "4Do_Accessibility_Check,More_Ids-Prev_Ids'Default_Expression" &
++ -- Protected_Definition
++ "$Visible_Declarations%Private_Declarations&End_Label-Has_Priority_Pra" &
++ "gma" &
++ -- Range_Constraint
++ "&Range_Expression" &
++ -- Real_Range_Specification
++ "#Low_Bound$High_Bound" &
++ -- Record_Definition
++ "&End_Label+Abstract_Present6Tagged_Present8Limited_Present#Component_" &
++ "List4Null_Present" &
++ -- Signed_Integer_Type_Definition
++ "#Low_Bound$High_Bound" &
++ -- Single_Protected_Declaration
++ "#Defining_Identifier%Protected_Definition" &
++ -- Subunit
++ "$Name#Proper_Body%Corresponding_Stub" &
++ -- Task_Definition
++ "$Visible_Declarations%Private_Declarations&End_Label-Has_Priority_Pra" &
++ "gma,Has_Storage_Size_Pragma.Has_Task_Info_Pragma/Has_Task_Name_Pra" &
++ "gma" &
++ -- Triggering_Alternative
++ "#Triggering_Statement%Statements&Pragmas_Before" &
++ -- Use_Type_Clause
++ "$Subtype_Marks%Next_Use_Clause&Hidden_By_Use_Clause" &
++ -- Validate_Unchecked_Conversion
++ "#Source_Type$Target_Type" &
++ -- Variant
++ "&Discrete_Choices#Component_List$Enclosing_Variant%Present_Expr'Dchec" &
++ "k_Function" &
++ -- Variant_Part
++ "$Name#Variants" &
++ -- With_Clause
++ "$Name&Library_Unit'Corresponding_Spec,First_Name-Last_Name4Context_In" &
++ "stalled+Elaborate_Present6Elaborate_All_Present7Implicit_With8Limi" &
++ "ted_Present9Limited_View_Installed.Unreferenced_In_Spec/No_Entitie" &
++ "s_Ref_In_Spec" &
++ -- With_Type_Clause
++ "$Name6Tagged_Present" &
++ -- Unused_At_End
++ "";
++
++ type Pchar_Pos_Array is array (Node_Kind) of Positive;
++ Pchar_Pos : constant Pchar_Pos_Array := Pchar_Pos_Array'(
++ N_Unused_At_Start => 1,
++ N_At_Clause => 1,
++ N_Component_Clause => 23,
++ N_Enumeration_Representation_Clause => 66,
++ N_Mod_Clause => 107,
++ N_Record_Representation_Clause => 133,
++ N_Attribute_Definition_Clause => 187,
++ N_Empty => 253,
++ N_Pragma => 253,
++ N_Pragma_Argument_Association => 312,
++ N_Error => 323,
++ N_Defining_Character_Literal => 323,
++ N_Defining_Identifier => 341,
++ N_Defining_Operator_Symbol => 359,
++ N_Expanded_Name => 377,
++ N_Identifier => 452,
++ N_Operator_Symbol => 528,
++ N_Character_Literal => 575,
++ N_Op_Add => 634,
++ N_Op_Concat => 634,
++ N_Op_Expon => 681,
++ N_Op_Subtract => 705,
++ N_Op_Divide => 705,
++ N_Op_Mod => 761,
++ N_Op_Multiply => 802,
++ N_Op_Rem => 840,
++ N_Op_And => 881,
++ N_Op_Eq => 897,
++ N_Op_Ge => 897,
++ N_Op_Gt => 897,
++ N_Op_Le => 897,
++ N_Op_Lt => 897,
++ N_Op_Ne => 897,
++ N_Op_Or => 897,
++ N_Op_Xor => 913,
++ N_Op_Rotate_Left => 929,
++ N_Op_Rotate_Right => 944,
++ N_Op_Shift_Left => 959,
++ N_Op_Shift_Right => 974,
++ N_Op_Shift_Right_Arithmetic => 989,
++ N_Op_Abs => 1004,
++ N_Op_Minus => 1004,
++ N_Op_Not => 1004,
++ N_Op_Plus => 1004,
++ N_Attribute_Reference => 1004,
++ N_And_Then => 1128,
++ N_Conditional_Expression => 1136,
++ N_Explicit_Dereference => 1174,
++ N_Function_Call => 1181,
++ N_In => 1323,
++ N_Indexed_Component => 1323,
++ N_Integer_Literal => 1342,
++ N_Not_In => 1378,
++ N_Null => 1378,
++ N_Or_Else => 1378,
++ N_Procedure_Call_Statement => 1386,
++ N_Qualified_Expression => 1528,
++ N_Raise_Constraint_Error => 1552,
++ N_Raise_Program_Error => 1569,
++ N_Raise_Storage_Error => 1586,
++ N_Aggregate => 1603,
++ N_Allocator => 1759,
++ N_Extension_Aggregate => 1836,
++ N_Range => 1939,
++ N_Real_Literal => 1980,
++ N_Reference => 2050,
++ N_Selected_Component => 2057,
++ N_Slice => 2141,
++ N_String_Literal => 2163,
++ N_Subprogram_Info => 2189,
++ N_Type_Conversion => 2200,
++ N_Unchecked_Expression => 2315,
++ N_Unchecked_Type_Conversion => 2326,
++ N_Subtype_Indication => 2381,
++ N_Component_Declaration => 2421,
++ N_Entry_Declaration => 2491,
++ N_Formal_Object_Declaration => 2583,
++ N_Formal_Type_Declaration => 2668,
++ N_Full_Type_Declaration => 2769,
++ N_Incomplete_Type_Declaration => 2857,
++ N_Loop_Parameter_Specification => 2935,
++ N_Object_Declaration => 2999,
++ N_Protected_Type_Declaration => 3246,
++ N_Private_Extension_Declaration => 3334,
++ N_Private_Type_Declaration => 3448,
++ N_Subtype_Declaration => 3574,
++ N_Function_Specification => 3648,
++ N_Procedure_Specification => 3740,
++ N_Entry_Index_Specification => 3819,
++ N_Freeze_Entity => 3867,
++ N_Access_Function_Definition => 3935,
++ N_Access_Procedure_Definition => 3991,
++ N_Task_Type_Declaration => 4034,
++ N_Package_Body_Stub => 4137,
++ N_Protected_Body_Stub => 4189,
++ N_Subprogram_Body_Stub => 4241,
++ N_Task_Body_Stub => 4287,
++ N_Function_Instantiation => 4339,
++ N_Package_Instantiation => 4425,
++ N_Procedure_Instantiation => 4511,
++ N_Package_Body => 4597,
++ N_Subprogram_Body => 4695,
++ N_Protected_Body => 4922,
++ N_Task_Body => 5004,
++ N_Implicit_Label_Declaration => 5142,
++ N_Package_Declaration => 5178,
++ N_Single_Task_Declaration => 5247,
++ N_Subprogram_Declaration => 5283,
++ N_Use_Package_Clause => 5343,
++ N_Generic_Package_Declaration => 5386,
++ N_Generic_Subprogram_Declaration => 5483,
++ N_Constrained_Array_Definition => 5556,
++ N_Unconstrained_Array_Definition => 5606,
++ N_Exception_Renaming_Declaration => 5641,
++ N_Object_Renaming_Declaration => 5666,
++ N_Package_Renaming_Declaration => 5738,
++ N_Subprogram_Renaming_Declaration => 5774,
++ N_Generic_Function_Renaming_Declaration => 5824,
++ N_Generic_Package_Renaming_Declaration => 5860,
++ N_Generic_Procedure_Renaming_Declaration => 5896,
++ N_Abort_Statement => 5932,
++ N_Accept_Statement => 5938,
++ N_Assignment_Statement => 6033,
++ N_Asynchronous_Select => 6119,
++ N_Block_Statement => 6157,
++ N_Case_Statement => 6322,
++ N_Code_Statement => 6355,
++ N_Conditional_Entry_Call => 6366,
++ N_Delay_Relative_Statement => 6405,
++ N_Delay_Until_Statement => 6416,
++ N_Entry_Call_Statement => 6427,
++ N_Free_Statement => 6474,
++ N_Goto_Statement => 6516,
++ N_Loop_Statement => 6536,
++ N_Null_Statement => 6621,
++ N_Raise_Statement => 6621,
++ N_Requeue_Statement => 6626,
++ N_Return_Statement => 6645,
++ N_Selective_Accept => 6719,
++ N_Timed_Entry_Call => 6755,
++ N_Exit_Statement => 6796,
++ N_If_Statement => 6811,
++ N_Accept_Alternative => 6874,
++ N_Delay_Alternative => 6950,
++ N_Elsif_Part => 7002,
++ N_Entry_Body_Formal_Part => 7046,
++ N_Iteration_Scheme => 7107,
++ N_Terminate_Alternative => 7164,
++ N_Abortable_Part => 7203,
++ N_Abstract_Subprogram_Declaration => 7214,
++ N_Access_Definition => 7228,
++ N_Access_To_Object_Definition => 7241,
++ N_Case_Statement_Alternative => 7289,
++ N_Compilation_Unit => 7317,
++ N_Compilation_Unit_Aux => 7456,
++ N_Component_Association => 7506,
++ N_Component_Definition => 7550,
++ N_Component_List => 7585,
++ N_Derived_Type_Definition => 7627,
++ N_Decimal_Fixed_Point_Definition => 7685,
++ N_Defining_Program_Unit_Name => 7745,
++ N_Delta_Constraint => 7770,
++ N_Designator => 7804,
++ N_Digits_Constraint => 7820,
++ N_Discriminant_Association => 7855,
++ N_Discriminant_Specification => 7881,
++ N_Enumeration_Type_Definition => 7948,
++ N_Entry_Body => 7967,
++ N_Entry_Call_Alternative => 8074,
++ N_Exception_Declaration => 8121,
++ N_Exception_Handler => 8170,
++ N_Floating_Point_Definition => 8235,
++ N_Formal_Decimal_Fixed_Point_Definition => 8278,
++ N_Formal_Derived_Type_Definition => 8278,
++ N_Formal_Discrete_Type_Definition => 8324,
++ N_Formal_Floating_Point_Definition => 8324,
++ N_Formal_Modular_Type_Definition => 8324,
++ N_Formal_Ordinary_Fixed_Point_Definition => 8324,
++ N_Formal_Package_Declaration => 8324,
++ N_Formal_Private_Type_Definition => 8411,
++ N_Formal_Signed_Integer_Type_Definition => 8459,
++ N_Formal_Subprogram_Declaration => 8459,
++ N_Generic_Association => 8498,
++ N_Handled_Sequence_Of_Statements => 8546,
++ N_Index_Or_Discriminant_Constraint => 8638,
++ N_Itype_Reference => 8650,
++ N_Label => 8656,
++ N_Modular_Type_Definition => 8682,
++ N_Number_Declaration => 8693,
++ N_Ordinary_Fixed_Point_Definition => 8742,
++ N_Others_Choice => 8784,
++ N_Package_Specification => 8819,
++ N_Parameter_Association => 8928,
++ N_Parameter_Specification => 8986,
++ N_Protected_Definition => 9115,
++ N_Range_Constraint => 9187,
++ N_Real_Range_Specification => 9204,
++ N_Record_Definition => 9225,
++ N_Signed_Integer_Type_Definition => 9311,
++ N_Single_Protected_Declaration => 9332,
++ N_Subunit => 9373,
++ N_Task_Definition => 9409,
++ N_Triggering_Alternative => 9547,
++ N_Use_Type_Clause => 9594,
++ N_Validate_Unchecked_Conversion => 9645,
++ N_Variant => 9669,
++ N_Variant_Part => 9748,
++ N_With_Clause => 9762,
++ N_With_Type_Clause => 9976,
++ N_Unused_At_End => 9996);
++
++end Treeprs;
--- /dev/null
+--- gcc-3.4-20040611/gcc/ada/Make-lang.in.orig 2004-06-09 11:20:41.000000000 +0200
++++ gcc-3.4-20040611/gcc/ada/Make-lang.in 2004-06-12 03:38:09.373698608 +0200
+@@ -446,7 +446,7 @@
+ ada/doctools/xgnatugn$(build_exeext): ada/xgnatugn.adb
+ -$(MKDIR) ada/doctools
+ $(CP) $^ ada/doctools
+- cd ada/doctools && gnatmake -q xgnatugn
++ cd ada/doctools && gnatmake -q xgnatugn -a0../rts
+
+ doc/gnat_ugn_unw.texi : ada/doctools/xgnatugn$(build_exeext) \
+ $(srcdir)/ada/gnat_ugn.texi $(srcdir)/ada/ug_words
--- /dev/null
+--- gcc-3.4.0/gcc/ada/link.c.orig Mon Jan 12 12:45:24 2004
++++ gcc-3.4.0/gcc/ada/link.c Tue Jun 1 15:57:42 2004
+@@ -165,9 +165,9 @@
+
+ #elif defined (linux)
+ const char *object_file_option = "";
+-const char *run_path_option = "-Wl,-rpath,";
+-char shared_libgnat_default = STATIC;
+-int link_max = 8192;
++const char *run_path_option = "";
++char shared_libgnat_default = SHARED;
++int link_max = 131072;
+ unsigned char objlist_file_supported = 1;
+ unsigned char using_gnu_linker = 1;
+ const char *object_library_extension = ".a";
+--- gcc-3.4.0/gcc/ada/Makefile.in.orig Mon Apr 26 11:19:09 2004
++++ gcc-3.4.0/gcc/ada/Makefile.in Tue Jun 1 15:58:33 2004
+@@ -142,7 +142,7 @@
+ objext = .o
+ exeext =
+ arext = .a
+-soext = .so
++soext = .so.1
+ shext =
+
+ # Define this as & to perform parallel make on a Sequent.
+@@ -1269,6 +1269,90 @@
+ LIBRARY_VERSION := $(LIB_VERSION)
+ endif
+
++ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
++ LIBGNAT_TARGET_PAIRS = \
++ a-intnam.ads<4lintnam.ads \
++ s-inmaop.adb<7sinmaop.adb \
++ s-intman.adb<7sintman.adb \
++ s-osinte.ads<5iosinte.ads \
++ s-osinte.adb<5iosinte.adb \
++ s-osprim.adb<7sosprim.adb \
++ s-taprop.adb<5itaprop.adb \
++ s-tpopsp.adb<5atpopsp.adb \
++ s-taspri.ads<5itaspri.ads \
++ system.ads<5nsystem.ads
++ TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
++ THREADSLIB=-lpthread
++ GNATLIB_SHARED=gnatlib-shared-dual
++ PREFIX_OBJS=$(PREFIX_REAL_OBJS)
++ LIBRARY_VERSION := $(LIB_VERSION)
++endif
++
++ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
++ LIBGNAT_TARGET_PAIRS = \
++ a-intnam.ads<4lintnam.ads \
++ s-inmaop.adb<7sinmaop.adb \
++ s-intman.adb<7sintman.adb \
++ s-osinte.ads<5iosinte.ads \
++ s-osinte.adb<5iosinte.adb \
++ s-osprim.adb<7sosprim.adb \
++ s-taprop.adb<5itaprop.adb \
++ s-tpopsp.adb<5atpopsp.adb \
++ s-taspri.ads<5itaspri.ads
++# system.ads<5ssystem.ads (Tick and Stack_Check_Probes differ)
++ TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
++ THREADSLIB=-lpthread
++ GNATLIB_SHARED=gnatlib-shared-dual
++ PREFIX_OBJS=$(PREFIX_REAL_OBJS)
++ LIBRARY_VERSION := $(LIB_VERSION)
++endif
++
++ifeq ($(strip $(filter-out ppc% linux%,$(arch) $(osys))),)
++ LIBGNAT_TARGET_PAIRS = \
++ a-intnam.ads<4lintnam.ads \
++ s-inmaop.adb<7sinmaop.adb \
++ s-intman.adb<7sintman.adb \
++ s-osinte.ads<5iosinte.ads \
++ s-osinte.adb<5iosinte.adb \
++ s-osprim.adb<7sosprim.adb \
++ s-taprop.adb<5itaprop.adb \
++ s-tpopsp.adb<5atpopsp.adb \
++ s-taspri.ads<5itaspri.ads
++# system.ads<59system.ads (???)
++ TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
++ THREADSLIB=-lpthread
++ GNATLIB_SHARED=gnatlib-shared-dual
++ PREFIX_OBJS=$(PREFIX_REAL_OBJS)
++ LIBRARY_VERSION := $(LIB_VERSION)
++endif
++
++ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
++ LIBGNAT_TARGET_PAIRS = \
++ a-intnam.ads<4lintnam.ads \
++ s-inmaop.adb<7sinmaop.adb \
++ s-intman.adb<7sintman.adb \
++ s-osinte.ads<5iosinte.ads \
++ s-osinte.adb<5iosinte.adb \
++ s-osprim.adb<7sosprim.adb \
++ s-taprop.adb<5itaprop.adb \
++ s-tpopsp.adb<5atpopsp.adb \
++ s-taspri.ads<5itaspri.ads
++# system.ads<59system.ads (???)
++ TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
++ THREADSLIB=-lpthread
++ GNATLIB_SHARED=gnatlib-shared-dual
++ PREFIX_OBJS=$(PREFIX_REAL_OBJS)
++ LIBRARY_VERSION := $(LIB_VERSION)
++endif
++
++ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
++ TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
++ THREADSLIB=-lpthread
++ GNATLIB_SHARED=gnatlib-shared-dual
++ PREFIX_OBJS=$(PREFIX_REAL_OBJS)
++ LIBRARY_VERSION := $(LIB_VERSION)
++endif
++
+ ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<4lintnam.ads \
+@@ -1767,6 +1840,9 @@
+ # is guaranteed to overflow the buffer.
+
+ gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
++ $(RMDIR) save
++ $(MKDIR) save
++ $(MV) *.o save/
+ $(MAKE) -C rts CC="../../xgcc -B../../" \
+ INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
+ CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
+@@ -1779,6 +1855,8 @@
+ srcdir=$(fsrcdir) \
+ -f ../Makefile \
+ $(GNATRTL_OBJS)
++ $(MV) save/*.o .
++ $(RMDIR) save
+ $(RM) rts/libgnat$(arext) rts/libgnarl$(arext)
+ $(AR) $(AR_FLAGS) rts/libgnat$(arext) \
+ $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
+@@ -1891,14 +1969,15 @@
+ THREAD_KIND="$(THREAD_KIND)" \
+ gnatlib
+ $(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
+- cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
++ cd rts; ../../xgcc -B../../ -shared -shared-libgcc $(TARGET_LIBGCC2_CFLAGS) \
+ -o libgnat-$(LIBRARY_VERSION)$(soext) \
+ $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
+ $(SO_OPTS)libgnat-$(LIBRARY_VERSION)$(soext) $(MISCLIB) -lm
+ cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
+ -o libgnarl-$(LIBRARY_VERSION)$(soext) \
+ $(GNATRTL_TASKING_OBJS) \
+- $(SO_OPTS)libgnarl-$(LIBRARY_VERSION)$(soext) $(THREADSLIB)
++ $(SO_OPTS)libgnarl-$(LIBRARY_VERSION)$(soext) $(THREADSLIB) \
++ ./libgnat-$(LIBRARY_VERSION)$(soext)
+ cd rts; $(LN_S) libgnat-$(LIBRARY_VERSION)$(soext) libgnat$(soext)
+ cd rts; $(LN_S) libgnarl-$(LIBRARY_VERSION)$(soext) libgnarl$(soext)
+
--- /dev/null
+2005-02-18 Richard Henderson <rth@redhat.com>
+
+ PR libstdc++/10606
+ * config/linker-map.gnu (CXXABI_1.3.1): Add __cxa_get_exception_ptr.
+ * libsupc++/eh_catch.cc (__cxa_get_exception_ptr): New.
+ * libsupc++/unwind-cxx.h (__cxa_get_exception_ptr): Declare.
+
+--- libstdc++-v3/config/linker-map.gnu (revision 94498)
++++ libstdc++-v3/config/linker-map.gnu (revision 95705)
+@@ -406,3 +410,9 @@ CXXABI_1.3 {
+ local:
+ *;
+ };
++
++CXXABI_1.3.1 {
++
++ __cxa_get_exception_ptr;
++
++} CXXABI_1.3;
+--- libstdc++-v3/libsupc++/unwind-cxx.h (revision 94498)
++++ libstdc++-v3/libsupc++/unwind-cxx.h (revision 95705)
+@@ -107,6 +107,7 @@ extern "C" void __cxa_throw (void *throw
+ __attribute__((noreturn));
+
+ // Used to implement exception handlers.
++extern "C" void *__cxa_get_exception_ptr (void *) throw();
+ extern "C" void *__cxa_begin_catch (void *) throw();
+ extern "C" void __cxa_end_catch ();
+ extern "C" void __cxa_rethrow () __attribute__((noreturn));
+--- libstdc++-v3/libsupc++/eh_catch.cc (revision 94498)
++++ libstdc++-v3/libsupc++/eh_catch.cc (revision 95705)
+@@ -33,6 +33,15 @@
+
+ using namespace __cxxabiv1;
+
++extern "C" void *
++__cxxabiv1::__cxa_get_exception_ptr(void *exc_obj_in) throw()
++{
++ _Unwind_Exception *exceptionObject
++ = reinterpret_cast <_Unwind_Exception *>(exc_obj_in);
++ __cxa_exception *header = __get_exception_header_from_ue (exceptionObject);
++
++ return header->adjustedPtr;
++}
+
+ extern "C" void *
+ __cxxabiv1::__cxa_begin_catch (void *exc_obj_in) throw()
--- /dev/null
+AC_DEFUN([HIDE_INLINES], [
+ visibility_inlines_hidden=yes
+ if test "X$CXX" != "X"; then
+ AC_MSG_CHECKING([whether ${CXX} accepts -fvisbility-inlines-hidden])
+ visbility_old_cxxflags="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+ AC_TRY_COMPILE(, , , visibility_inlines_hidden=no)
+ echo $visibility_inlines_hidden
+ if test "X$visibility_inlines_hidden" = "Xno"; then
+ CXXFLAGS="$visibility_old_cxxflags"
+ fi
+ fi
+])
+
+AC_DEFUN([HIDDEN_ATTRIBUTE], [
+ if test "X$CC" != "X"; then
+ AC_MSG_CHECKING([GCC visibility attribute])
+ AC_TRY_COMPILE(
+ [int __attribute__((visibility("hidden"))) test();],
+ [],
+ AC_DEFINE(HAVE_HIDDEN_ATTRIBUTE, 1, [])
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no)
+ )
+ fi
+])
--- /dev/null
+--- gcc-3.4-20040611/gcc/doc/cpp.texi.orig 2004-01-18 12:59:03.000000000 +0100
++++ gcc-3.4-20040611/gcc/doc/cpp.texi 2004-06-12 03:49:21.959450032 +0200
+@@ -52,9 +52,9 @@
+ @set cppmanual
+
+ @ifinfo
+-@dircategory Programming
++@dircategory Programming Languages
+ @direntry
+-* Cpp: (cpp). The GNU C preprocessor.
++* Cpp: (cpp). The GNU C preprocessor.
+ @end direntry
+ @end ifinfo
+
+--- gcc-3.4-20040611/gcc/doc/cppinternals.texi.orig 2002-01-07 20:03:36.000000000 +0100
++++ gcc-3.4-20040611/gcc/doc/cppinternals.texi 2004-06-12 03:50:08.394390848 +0200
+@@ -3,9 +3,9 @@
+ @settitle The GNU C Preprocessor Internals
+
+ @ifinfo
+-@dircategory Programming
++@dircategory Programming Languages
+ @direntry
+-* Cpplib: (cppinternals). Cpplib internals.
++* Cpplib: (cppinternals). Cpplib internals.
+ @end direntry
+ @end ifinfo
+
+--- gcc-3.2/gcc/doc/gcc.texi.orig Fri Nov 1 22:58:48 2002
++++ gcc-3.2/gcc/doc/gcc.texi Fri Nov 1 23:06:12 2002
+@@ -65,9 +65,9 @@
+ 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ @end macro
+ @ifnottex
+-@dircategory Programming
++@dircategory Programming Languages:
+ @direntry
+-* gcc: (gcc). The GNU Compiler Collection.
++* gcc: (gcc). The GNU Compiler Collection
+ @end direntry
+ This file documents the use of the GNU compilers.
+ @sp 1
+--- gcc-3.2/gcc/doc/gccint.texi.orig Wed Jan 23 18:30:28 2002
++++ gcc-3.2/gcc/doc/gccint.texi Fri Nov 1 23:06:57 2002
+@@ -51,9 +51,9 @@
+ 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ @end macro
+ @ifnottex
+-@dircategory Programming
++@dircategory Programming Languages:
+ @direntry
+-* gccint: (gccint). Internals of the GNU Compiler Collection.
++* gccint: (gccint). Internals of the GNU Compiler Collection
+ @end direntry
+ This file documents the internals of the GNU compilers.
+ @sp 1
+--- gcc-3.4-20040611/gcc/ada/gnat-style.texi.orig 2004-06-09 11:20:43.000000000 +0200
++++ gcc-3.4-20040611/gcc/ada/gnat-style.texi 2004-06-12 03:22:07.287957872 +0200
+@@ -28,9 +28,9 @@
+ @setchapternewpage odd
+
+
+-@dircategory Programming
++@dircategory Programming Languages
+ @direntry
+-* gnat-style: (gnat-style). GNAT Coding Style
++* gnat-style: (gnat-style). GNAT Coding Style
+ @end direntry
+
+ @macro syntax{element}
+--- gcc-3.4-20040611/gcc/ada/gnat_ugn.texi.orig Fri Nov 1 22:58:52 2002
++++ gcc-3.4-20040611/gcc/ada/gnat_ugn.texi Fri Nov 1 23:10:20 2002
+@@ -75,6 +75,11 @@
+ @syncodeindex fn cp
+ @c %**end of header
+
++@dircategory Programming Languages:
++@direntry
++* gnat_ug: (gnat_ug). GNAT User's Guide
++@end direntry
++
+ @titlepage
+
+ @ifset vms
+--- gcc-3.2/gcc/f/g77.texi.orig Mon Apr 29 09:58:32 2002
++++ gcc-3.2/gcc/f/g77.texi Fri Nov 1 23:11:56 2002
+@@ -90,9 +90,9 @@
+ @c @end tex
+
+ @ifinfo
+-@dircategory Programming
++@dircategory Programming Languages:
+ @direntry
+-* g77: (g77). The GNU Fortran compiler.
++* g77: (g77). The GNU Fortran compiler
+ @end direntry
+ @ifset INTERNALS
+ @ifset USING
+--- gcc-3.2/gcc/java/gcj.texi.orig Sun Aug 4 18:55:55 2002
++++ gcc-3.2/gcc/java/gcj.texi Fri Nov 1 23:16:39 2002
+@@ -20,26 +20,20 @@
+
+ @ifinfo
+ @format
+-@dircategory Programming
++@dircategory Programming Languages:
+ @direntry
+-* Gcj: (gcj). Ahead-of-time compiler for the Java language
++* Gcj: (gcj). Ahead-of-time compiler for the Java language
+ @end direntry
+
+-@dircategory Individual utilities
++@dircategory Programming tools:
+ @direntry
+-* gcjh: (gcj)Invoking gcjh.
+- Generate header files from Java class files
+-* jv-scan: (gcj)Invoking jv-scan.
+- Print information about Java source files
+-* jcf-dump: (gcj)Invoking jcf-dump.
+- Print information about Java class files
+-* gij: (gcj)Invoking gij. GNU interpreter for Java bytecode
+-* jv-convert: (gcj)Invoking jv-convert.
+- Convert file from one encoding to another
+-* rmic: (gcj)Invoking rmic.
+- Generate stubs for Remote Method Invocation.
+-* rmiregistry: (gcj)Invoking rmiregistry.
+- The remote object registry.
++* gcjh: (gcj)gcjh. Generate header files from Java class files
++* jv-scan: (gcj)jv-scan. Print information about Java source files
++* jcf-dump: (gcj)jcf-dump. Print information about Java class files
++* gij: (gcj)gij. GNU interpreter for Java bytecode
++* jv-convert: (gcj)jv-convert. Convert file from one encoding to another
++* rmic: (gcj)rmic. Generate stubs for Remote Method Invocation.
++* rmiregistry: (gcj)rmiregistry. The remote object registry
+ @end direntry
+ @end format
+
+@@ -120,15 +114,15 @@
+ * Copying:: The GNU General Public License
+ * GNU Free Documentation License::
+ How you can share and copy this manual
+-* Invoking gcj:: Compiler options supported by @command{gcj}
++* gcj:: Compiler options supported by @command{gcj}
+ * Compatibility:: Compatibility between gcj and other tools for Java
+-* Invoking gcjh:: Generate header files from class files
+-* Invoking jv-scan:: Print information about source files
+-* Invoking jcf-dump:: Print information about class files
+-* Invoking gij:: Interpreting Java bytecodes
+-* Invoking jv-convert:: Converting from one encoding to another
+-* Invoking rmic:: Generate stubs for Remote Method Invocation.
+-* Invoking rmiregistry:: The remote object registry.
++* gcjh:: Generate header files from class files
++* jv-scan:: Print information about source files
++* jcf-dump:: Print information about class files
++* gij:: Interpreting Java bytecodes
++* jv-convert:: Converting from one encoding to another
++* rmic:: Generate stubs for Remote Method Invocation.
++* rmiregistry:: The remote object registry.
+ * About CNI:: Description of the Compiled Native Interface
+ * System properties:: Modifying runtime behavior of the libgcj library
+ * Resources:: Where to look for more information
+@@ -139,7 +133,7 @@
+ @include fdl.texi
+
+
+-@node Invoking gcj
++@node gcj
+ @chapter Invoking gcj
+
+ @c man title gcj Ahead-of-time compiler for the Java language
+@@ -506,7 +500,7 @@
+ @end itemize
+
+
+-@node Invoking gcjh
++@node gcjh
+ @chapter Invoking gcjh
+
+ @c man title gcjh generate header files from Java class files
+@@ -607,7 +601,7 @@
+
+ @c man end
+
+-@node Invoking jv-scan
++@node jv-scan
+ @chapter Invoking jv-scan
+
+ @c man title jv-scan print information about Java source file
+@@ -665,7 +659,7 @@
+
+ @c man end
+
+-@node Invoking jcf-dump
++@node jcf-dump
+ @chapter Invoking jcf-dump
+
+ @c man title jcf-dump print information about Java class files
+@@ -720,7 +714,7 @@
+
+ @c man end
+
+-@node Invoking gij
++@node gij
+ @chapter Invoking gij
+
+ @c man title gij GNU interpreter for Java bytecode
+@@ -798,7 +792,7 @@
+
+ @c man end
+
+-@node Invoking jv-convert
++@node jv-convert
+ @chapter Invoking jv-convert
+
+ @c man title jv-convert Convert file from one encoding to another
+@@ -857,7 +851,7 @@
+
+ @c man end
+
+-@node Invoking rmic
++@node rmic
+ @chapter Invoking rmic
+
+ @c man title rmic Generate stubs for Remote Method Invocation
+@@ -936,7 +930,7 @@
+ @c man end
+
+
+-@node Invoking rmiregistry
++@node rmiregistry
+ @chapter Invoking rmiregistry
+
+ @c man title rmiregistry Remote object registry
--- /dev/null
+--- gcc-3.3.3/gcc/Makefile.in.orig 2004-02-16 18:57:42.824016056 +0100
++++ gcc-3.3.3/gcc/Makefile.in 2004-02-16 18:59:52.167352880 +0100
+@@ -65,9 +65,9 @@
+ # TCFLAGS is used for compilations with the GCC just built.
+ XCFLAGS =
+ TCFLAGS =
+-CFLAGS = -g
+-STAGE1_CFLAGS = -g @stage1_cflags@
+-BOOT_CFLAGS = -g -O2
++CFLAGS =
++STAGE1_CFLAGS = @stage1_cflags@
++BOOT_CFLAGS = -O2
+
+ # Flags to determine code coverage. When coverage is disabled, this will
+ # contain the optimization flags, as you normally want code coverage
+@@ -390,7 +390,7 @@
+
+ # Options to use when compiling libgcc2.a.
+ #
+-LIBGCC2_DEBUG_CFLAGS = -g
++LIBGCC2_DEBUG_CFLAGS =
+ LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@
+
+ # Additional options to use when compiling libgcc2.a.
+--- gcc-3.3.3/gcc/ada/Makefile.in.orig 2004-02-16 08:29:33.000000000 +0100
++++ gcc-3.3.3/gcc/ada/Makefile.in 2004-02-16 19:04:55.708207656 +0100
+@@ -73,7 +73,7 @@
+ # to the stage2 and stage3 compilations
+ # XCFLAGS is used for most compilations but not when using the GCC just built.
+ XCFLAGS =
+-CFLAGS = -g
++CFLAGS =
+ BOOT_CFLAGS = -O $(CFLAGS)
+ # These exists to be overridden by the x-* and t-* files, respectively.
+ X_CFLAGS =
+@@ -127,7 +127,7 @@
+ SOME_ADAFLAGS =-gnata
+ FORCE_DEBUG_ADAFLAGS = -g
+ GNATLIBFLAGS = -gnatpg
+-GNATLIBCFLAGS = -g -O2
++GNATLIBCFLAGS = -O2
+ GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
+ -DIN_RTS
+ ALL_ADA_CFLAGS = $(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
+--- gcc-3.3.3/libjava/Makefile.am.orig 2004-02-16 08:29:34.000000000 +0100
++++ gcc-3.3.3/libjava/Makefile.am 2004-02-16 19:02:25.582030304 +0100
+@@ -95,7 +95,7 @@
+ AM_CFLAGS = @LIBGCJ_CFLAGS@
+ endif
+
+-JCFLAGS = -g
++JCFLAGS =
+ JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
+
+ LIBFFIINCS = @LIBFFIINCS@
+--- gcc-3.3.3/libjava/Makefile.in.orig 2004-02-16 08:29:34.000000000 +0100
++++ gcc-3.3.3/libjava/Makefile.in 2004-02-16 19:02:31.196176824 +0100
+@@ -180,7 +180,7 @@
+ @USING_GCC_TRUE@AM_CFLAGS = @USING_GCC_TRUE@@LIBGCJ_CFLAGS@ $(WARNINGS)
+ @USING_GCC_FALSE@AM_CFLAGS = @USING_GCC_FALSE@@LIBGCJ_CFLAGS@
+
+-JCFLAGS = -g
++JCFLAGS =
+ JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
+
+ LIBFFIINCS = @LIBFFIINCS@
--- /dev/null
+--- gcc-3.2/libstdc++-v3/configure.orig Sat Jul 27 01:23:04 2002
++++ gcc-3.2/libstdc++-v3/configure Thu Aug 22 08:03:18 2002
+@@ -2957,7 +2957,7 @@
+ int j;
+ __locale_t loc;
+ __locale_t loc_dup;
+- loc = __newlocale(1 << LC_ALL, "de_DE", 0);
++ loc = __newlocale(1 << LC_ALL, "C", 0);
+ loc_dup = __duplocale(loc);
+ i = __strcoll_l(__one, __two, loc);
+ j = __strcoll_l(__one, __two, loc_dup);
--- /dev/null
+2006-02-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR libstdc++/11953
+ * gthr-posix.h (_REENTRANT): Only define if __osf__ is defined.
+
+ * config/ia64/linux.h (CPP_SPEC): Define.
+ * config/s390/linux.h (CPP_SPEC): Define.
+
+--- gcc/gthr-posix.h (revision 111211)
++++ gcc/gthr-posix.h (revision 111212)
+@@ -36,7 +36,7 @@ Software Foundation, 51 Franklin Street,
+ #define __GTHREADS 1
+
+ /* Some implementations of <pthread.h> require this to be defined. */
+-#ifndef _REENTRANT
++#if !defined(_REENTRANT) && defined(__osf__)
+ #define _REENTRANT 1
+ #endif
+
+--- gcc/config/s390/linux.h (revision 111211)
++++ gcc/config/s390/linux.h (revision 111212)
+@@ -89,6 +89,7 @@ Software Foundation, 51 Franklin Street,
+ %{m31:-dynamic-linker /lib/ld.so.1} \
+ %{m64:-dynamic-linker /lib64/ld64.so.1}}}}"
+
++#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+
+ #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+
+--- gcc/config/ia64/linux.h (revision 111211)
++++ gcc/config/ia64/linux.h (revision 111212)
+@@ -48,6 +48,7 @@ do { \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
+ %{static:-static}}"
+
++#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+
+ #define JMP_BUF_SIZE 76
+
+2004-05-27 Josef Zlomek <zlomekj@suse.cz>
+
+ PR middle-end/14084
+ * emit-rtl.c (gen_rtx_REG_offset): Adjust the offset according
+ to size of decl.
+
+--- gcc/emit-rtl.c 25 May 2004 12:04:15 -0000 1.391
++++ gcc/emit-rtl.c 27 May 2004 04:28:12 -0000 1.392
+@@ -746,13 +746,96 @@ gen_reg_rtx (enum machine_mode mode)
+ return val;
+ }
+
+-/* Generate a register with same attributes as REG,
+- but offsetted by OFFSET. */
++/* Generate a register with same attributes as REG, but offsetted by OFFSET.
++ Do the big endian correction if needed. */
+
+ rtx
+ gen_rtx_REG_offset (rtx reg, enum machine_mode mode, unsigned int regno, int offset)
+ {
+ rtx new = gen_rtx_REG (mode, regno);
++ tree decl;
++ HOST_WIDE_INT var_size;
++
++ /* PR middle-end/14084
++ The problem appears when a variable is stored in a larger register
++ and later it is used in the original mode or some mode in between
++ or some part of variable is accessed.
++
++ On little endian machines there is no problem because
++ the REG_OFFSET of the start of the variable is the same when
++ accessed in any mode (it is 0).
++
++ However, this is not true on big endian machines.
++ The offset of the start of the variable is different when accessed
++ in different modes.
++ When we are taking a part of the REG we have to change the OFFSET
++ from offset WRT size of mode of REG to offset WRT size of variable.
++
++ If we would not do the big endian correction the resulting REG_OFFSET
++ would be larger than the size of the DECL.
++
++ Examples of correction, for BYTES_BIG_ENDIAN WORDS_BIG_ENDIAN machine:
++
++ REG.mode MODE DECL size old offset new offset description
++ DI SI 4 4 0 int32 in SImode
++ DI SI 1 4 0 char in SImode
++ DI QI 1 7 0 char in QImode
++ DI QI 4 5 1 1st element in QImode
++ of char[4]
++ DI HI 4 6 2 1st element in HImode
++ of int16[2]
++
++ If the size of DECL is equal or greater than the size of REG
++ we can't do this correction because the register holds the
++ whole variable or a part of the variable and thus the REG_OFFSET
++ is already correct. */
++
++ decl = REG_EXPR (reg);
++ if ((BYTES_BIG_ENDIAN || WORDS_BIG_ENDIAN)
++ && decl != NULL
++ && offset > 0
++ && GET_MODE_SIZE (GET_MODE (reg)) > GET_MODE_SIZE (mode)
++ && ((var_size = int_size_in_bytes (TREE_TYPE (decl))) > 0
++ && var_size < GET_MODE_SIZE (GET_MODE (reg))))
++ {
++ int offset_le;
++
++ /* Convert machine endian to little endian WRT size of mode of REG. */
++ if (WORDS_BIG_ENDIAN)
++ offset_le = ((GET_MODE_SIZE (GET_MODE (reg)) - 1 - offset)
++ / UNITS_PER_WORD) * UNITS_PER_WORD;
++ else
++ offset_le = (offset / UNITS_PER_WORD) * UNITS_PER_WORD;
++
++ if (BYTES_BIG_ENDIAN)
++ offset_le += ((GET_MODE_SIZE (GET_MODE (reg)) - 1 - offset)
++ % UNITS_PER_WORD);
++ else
++ offset_le += offset % UNITS_PER_WORD;
++
++ if (offset_le >= var_size)
++ {
++ /* MODE is wider than the variable so the new reg will cover
++ the whole variable so the resulting OFFSET should be 0. */
++ offset = 0;
++ }
++ else
++ {
++ /* Convert little endian to machine endian WRT size of variable. */
++ if (WORDS_BIG_ENDIAN)
++ offset = ((var_size - 1 - offset_le)
++ / UNITS_PER_WORD) * UNITS_PER_WORD;
++ else
++ offset = (offset_le / UNITS_PER_WORD) * UNITS_PER_WORD;
++
++ if (BYTES_BIG_ENDIAN)
++ offset += ((var_size - 1 - offset_le)
++ % UNITS_PER_WORD);
++ else
++ offset += offset_le % UNITS_PER_WORD;
++ }
++ }
++
+ REG_ATTRS (new) = get_reg_attrs (REG_EXPR (reg),
+ REG_OFFSET (reg) + offset);
+ return new;
+2005-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/16104
+ * expr.c (convert_move): Handle vector from resp. to if mode
+ sizes differ.
+
+ * gcc.c-torture/execute/20050113-1.c: New test.
+
+--- gcc/expr.c.jj 2004-12-27 21:31:08.000000000 +0100
++++ gcc/expr.c 2005-01-13 15:56:31.229253647 +0100
+@@ -590,7 +590,26 @@ convert_move (rtx to, rtx from, int unsi
+ if (VECTOR_MODE_P (to_mode) || VECTOR_MODE_P (from_mode))
+ {
+ if (GET_MODE_BITSIZE (from_mode) != GET_MODE_BITSIZE (to_mode))
+- abort ();
++ {
++ if (VECTOR_MODE_P (from_mode))
++ {
++ enum machine_mode new_mode;
++
++ new_mode = mode_for_size (GET_MODE_BITSIZE (from_mode),
++ MODE_INT, 0);
++ from = simplify_gen_subreg (new_mode, from, from_mode, 0);
++ }
++ if (VECTOR_MODE_P (to_mode))
++ {
++ enum machine_mode new_mode;
++
++ new_mode = mode_for_size (GET_MODE_BITSIZE (to_mode),
++ MODE_INT, 0);
++ to = simplify_gen_subreg (new_mode, to, to_mode, 0);
++ }
++ convert_move (to, from, unsignedp);
++ return;
++ }
+
+ if (VECTOR_MODE_P (to_mode))
+ from = simplify_gen_subreg (to_mode, from, GET_MODE (from), 0);
+--- gcc/testsuite/gcc.c-torture/execute/20050113-1.c.jj 2005-01-13 15:51:09.194383356 +0100
++++ gcc/testsuite/gcc.c-torture/execute/20050113-1.c 2005-01-13 15:37:22.000000000 +0100
+@@ -0,0 +1,56 @@
++/* PR rtl-optimization/16104 */
++
++extern void abort (void);
++
++typedef int V2SI __attribute__ ((vector_size (8)));
++typedef short V2HI __attribute__ ((vector_size (4)));
++
++int
++test1 (void)
++{
++ return (long long) (V2SI) 0LL;
++}
++
++int
++test2 (V2SI x)
++{
++ return (long long) x;
++}
++
++V2SI
++test3 (void)
++{
++ return (V2SI) (long long) (int) (V2HI) 0;
++}
++
++V2SI
++test4 (V2HI x)
++{
++ return (V2SI) (long long) (int) x;
++}
++
++int
++main (void)
++{
++ if (sizeof (short) != 2 || sizeof (int) != 4 || sizeof (long long) != 8)
++ return 0;
++
++ if (test1 () != 0)
++ abort ();
++
++ V2SI x = { 2, 2 };
++ if (test2 (x) != 2)
++ abort ();
++
++ union { V2SI x; int y[2]; } u;
++ u.x = test3 ();
++ if (u.y[0] != 0 || u.y[1] != 0)
++ abort ();
++
++ V2HI y = { 4, 4 };
++ union { V2SI x; long long y; } v;
++ v.x = test4 (y);
++ if (v.y != 0x40004)
++ abort ();
++ return 0;
++}
+2005-09-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/18300
+ * config/i386/i386.c (classify_argument): Only use different
+ iterators for nested loops if nested loops sharing the same
+ iterator would hang.
+
+2004-11-13 Zak Kipling <zak@transversal.com>
+
+ PR target/18300
+ * config/i386/i386.c (classify_argument): Fix infinite loop when
+ passing object with 3 or more base classes by value.
+
+--- gcc/config/i386/i386.c.jj 2005-07-21 11:01:36.000000000 +0200
++++ gcc/config/i386/i386.c 2005-09-07 14:22:19.000000000 +0200
+@@ -2028,8 +2028,17 @@ classify_argument (enum machine_mode mod
+ {
+ tree bases = TYPE_BINFO_BASETYPES (type);
+ int n_bases = TREE_VEC_LENGTH (bases);
+- int i;
+-
++ int i, basenum;
++ enum x86_64_reg_class saveclasses[MAX_CLASSES];
++ bool seen[MAX_CLASSES];
++
++ /* PR target/18300: The following code mistakenly uses the same
++ iterator variable in both nested for loops. But to preserve
++ binary compatibility, do whatever this code used to do before
++ unless old GCC would hang in an infinite loop. In that case
++ use whatever GCC 4.0+ does. */
++ memset (seen, 0, sizeof (seen));
++ memcpy (saveclasses, classes, sizeof (saveclasses));
+ for (i = 0; i < n_bases; ++i)
+ {
+ tree binfo = TREE_VEC_ELT (bases, i);
+@@ -2037,6 +2046,12 @@ classify_argument (enum machine_mode mod
+ int offset = tree_low_cst (BINFO_OFFSET (binfo), 0) * 8;
+ tree type = BINFO_TYPE (binfo);
+
++ if (i < MAX_CLASSES)
++ {
++ if (seen[i])
++ break;
++ seen[i] = true;
++ }
+ num = classify_argument (TYPE_MODE (type),
+ type, subclasses,
+ (offset + bit_offset) % 256);
+@@ -2049,6 +2064,32 @@ classify_argument (enum machine_mode mod
+ merge_classes (subclasses[i], classes[i + pos]);
+ }
+ }
++ if (i < n_bases)
++ {
++ /* Older GCC 3.[0-4].x would hang in the above loop, so
++ don't worry about backwards compatibility and
++ just DTRT. */
++ memcpy (classes, saveclasses, sizeof (saveclasses));
++ for (basenum = 0; basenum < n_bases; ++basenum)
++ {
++ tree binfo = TREE_VEC_ELT (bases, basenum);
++ int num;
++ int offset = tree_low_cst (BINFO_OFFSET (binfo), 0) * 8;
++ tree type = BINFO_TYPE (binfo);
++
++ num = classify_argument (TYPE_MODE (type),
++ type, subclasses,
++ (offset + bit_offset) % 256);
++ if (!num)
++ return 0;
++ for (i = 0; i < num; i++)
++ {
++ int pos = (offset + (bit_offset % 64)) / 8 / 8;
++ classes[i + pos] =
++ merge_classes (subclasses[i], classes[i + pos]);
++ }
++ }
++ }
+ }
+ /* And now merge the fields of structure. */
+ for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
+@@ -2116,8 +2157,17 @@ classify_argument (enum machine_mode mod
+ {
+ tree bases = TYPE_BINFO_BASETYPES (type);
+ int n_bases = TREE_VEC_LENGTH (bases);
+- int i;
+-
++ int i, basenum;
++ enum x86_64_reg_class saveclasses[MAX_CLASSES];
++ bool seen[MAX_CLASSES];
++
++ /* PR target/18300: The following code mistakenly uses the same
++ iterator variable in both nested for loops. But to preserve
++ binary compatibility, do whatever this code used to do before
++ unless old GCC would hang in an infinite loop. In that case
++ use whatever GCC 4.0+ does. */
++ memset (seen, 0, sizeof (seen));
++ memcpy (saveclasses, classes, sizeof (saveclasses));
+ for (i = 0; i < n_bases; ++i)
+ {
+ tree binfo = TREE_VEC_ELT (bases, i);
+@@ -2125,6 +2175,12 @@ classify_argument (enum machine_mode mod
+ int offset = tree_low_cst (BINFO_OFFSET (binfo), 0) * 8;
+ tree type = BINFO_TYPE (binfo);
+
++ if (i < MAX_CLASSES)
++ {
++ if (seen[i])
++ break;
++ seen[i] = true;
++ }
+ num = classify_argument (TYPE_MODE (type),
+ type, subclasses,
+ (offset + (bit_offset % 64)) % 256);
+@@ -2137,6 +2193,32 @@ classify_argument (enum machine_mode mod
+ merge_classes (subclasses[i], classes[i + pos]);
+ }
+ }
++ if (i < n_bases)
++ {
++ /* Older GCC 3.[0-4].x would hang in the above loop, so
++ don't worry about backwards compatibility and
++ just DTRT. */
++ memcpy (classes, saveclasses, sizeof (saveclasses));
++ for (basenum = 0; basenum < n_bases; ++basenum)
++ {
++ tree binfo = TREE_VEC_ELT (bases, basenum);
++ int num;
++ int offset = tree_low_cst (BINFO_OFFSET (binfo), 0) * 8;
++ tree type = BINFO_TYPE (binfo);
++
++ num = classify_argument (TYPE_MODE (type),
++ type, subclasses,
++ (offset + (bit_offset % 64)) % 256);
++ if (!num)
++ return 0;
++ for (i = 0; i < num; i++)
++ {
++ int pos = (offset + (bit_offset % 64)) / 8 / 8;
++ classes[i + pos] =
++ merge_classes (subclasses[i], classes[i + pos]);
++ }
++ }
++ }
+ }
+ for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
+ {
+--- gcc/testsuite/g++.dg/other/infloop-1.C 1 Jan 1970 00:00:00 -0000
++++ gcc/testsuite/g++.dg/other/infloop-1.C 13 Nov 2004 23:09:08 -0000 1.1
+@@ -0,0 +1,16 @@
++// PR 18300: This sends old compilers into an infinite loop on x86_64
++// Testcase and patch contributed by Zak Kipling <zak@transversal.com>
++
++struct base1 { };
++struct base2 { };
++struct base3 { };
++
++struct derived : base1, base2, base3 { };
++
++void foo(derived);
++
++int main()
++{
++ foo(derived());
++}
++
+--- gcc/testsuite/g++.dg/ext/visibility/staticdatamem.C 1 Jan 1970 00:00:00 -0000
++++ gcc/testsuite/g++.dg/ext/visibility/staticdatamem.C 14 Dec 2004 02:15:55 -0000 1.1
+@@ -0,0 +1,20 @@
++// PR c++/18925
++// { dg-do compile { target ia64-*-linux* } }
++// { dg-options "-fPIC -fvisibility=hidden" }
++// { dg-final { scan-assembler-not "gprel" } }
++
++class __attribute__ ((visibility("default"))) Type
++{
++ private:
++ static long _staticTypeCount;
++ public:
++ Type() { _staticTypeCount++; }
++ ~Type();
++};
++
++long Type::_staticTypeCount = 0;
++
++Type::~Type()
++{
++ _staticTypeCount--;
++}
+2005-05-07 Richard Henderson <rth@redhat.com>
+
+ PR target/21412
+ * config/rs6000/rs6000.c (rs6000_emit_move): Look for tls addresses
+ with constant offsets.
+
+2004-07-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config/s390/s390.c (legitimize_tls_address): Handle constant offsets
+ added to TLS symbol addresses.
+
+2004-07-06 Richard Henderson <rth@redhat.com>
+
+ * config/i386/i386.c (legitimize_address): Handle CONST with TLS
+ operand.
+ (ix86_expand_move): Don't call legitimize_pic_address directly.
+
+2006-05-05 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/tls/opt-12.c: New test.
+
+--- gcc/config/s390/s390.c (revision 84404)
++++ gcc/config/s390/s390.c (revision 84535)
+@@ -2913,6 +2913,18 @@ legitimize_tls_address (rtx addr, rtx re
+ }
+ }
+
++ else if (GET_CODE (addr) == CONST && GET_CODE (XEXP (addr, 0)) == PLUS
++ && GET_CODE (XEXP (XEXP (addr, 0), 1)) == CONST_INT)
++ {
++ new = XEXP (XEXP (addr, 0), 0);
++ if (GET_CODE (new) != SYMBOL_REF)
++ new = gen_rtx_CONST (Pmode, new);
++
++ new = legitimize_tls_address (new, reg);
++ new = plus_constant (new, INTVAL (XEXP (XEXP (addr, 0), 1)));
++ new = force_operand (new, 0);
++ }
++
+ else
+ abort (); /* for now ... */
+
+--- gcc/config/i386/i386.c 2005-11-21 14:56:49.000000000 +0100
++++ gcc/config/i386/i386.c 2006-05-05 11:21:54.000000000 +0200
+@@ -6604,6 +6604,13 @@ legitimize_address (rtx x, rtx oldx ATTR
+ log = tls_symbolic_operand (x, mode);
+ if (log)
+ return legitimize_tls_address (x, log, false);
++ if (GET_CODE (x) == CONST
++ && GET_CODE (XEXP (x, 0)) == PLUS
++ && (log = tls_symbolic_operand (XEXP (XEXP (x, 0), 0), Pmode)))
++ {
++ rtx t = legitimize_tls_address (XEXP (XEXP (x, 0), 0), log, false);
++ return gen_rtx_PLUS (Pmode, t, XEXP (XEXP (x, 0), 1));
++ }
+
+ if (flag_pic && SYMBOLIC_CONST (x))
+ return legitimize_pic_address (x, 0);
+@@ -8395,6 +8402,10 @@ ix86_expand_move (enum machine_mode mode
+ #else
+ if (GET_CODE (op0) == MEM)
+ op1 = force_reg (Pmode, op1);
++ else if (GET_CODE (op1) == CONST
++ && GET_CODE (XEXP (op1, 0)) == PLUS
++ && tls_symbolic_operand (XEXP (XEXP (op1, 0), 0), Pmode))
++ op1 = legitimize_address (op1, op1, Pmode);
+ else
+ {
+ rtx temp = op0;
+--- gcc/config/rs6000/rs6000.c (revision 99334)
++++ gcc/config/rs6000/rs6000.c (revision 99367)
+@@ -4436,11 +4436,31 @@ rs6000_emit_move (rtx dest, rtx source,
+
+ /* Recognize the case where operand[1] is a reference to thread-local
+ data and load its address to a register. */
+- if (GET_CODE (operands[1]) == SYMBOL_REF)
++ if (rs6000_tls_referenced_p (operands[1]))
+ {
+- enum tls_model model = SYMBOL_REF_TLS_MODEL (operands[1]);
+- if (model != 0)
+- operands[1] = rs6000_legitimize_tls_address (operands[1], model);
++ enum tls_model model;
++ rtx tmp = operands[1];
++ rtx addend = NULL;
++
++ if (GET_CODE (tmp) == CONST && GET_CODE (XEXP (tmp, 0)) == PLUS)
++ {
++ addend = XEXP (XEXP (tmp, 0), 1);
++ tmp = XEXP (XEXP (tmp, 0), 0);
++ }
++
++ if (GET_CODE (tmp) != SYMBOL_REF)
++ abort ();
++ model = SYMBOL_REF_TLS_MODEL (tmp);
++ if (model == 0)
++ abort ();
++
++ tmp = rs6000_legitimize_tls_address (tmp, model);
++ if (addend)
++ {
++ tmp = gen_rtx_PLUS (mode, tmp, addend);
++ tmp = force_operand (tmp, operands[0]);
++ }
++ operands[1] = tmp;
+ }
+
+ /* Handle the case where reload calls us with an invalid address. */
+--- gcc/testsuite/gcc.dg/tls/opt-9.c (revision 0)
++++ gcc/testsuite/gcc.dg/tls/opt-9.c (revision 99367)
+@@ -0,0 +1,7 @@
++/* PR 21412 */
++/* { dg-do compile */
++/* { dg-options "-O2 -fPIC" } */
++
++struct S { int x[10]; };
++extern __thread struct S s;
++int *foo() { return &s.x[2]; }
+--- gcc/testsuite/gcc.dg/tls/opt-12.c 2006-04-19 19:21:31.748476000 +0200
++++ gcc/testsuite/gcc.dg/tls/opt-12.c 2006-05-05 11:01:33.000000000 +0200
+@@ -0,0 +1,16 @@
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++/* { XXdgXX-require-effective-target tls } */
++
++__thread struct
++{
++ int a;
++ char b[32];
++} thr;
++
++int
++main ()
++{
++ __builtin_strcpy (thr.b, "abcd");
++ return 0;
++}
+2005-07-22 Jakub Jelinek <jakub@redhat.com>
+
+ * src/sstream-inst.cc: Add .hidden directive for
+ streamsize basic_stringbuf<{char,wchar_t}>::showmanyc().
+ * src/sstream-inst-showmanyc.cc: New file.
+ * src/Makefile.am (libstdc++_nonshared.la): Add new library.
+ * src/Makefile.in: Rebuilt.
+ * testsuite/lib/libstdc++.exp: Append -lstdc++_nonshared for
+ testsuite executable linking.
+
+2005-06-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/21955
+ * include/std/std_sstream.h (basic_stringbuf::showmanyc): Add.
+ * testsuite/27_io/basic_streambuf/in_avail/char/1.cc: New, test
+ base class behavior.
+ * testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc: Same.
+ * testsuite/27_io/basic_stringbuf/in_avail/char/21955.cc: New.
+ * testsuite/27_io/basic_stringbuf/in_avail/char/1.cc: Match
+ filebuf behavior.
+ * testsuite/27_io/basic_stringbuf/str/char/1.cc: Same.
+
+--- libstdc++-v3/src/sstream-inst.cc.jj 2003-07-11 10:28:13.000000000 +0200
++++ libstdc++-v3/src/sstream-inst.cc 2005-07-21 17:46:08.000000000 +0200
+@@ -60,3 +60,8 @@ namespace std
+ template class basic_stringstream<wchar_t>;
+ #endif
+ } // namespace std
++
++#ifdef PIC
++__asm (".hidden _ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE9showmanycEv");
++__asm (".hidden _ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE9showmanycEv");
++#endif
+--- libstdc++-v3/src/sstream-inst-showmanyc.cc.jj 2005-07-21 21:27:40.000000000 +0200
++++ libstdc++-v3/src/sstream-inst-showmanyc.cc 2005-07-22 09:16:58.000000000 +0200
+@@ -0,0 +1,39 @@
++// Explicit instantiation file.
++
++// Copyright (C) 2005
++// Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++#include <sstream>
++
++namespace std
++{
++ // These symbols are hidden in libstdc++.so, as it is undesirable to export
++ // @@GLIBCXX_3.4.6
++ template streamsize basic_stringbuf<char, char_traits<char>, allocator<char> >::showmanyc();
++ template streamsize basic_stringbuf<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >::showmanyc();
++} // namespace std
+--- libstdc++-v3/src/Makefile.am.jj 2004-04-20 15:55:47.000000000 +0200
++++ libstdc++-v3/src/Makefile.am 2005-07-22 09:00:32.000000000 +0200
+@@ -25,7 +25,7 @@
+ include $(top_srcdir)/fragment.am
+
+ # Cross compiler support.
+-toolexeclib_LTLIBRARIES = libstdc++.la
++toolexeclib_LTLIBRARIES = libstdc++.la libstdc++_nonshared.la
+
+ # Symbol versioning for shared libraries.
+ if GLIBCXX_BUILD_VERSIONED_SHLIB
+@@ -150,6 +150,11 @@ libstdc___la_DEPENDENCIES = ${version_de
+ libstdc___la_LDFLAGS = \
+ -version-info $(libtool_VERSION) ${version_arg} -lm
+
++libstdc___nonshared_la_SOURCES = \
++ sstream-inst-showmanyc.cc
++libstdc___nonshared_la_LIBADD =
++libstdc___nonshared_la_DEPENDENCIES = $(libstdc___nonshared_la_LIBADD)
++libstdc___nonshared_la_LDFLAGS = -static
+
+ # Use special rules for the deprecated source files so that they find
+ # deprecated include files.
+@@ -159,6 +164,14 @@ strstream.lo: strstream.cc
+ strstream.o: strstream.cc
+ $(CXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
+
++# Use special rules for libstdc++_nonshared.la files, as -prefer-pic
++# doesn't seem to work for some reason.
++sstream-inst-showmanyc.lo: sstream-inst-showmanyc.cc
++ $(LTCXXCOMPILE) -c $< \
++ && cp -f .libs/sstream-inst-showmanyc.o sstream-inst-showmanyc.o
++sstream-inst-showmanyc.o: sstream-inst-showmanyc.cc
++ $(CXXCOMPILE) -fPIC -DPIC -c $<
++
+ # Use special rules for the concept-checking instantiations so that all
+ # the generated template functions are also instantiated. Force the checks
+ # to be on so that the instantiations are actually seen.
+--- libstdc++-v3/src/Makefile.in.jj 2004-04-20 15:55:47.000000000 +0200
++++ libstdc++-v3/src/Makefile.in 2005-07-22 09:06:15.000000000 +0200
+@@ -221,7 +221,7 @@ WARN_CXXFLAGS = \
+ AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
+
+ # Cross compiler support.
+-toolexeclib_LTLIBRARIES = libstdc++.la
++toolexeclib_LTLIBRARIES = libstdc++.la libstdc++_nonshared.la
+
+ # Symbol versioning for shared libraries.
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@version_arg = -Wl,--version-script=libstdc++-symbol.ver
+@@ -308,6 +308,13 @@ libstdc___la_LDFLAGS = \
+ -version-info $(libtool_VERSION) ${version_arg} -lm
+
+
++libstdc___nonshared_la_SOURCES = \
++ sstream-inst-showmanyc.cc
++
++libstdc___nonshared_la_LIBADD =
++libstdc___nonshared_la_DEPENDENCIES = $(libstdc___nonshared_la_LIBADD)
++libstdc___nonshared_la_LDFLAGS = -static
++
+ # Use special rules for the deprecated source files so that they find
+ # deprecated include files.
+ GLIBCXX_INCLUDE_DIR = $(glibcxx_builddir)/include
+@@ -379,6 +386,8 @@ am__objects_3 = allocator.lo codecvt.lo
+ $(am__objects_1) $(am__objects_2)
+ am_libstdc___la_OBJECTS = $(am__objects_3)
+ libstdc___la_OBJECTS = $(am_libstdc___la_OBJECTS)
++am_libstdc___nonshared_la_OBJECTS = sstream-inst-showmanyc.lo
++libstdc___nonshared_la_OBJECTS = $(am_libstdc___nonshared_la_OBJECTS)
+
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+ depcomp =
+@@ -386,10 +395,10 @@ am__depfiles_maybe =
+ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+ CXXLD = $(CXX)
+-DIST_SOURCES = $(libstdc___la_SOURCES)
++DIST_SOURCES = $(libstdc___la_SOURCES) $(libstdc___nonshared_la_SOURCES)
+ DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/fragment.am \
+ Makefile.am
+-SOURCES = $(libstdc___la_SOURCES)
++SOURCES = $(libstdc___la_SOURCES) $(libstdc___nonshared_la_SOURCES)
+
+ all: all-am
+
+@@ -430,6 +439,8 @@ clean-toolexeclibLTLIBRARIES:
+ done
+ libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(toolexeclibdir) $(libstdc___la_LDFLAGS) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS)
++libstdc++_nonshared.la: $(libstdc___nonshared_la_OBJECTS) $(libstdc___nonshared_la_DEPENDENCIES)
++ $(CXXLINK) -rpath $(toolexeclibdir) $(libstdc___nonshared_la_LDFLAGS) $(libstdc___nonshared_la_OBJECTS) $(libstdc___nonshared_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+@@ -674,6 +685,14 @@ strstream.lo: strstream.cc
+ strstream.o: strstream.cc
+ $(CXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
+
++# Use special rules for libstdc++_nonshared.la files, as -prefer-pic
++# doesn't seem to work for some reason.
++sstream-inst-showmanyc.lo: sstream-inst-showmanyc.cc
++ $(LTCXXCOMPILE) -c $< \
++ && cp -f .libs/sstream-inst-showmanyc.o sstream-inst-showmanyc.o
++sstream-inst-showmanyc.o: sstream-inst-showmanyc.cc
++ $(CXXCOMPILE) -fPIC -DPIC -c $<
++
+ # Use special rules for the concept-checking instantiations so that all
+ # the generated template functions are also instantiated. Force the checks
+ # to be on so that the instantiations are actually seen.
+--- libstdc++-v3/include/std/std_sstream.h.jj 2004-10-04 14:58:25.000000000 +0200
++++ libstdc++-v3/include/std/std_sstream.h 2005-07-21 17:17:16.000000000 +0200
+@@ -185,6 +185,18 @@ namespace std
+ _M_sync(const_cast<char_type*>(_M_string.data()), 0, __len);
+ }
+
++ virtual streamsize
++ showmanyc()
++ {
++ streamsize __ret = -1;
++ if (_M_mode & ios_base::in)
++ {
++ _M_update_egptr();
++ __ret = this->egptr() - this->gptr();
++ }
++ return __ret;
++ }
++
+ // [documentation is inherited]
+ virtual int_type
+ underflow();
+--- libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc.jj 2003-10-01 12:12:11.000000000 +0200
++++ libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc 2005-07-22 01:22:15.000000000 +0200
+@@ -45,7 +45,7 @@ void test03()
+ std::streamsize d1 = strb_01.in_avail();
+ std::streamsize d2 = strb_03.in_avail();
+ VERIFY( d1 ); // non-zero
+- VERIFY( !d2 ); // zero, cuz ios_base::out
++ VERIFY( d2 == -1 ); // -1, cuz ios_base::out
+ VERIFY( d1 != d2 ); //these should be the same
+ VERIFY( static_cast<std::streamsize>(str_01.length()) == d1 );
+ VERIFY( strb_01.str() == strb_03.str() ); //ditto
+--- libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc.jj 2003-10-01 12:12:10.000000000 +0200
++++ libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc 2005-07-22 01:22:04.000000000 +0200
+@@ -49,8 +49,8 @@ void test04()
+ VERIFY( strmof_1 == static_cast<std::streamoff>(str_01.length()) );
+ VERIFY( strmof_2 == static_cast<std::streamoff>(str_02.length()) );
+ strmof_1 = strb_03.in_avail();
+- // zero cuz write-only, or eof()? zero, from showmany
+- VERIFY( strmof_1 == 0 );
++ // zero cuz write-only, or eof() to match basic_filebuf
++ VERIFY( strmof_1 == -1 );
+ }
+
+ int main()
+--- libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/21955.cc.jj 2005-07-22 01:22:04.000000000 +0200
++++ libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/21955.cc 2005-07-22 01:22:04.000000000 +0200
+@@ -0,0 +1,54 @@
++// 2005-06-07 Benjamin Kosnik
++
++// Copyright (C) 2005
++// Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++#include <sstream>
++#include <testsuite_hooks.h>
++#include <stdexcept>
++
++double
++test_stringstream()
++{
++ double result;
++ char* source = "1918";
++ std::stringstream s;
++ s << source;
++
++ std::string tmp = s.str();
++ std::streambuf* sb = s.rdbuf();
++ int i = sb->in_avail();
++
++ if (i)
++ {
++ s >> result;
++ }
++ else
++ {
++ throw std::runtime_error("conversion failed");
++ }
++ return result;
++}
++
++
++int main ()
++{
++ test_stringstream();
++ return 0;
++}
+--- libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/1.cc.jj 2005-07-22 01:21:41.000000000 +0200
++++ libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/1.cc 2005-07-22 01:21:41.000000000 +0200
+@@ -0,0 +1,54 @@
++// 2005-06-07 Benjamin Kosnik <bkoz@redhat.com>
++
++// Copyright (C) 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// 27.8.1.4 Overridden virtual functions
++
++#include <fstream>
++#include <testsuite_hooks.h>
++
++typedef std::basic_streambuf<char> streambuf_type;
++
++struct testbuf : streambuf_type
++{
++ testbuf() { }
++};
++
++void test05()
++{
++ typedef streambuf_type::int_type int_type;
++ typedef streambuf_type::traits_type traits_type;
++ typedef streambuf_type::pos_type pos_type;
++ typedef streambuf_type::off_type off_type;
++ typedef size_t size_type;
++
++ bool test __attribute__((unused)) = true;
++ std::streamoff strmof_1, strmof_2;
++ testbuf sb01;
++
++ // int in_avail()
++ strmof_1 = sb01.in_avail();
++ VERIFY( strmof_1 == 0 );
++}
++
++int main()
++{
++ test05();
++ return 0;
++}
+--- libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc.jj 2005-07-22 01:21:41.000000000 +0200
++++ libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc 2005-07-22 01:21:41.000000000 +0200
+@@ -0,0 +1,54 @@
++// 2005-06-07 Benjamin Kosnik <bkoz@redhat.com>
++
++// Copyright (C) 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// 27.8.1.4 Overridden virtual functions
++
++#include <fstream>
++#include <testsuite_hooks.h>
++
++typedef std::basic_streambuf<wchar_t> streambuf_type;
++
++struct testbuf : streambuf_type
++{
++ testbuf() { }
++};
++
++void test05()
++{
++ typedef streambuf_type::int_type int_type;
++ typedef streambuf_type::traits_type traits_type;
++ typedef streambuf_type::pos_type pos_type;
++ typedef streambuf_type::off_type off_type;
++ typedef size_t size_type;
++
++ bool test __attribute__((unused)) = true;
++ std::streamoff strmof_1, strmof_2;
++ testbuf sb01;
++
++ // int in_avail()
++ strmof_1 = sb01.in_avail();
++ VERIFY( strmof_1 == 0 );
++}
++
++int main()
++{
++ test05();
++ return 0;
++}
+--- libstdc++-v3/libsupc++/eh_globals.cc.jj 2005-11-21 14:43:32.000000000 +0100
++++ libstdc++-v3/libsupc++/eh_globals.cc 2006-04-21 15:38:55.000000000 +0200
+@@ -36,6 +36,26 @@
+
+ using namespace __cxxabiv1;
+
++#if 1
++namespace __gnu_internal
++{
++ __cxxabiv1::__cxa_eh_globals*
++ get_global() throw()
++ {
++ static __thread __cxxabiv1::__cxa_eh_globals global __attribute__((tls_model ("initial-exec")));
++ return &global;
++ }
++}
++
++extern "C" __cxa_eh_globals*
++__cxxabiv1::__cxa_get_globals_fast() throw()
++{ return __gnu_internal::get_global(); }
++
++extern "C" __cxa_eh_globals*
++__cxxabiv1::__cxa_get_globals() throw()
++{ return __gnu_internal::get_global(); }
++
++#else
+
+ // Single-threaded fallback buffer.
+ static __cxa_eh_globals globals_static;
+@@ -125,3 +145,4 @@ __cxa_get_globals () throw()
+ return &globals_static;
+ #endif
+ }
++#endif
+2005-11-23 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/24975 (basic_string)
+ * include/bits/basic_string.h (_Rep::_S_empty_rep): Avoid
+ strict-aliasing warnings.
+
+2005-11-22 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/24975
+ * include/bits/stl_set.h (insert(iterator, const value_type&),
+ erase(iterator), erase(iterator, iterator)): Don't break aliasing
+ rules casting to _Rep_iterator&, forward to _Rb_tree facilities.
+ * include/bits/stl_multiset.h (insert(iterator, const value_type&),
+ erase(iterator), erase(iterator, iterator)): Likewise.
+ * include/bits/stl_tree.h (_Rb_tree<>::_M_insert(_Const_Base_ptr,
+ _Const_Base_ptr, const value_type&), insert_unique(const_iterator,
+ const value_type&), insert_equal(const_iterator, const value_type&),
+ erase(const_iterator), erase(const_iterator, const_iterator)): New,
+ _Rb_tree<>::const_iterator counterparts of existing facilities.
+
+--- libstdc++-v3/include/bits/basic_string.h.jj 2007-02-23 21:29:15.000000000 +0100
++++ libstdc++-v3/include/bits/basic_string.h 2007-07-19 12:11:40.000000000 +0200
+@@ -175,7 +175,16 @@ namespace std
+
+ static _Rep&
+ _S_empty_rep()
+- { return *reinterpret_cast<_Rep*>(&_S_empty_rep_storage); }
++ {
++#if __GNUC__ >= 4
++ // Work around type-punning warning in g++4. _S_empty_rep_storage
++ // is never modified, so type-punning is ok.
++ void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage);
++ return *reinterpret_cast<_Rep*>(__p);
++#else
++ return *reinterpret_cast<_Rep*>(&_S_empty_rep_storage);
++#endif
++ }
+
+ bool
+ _M_is_leaked() const
+--- libstdc++-v3/include/bits/stl_tree.h.jj 2007-02-23 21:29:15.000000000 +0100
++++ libstdc++-v3/include/bits/stl_tree.h 2007-07-19 13:18:28.000000000 +0200
+@@ -532,6 +532,12 @@ namespace std
+ iterator
+ _M_insert(_Base_ptr __x, _Base_ptr __y, const value_type& __v);
+
++#if __GNUC__ >= 4
++ const_iterator
++ _M_insert(_Const_Base_ptr __x, _Const_Base_ptr __y,
++ const value_type& __v);
++#endif
++
+ _Link_type
+ _M_copy(_Const_Link_type __x, _Link_type __p);
+
+@@ -631,9 +637,19 @@ namespace std
+ iterator
+ insert_unique(iterator __position, const value_type& __x);
+
++#if __GNUC__ >= 4
++ const_iterator
++ insert_unique(const_iterator __position, const value_type& __x);
++#endif
++
+ iterator
+ insert_equal(iterator __position, const value_type& __x);
+
++#if __GNUC__ >= 4
++ const_iterator
++ insert_equal(const_iterator __position, const value_type& __x);
++#endif
++
+ template<typename _InputIterator>
+ void
+ insert_unique(_InputIterator __first, _InputIterator __last);
+@@ -645,12 +661,22 @@ namespace std
+ void
+ erase(iterator __position);
+
++#if __GNUC__ >= 4
++ void
++ erase(const_iterator __position);
++#endif
++
+ size_type
+ erase(const key_type& __x);
+
+ void
+ erase(iterator __first, iterator __last);
+
++#if __GNUC__ >= 4
++ void
++ erase(const_iterator __first, const_iterator __last);
++#endif
++
+ void
+ erase(const key_type* __first, const key_type* __last);
+
+@@ -793,6 +819,28 @@ namespace std
+ return iterator(__z);
+ }
+
++#if __GNUC__ >= 4
++ template<typename _Key, typename _Val, typename _KeyOfValue,
++ typename _Compare, typename _Alloc>
++ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator
++ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
++ _M_insert(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v)
++ {
++ _Link_type __z = _M_create_node(__v);
++ bool __insert_left;
++
++ __insert_left = __x != 0 || __p == _M_end()
++ || _M_impl._M_key_compare(_KeyOfValue()(__v),
++ _S_key(__p));
++
++ _Rb_tree_insert_and_rebalance(__insert_left, __z,
++ const_cast<_Base_ptr>(__p),
++ this->_M_impl._M_header);
++ ++_M_impl._M_node_count;
++ return const_iterator(__z);
++ }
++#endif
++
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
+@@ -928,6 +976,54 @@ namespace std
+ }
+ }
+
++#if __GNUC__ >= 4
++ template<typename _Key, typename _Val, typename _KeyOfValue,
++ typename _Compare, typename _Alloc>
++ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator
++ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
++ insert_unique(const_iterator __position, const _Val& __v)
++ {
++ if (__position._M_node == _M_leftmost())
++ {
++ // begin()
++ if (size() > 0
++ && _M_impl._M_key_compare(_KeyOfValue()(__v),
++ _S_key(__position._M_node)))
++ return _M_insert(__position._M_node, __position._M_node, __v);
++ // First argument just needs to be non-null.
++ else
++ return const_iterator(insert_unique(__v).first);
++ }
++ else if (__position._M_node == _M_end())
++ {
++ // end()
++ if (_M_impl._M_key_compare(_S_key(_M_rightmost()),
++ _KeyOfValue()(__v)))
++ return _M_insert(0, _M_rightmost(), __v);
++ else
++ return const_iterator(insert_unique(__v).first);
++ }
++ else
++ {
++ const_iterator __before = __position;
++ --__before;
++ if (_M_impl._M_key_compare(_S_key(__before._M_node),
++ _KeyOfValue()(__v))
++ && _M_impl._M_key_compare(_KeyOfValue()(__v),
++ _S_key(__position._M_node)))
++ {
++ if (_S_right(__before._M_node) == 0)
++ return _M_insert(0, __before._M_node, __v);
++ else
++ return _M_insert(__position._M_node, __position._M_node, __v);
++ // First argument just needs to be non-null.
++ }
++ else
++ return const_iterator(insert_unique(__v).first);
++ }
++ }
++#endif
++
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
+@@ -974,6 +1070,54 @@ namespace std
+ }
+ }
+
++#if __GNUC__ >= 4
++ template<typename _Key, typename _Val, typename _KeyOfValue,
++ typename _Compare, typename _Alloc>
++ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator
++ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
++ insert_equal(const_iterator __position, const _Val& __v)
++ {
++ if (__position._M_node == _M_leftmost())
++ {
++ // begin()
++ if (size() > 0
++ && !_M_impl._M_key_compare(_S_key(__position._M_node),
++ _KeyOfValue()(__v)))
++ return _M_insert(__position._M_node, __position._M_node, __v);
++ // first argument just needs to be non-null
++ else
++ return const_iterator(insert_equal(__v));
++ }
++ else if (__position._M_node == _M_end())
++ {
++ // end()
++ if (!_M_impl._M_key_compare(_KeyOfValue()(__v),
++ _S_key(_M_rightmost())))
++ return _M_insert(0, _M_rightmost(), __v);
++ else
++ return const_iterator(insert_equal(__v));
++ }
++ else
++ {
++ const_iterator __before = __position;
++ --__before;
++ if (!_M_impl._M_key_compare(_KeyOfValue()(__v),
++ _S_key(__before._M_node))
++ && !_M_impl._M_key_compare(_S_key(__position._M_node),
++ _KeyOfValue()(__v)))
++ {
++ if (_S_right(__before._M_node) == 0)
++ return _M_insert(0, __before._M_node, __v);
++ else
++ return _M_insert(__position._M_node, __position._M_node, __v);
++ // First argument just needs to be non-null.
++ }
++ else
++ return const_iterator(insert_equal(__v));
++ }
++ }
++#endif
++
+ template<typename _Key, typename _Val, typename _KoV,
+ typename _Cmp, typename _Alloc>
+ template<class _II>
+@@ -1008,6 +1152,20 @@ namespace std
+ --_M_impl._M_node_count;
+ }
+
++#if __GNUC__ >= 4
++ template<typename _Key, typename _Val, typename _KeyOfValue,
++ typename _Compare, typename _Alloc>
++ inline void
++ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::erase(const_iterator __position)
++ {
++ _Link_type __y =
++ static_cast<_Link_type>(_Rb_tree_rebalance_for_erase(const_cast<_Base_ptr>(__position._M_node),
++ this->_M_impl._M_header));
++ destroy_node(__y);
++ --_M_impl._M_node_count;
++ }
++#endif
++
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::size_type
+@@ -1082,6 +1240,20 @@ namespace std
+ while (__first != __last) erase(__first++);
+ }
+
++#if __GNUC__ >= 4
++ template<typename _Key, typename _Val, typename _KeyOfValue,
++ typename _Compare, typename _Alloc>
++ void
++ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
++ erase(const_iterator __first, const_iterator __last)
++ {
++ if (__first == begin() && __last == end())
++ clear();
++ else
++ while (__first != __last) erase(__first++);
++ }
++#endif
++
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ void
+--- libstdc++-v3/include/bits/stl_multiset.h.jj 2007-02-23 21:29:15.000000000 +0100
++++ libstdc++-v3/include/bits/stl_multiset.h 2007-07-19 12:30:47.000000000 +0200
+@@ -328,8 +328,12 @@ namespace _GLIBCXX_STD
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
++#if __GNUC__ >= 4
++ return _M_t.insert_equal(__position, __x);
++#else
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ return _M_t.insert_equal((_Rep_iterator&)__position, __x);
++#endif
+ }
+
+ /**
+@@ -358,8 +362,12 @@ namespace _GLIBCXX_STD
+ void
+ erase(iterator __position)
+ {
++#if __GNUC__ >= 4
++ _M_t.erase(__position);
++#else
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ _M_t.erase((_Rep_iterator&)__position);
++#endif
+ }
+
+ /**
+@@ -391,8 +399,12 @@ namespace _GLIBCXX_STD
+ void
+ erase(iterator __first, iterator __last)
+ {
++#if __GNUC__ >= 4
++ _M_t.erase(__first, __last);
++#else
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last);
++#endif
+ }
+
+ /**
+--- libstdc++-v3/include/bits/stl_set.h.jj 2007-02-23 21:29:15.000000000 +0100
++++ libstdc++-v3/include/bits/stl_set.h 2007-07-19 12:23:57.000000000 +0200
+@@ -337,8 +337,12 @@ namespace _GLIBCXX_STD
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
++#if __GNUC__ >= 4
++ return _M_t.insert_unique(__position, __x);
++#else
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ return _M_t.insert_unique((_Rep_iterator&)__position, __x);
++#endif
+ }
+
+ /**
+@@ -366,8 +370,12 @@ namespace _GLIBCXX_STD
+ void
+ erase(iterator __position)
+ {
++#if __GNUC__ >= 4
++ _M_t.erase(__position);
++#else
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ _M_t.erase((_Rep_iterator&)__position);
++#endif
+ }
+
+ /**
+@@ -398,8 +406,12 @@ namespace _GLIBCXX_STD
+ void
+ erase(iterator __first, iterator __last)
+ {
++#if __GNUC__ >= 4
++ _M_t.erase(__first, __last);
++#else
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last);
++#endif
+ }
+
+ /**
+2006-02-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR other/26208
+ * unwind-dw2.c (struct _Unwind_Context): Add signal_frame field.
+ (_Unwind_FrameState): Add signal_frame field.
+ (extract_cie_info): Handle S flag in augmentation string.
+ (execute_cfa_program): If context->signal_frame, execute also
+ fs->pc == context->ra instructions.
+ (uw_frame_state_for): If context->signal_frame, don't subtract one
+ from context->ra to find FDE.
+ (uw_update_context_1): Set context->signal_frame to
+ fs->signal_frame.
+ (_Unwind_GetIPInfo): New function.
+ * unwind-c.c (PERSONALITY_FUNCTION): Use _Unwind_GetIPInfo instead
+ of _Unwind_GetIP.
+ * unwind-sjlj.c (_Unwind_GetIPInfo): New function.
+ * unwind.h (_Unwind_GetIPInfo): New prototype.
+ * unwind-compat.c (_Unwind_GetIPInfo): New function.
+ * libgcc-std.ver (_Unwind_GetIPInfo): Export @@GCC_4.2.0.
+ * config/ia64/unwind-ia64.c (_Unwind_GetIPInfo): New function.
+ * config/i386/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Set
+ (FS)->signal_frame.
+ * config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Likewise.
+ * config/rs6000/linux-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Likewise.
+ * config/s390/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Likewise.
+
+ * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Use
+ _Unwind_GetIPInfo instead of _Unwind_GetIP.
+
+ * exception.cc (PERSONALITY_FUNCTION): Use _Unwind_GetIPInfo instead
+ of _Unwind_GetIP.
+ * include/i386-signal.h (MAKE_THROW_FRAME): Change into empty macro.
+ (HANDLE_DIVIDE_OVERFLOW): Don't adjust _res->eip if falling through
+ to throw.
+ * include/x86_64-signal.h (MAKE_THROW_FRAME): Change into empty
+ macro.
+ * include/powerpc-signal.h (MAKE_THROW_FRAME): Change into empty
+ macro.
+
+--- libjava/exception.cc.jj 2005-11-21 14:47:25.000000000 +0100
++++ libjava/exception.cc 2006-04-21 14:00:19.000000000 +0200
+@@ -199,6 +199,7 @@ PERSONALITY_FUNCTION (int version,
+ int handler_switch_value;
+ bool saw_cleanup;
+ bool saw_handler;
++ int ip_before_insn = 0;
+
+
+ // Interface version check.
+@@ -214,10 +215,10 @@ PERSONALITY_FUNCTION (int version,
+ goto install_context;
+ }
+
+- // FIXME: In Phase 1, record _Unwind_GetIP in xh->obj as a part of
++ // FIXME: In Phase 1, record _Unwind_GetIPInfo in xh->obj as a part of
+ // the stack trace for this exception. This will only collect Java
+ // frames, but perhaps that is acceptable.
+- // FIXME2: _Unwind_GetIP is nonsensical for SJLJ, being a call-site
++ // FIXME2: _Unwind_GetIPInfo is nonsensical for SJLJ, being a call-site
+ // index instead of a PC value. We could perhaps arrange for
+ // _Unwind_GetRegionStart to return context->fc->jbuf[1], which
+ // is the address of the handler label for __builtin_longjmp, but
+@@ -232,7 +233,9 @@ PERSONALITY_FUNCTION (int version,
+
+ // Parse the LSDA header.
+ p = parse_lsda_header (context, language_specific_data, &info);
+- ip = _Unwind_GetIP (context) - 1;
++ ip = _Unwind_GetIPInfo (context, &ip_before_insn);
++ if (! ip_before_insn)
++ --ip;
+ landing_pad = 0;
+ action_record = 0;
+ handler_switch_value = 0;
+--- libjava/include/i386-signal.h.jj 2005-11-21 14:47:15.000000000 +0100
++++ libjava/include/i386-signal.h 2006-04-21 14:57:55.000000000 +0200
+@@ -22,19 +22,7 @@ details. */
+ #define SIGNAL_HANDLER(_name) \
+ static void _name (int _dummy)
+
+-#define MAKE_THROW_FRAME(_exception) \
+-do \
+-{ \
+- void **_p = (void **)&_dummy; \
+- struct sigcontext_struct *_regs = (struct sigcontext_struct *)++_p; \
+- \
+- /* Advance the program counter so that it is after the start of the \
+- instruction: the x86 exception handler expects \
+- the PC to point to the instruction after a call. */ \
+- _regs->eip += 2; \
+- \
+-} \
+-while (0)
++#define MAKE_THROW_FRAME(_exception)
+
+ #define HANDLE_DIVIDE_OVERFLOW \
+ do \
+@@ -84,14 +72,6 @@ do \
+ _regs->eip = (unsigned long)_eip; \
+ return; \
+ } \
+- else \
+- { \
+- /* Advance the program counter so that it is after the start \
+- of the instruction: this is because the x86 exception \
+- handler expects the PC to point to the instruction after a \
+- call. */ \
+- _regs->eip += 2; \
+- } \
+ } \
+ } \
+ while (0)
+--- libjava/include/x86_64-signal.h.jj 2006-04-20 17:02:27.000000000 +0200
++++ libjava/include/x86_64-signal.h 2006-04-21 14:00:19.000000000 +0200
+@@ -34,17 +34,7 @@ extern "C"
+ };
+ }
+
+-#define MAKE_THROW_FRAME(_exception) \
+-do \
+-{ \
+- /* Advance the program counter so that it is after the start of the \
+- instruction: the x86_64 exception handler expects \
+- the PC to point to the instruction after a call. */ \
+- struct ucontext *_uc = (struct ucontext *)_p; \
+- volatile struct sigcontext *_sc = (struct sigcontext *) &_uc->uc_mcontext; \
+- _sc->rip += 2; \
+-} \
+-while (0)
++#define MAKE_THROW_FRAME(_exception)
+
+ #define RESTORE(name, syscall) RESTORE2 (name, syscall)
+ #define RESTORE2(name, syscall) \
+--- libjava/include/powerpc-signal.h.jj 2005-11-21 14:47:15.000000000 +0100
++++ libjava/include/powerpc-signal.h 2006-04-21 14:00:19.000000000 +0200
+@@ -22,18 +22,12 @@ details. */
+ #define SIGNAL_HANDLER(_name) \
+ static void _name (int /* _signal */, struct sigcontext *_sc)
+
+-/* PPC either leaves PC pointing at a faulting instruction or the
+- following instruction, depending on the signal. SEGV always does
+- the former, so we adjust the saved PC to point to the following
+- instruction. This is what the handler in libgcc expects. */
++/* MD_FALBACK_FRAME_STATE_FOR takes care of special casing PC
++ before the faulting instruction, so we don't need to do anything
++ here. */
++
++#define MAKE_THROW_FRAME(_exception)
+
+-#define MAKE_THROW_FRAME(_exception) \
+-do \
+- { \
+- _sc->regs->nip += 4; \
+- } \
+-while (0)
+-
+ /* For an explanation why we cannot simply use sigaction to
+ install the handlers, see i386-signal.h. */
+
+--- libstdc++-v3/libsupc++/eh_personality.cc.jj 2005-11-21 14:43:32.000000000 +0100
++++ libstdc++-v3/libsupc++/eh_personality.cc 2006-04-21 14:24:34.000000000 +0200
+@@ -201,6 +201,7 @@ PERSONALITY_FUNCTION (int version,
+ _Unwind_Ptr landing_pad, ip;
+ int handler_switch_value;
+ void *thrown_ptr = xh + 1;
++ int ip_before_insn = 0;
+
+ // Interface version check.
+ if (version != 1)
+@@ -227,7 +228,9 @@ PERSONALITY_FUNCTION (int version,
+ // Parse the LSDA header.
+ p = parse_lsda_header (context, language_specific_data, &info);
+ info.ttype_base = base_of_encoded_value (info.ttype_encoding, context);
+- ip = _Unwind_GetIP (context) - 1;
++ ip = _Unwind_GetIPInfo (context, &ip_before_insn);
++ if (! ip_before_insn)
++ --ip;
+ landing_pad = 0;
+ action_record = 0;
+ handler_switch_value = 0;
+--- gcc/libgcc-std.ver.jj 2005-11-21 14:43:21.000000000 +0100
++++ gcc/libgcc-std.ver 2006-04-21 14:02:13.000000000 +0200
+@@ -234,3 +234,8 @@ GCC_3.4.4 {
+ __negvti2
+ __subvti3
+ }
++
++%inherit GCC_4.2.0 GCC_3.4.4
++GCC_4.2.0 {
++ _Unwind_GetIPInfo
++}
+--- gcc/unwind-c.c.jj 2005-11-21 14:43:20.000000000 +0100
++++ gcc/unwind-c.c 2006-04-21 14:00:08.000000000 +0200
+@@ -102,6 +102,7 @@ PERSONALITY_FUNCTION (int version,
+ lsda_header_info info;
+ const unsigned char *language_specific_data, *p, *action_record;
+ _Unwind_Ptr landing_pad, ip;
++ int ip_before_insn = 0;
+
+ if (version != 1)
+ return _URC_FATAL_PHASE1_ERROR;
+@@ -119,7 +120,9 @@ PERSONALITY_FUNCTION (int version,
+
+ /* Parse the LSDA header. */
+ p = parse_lsda_header (context, language_specific_data, &info);
+- ip = _Unwind_GetIP (context) - 1;
++ ip = _Unwind_GetIPInfo (context, &ip_before_insn);
++ if (! ip_before_insn)
++ --ip;
+ landing_pad = 0;
+
+ #ifdef __USING_SJLJ_EXCEPTIONS__
+--- gcc/config/s390/linux.h.jj 2005-11-21 14:40:55.000000000 +0100
++++ gcc/config/s390/linux.h 2006-04-21 14:15:46.000000000 +0200
+@@ -113,6 +113,7 @@ Software Foundation, 59 Temple Place - S
+ } __attribute__ ((__aligned__ (8))) sigregs_; \
+ \
+ sigregs_ *regs_; \
++ int *signo_ = NULL; \
+ \
+ /* svc $__NR_sigreturn or svc $__NR_rt_sigreturn */ \
+ if (pc_[0] != 0x0a || (pc_[1] != 119 && pc_[1] != 173)) \
+@@ -133,6 +134,7 @@ Software Foundation, 59 Temple Place - S
+ } *uc_ = (CONTEXT)->cfa + 8 + 128; \
+ \
+ regs_ = &uc_->uc_mcontext; \
++ signo_ = (CONTEXT)->cfa + sizeof(long); \
+ } \
+ \
+ /* Old-style RT frame and all non-RT frames: \
+@@ -141,6 +143,11 @@ Software Foundation, 59 Temple Place - S
+ else \
+ { \
+ regs_ = *(sigregs_ **)((CONTEXT)->cfa + 8); \
++ /* Recent kernels store the signal number immediately after \
++ the sigregs; old kernels have the return trampoline at \
++ this location. */ \
++ if ((void *)(regs_ + 1) != (CONTEXT)->ra) \
++ signo_ = (int *)(regs_ + 1); \
+ } \
+ \
+ new_cfa_ = regs_->gprs[15] + 16*sizeof(long) + 32; \
+@@ -167,6 +174,12 @@ Software Foundation, 59 Temple Place - S
+ (FS)->regs.reg[32].loc.offset = (long)®s_->psw_addr - new_cfa_; \
+ (FS)->retaddr_column = 32; \
+ \
++ /* SIGILL, SIGFPE and SIGTRAP are delivered with psw_addr \
++ after the faulting instruction rather than before it. \
++ Don't set FS->signal_frame in that case. */ \
++ if (!signo_ || (*signo_ != 4 && *signo_ != 5 && *signo_ != 8)) \
++ (FS)->signal_frame = 1; \
++ \
+ goto SUCCESS; \
+ } while (0)
+
+--- gcc/config/i386/linux.h.jj 2005-11-21 14:41:07.000000000 +0100
++++ gcc/config/i386/linux.h 2006-04-21 14:18:05.000000000 +0200
+@@ -268,6 +268,7 @@ Boston, MA 02111-1307, USA. */
+ (FS)->regs.reg[8].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[8].loc.offset = (long)&sc_->eip - new_cfa_; \
+ (FS)->retaddr_column = 8; \
++ (FS)->signal_frame = 1; \
+ goto SUCCESS; \
+ } while (0)
+ #endif /* not USE_GNULIBC_1 */
+--- gcc/config/i386/linux64.h.jj 2005-11-21 14:41:07.000000000 +0100
++++ gcc/config/i386/linux64.h 2006-04-21 14:18:45.000000000 +0200
+@@ -136,6 +136,7 @@ Boston, MA 02111-1307, USA. */
+ (FS)->regs.reg[16].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[16].loc.offset = (long)&sc_->rip - new_cfa_; \
+ (FS)->retaddr_column = 16; \
++ (FS)->signal_frame = 1; \
+ goto SUCCESS; \
+ } while (0)
+ #else /* ifdef __x86_64__ */
+@@ -190,6 +191,7 @@ Boston, MA 02111-1307, USA. */
+ (FS)->regs.reg[8].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[8].loc.offset = (long)&sc_->eip - new_cfa_; \
+ (FS)->retaddr_column = 8; \
++ (FS)->signal_frame = 1; \
+ goto SUCCESS; \
+ } while (0)
+ #endif /* ifdef __x86_64__ */
+--- gcc/config/ia64/unwind-ia64.c.jj 2005-11-21 14:40:57.000000000 +0100
++++ gcc/config/ia64/unwind-ia64.c 2006-04-21 14:00:11.000000000 +0200
+@@ -1748,6 +1748,13 @@ _Unwind_GetIP (struct _Unwind_Context *c
+ return context->rp;
+ }
+
++inline _Unwind_Ptr
++_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
++{
++ *ip_before_insn = 0;
++ return context->rp;
++}
++
+ /* Overwrite the return address for CONTEXT with VAL. */
+
+ inline void
+--- gcc/unwind-compat.c.jj 2005-11-21 14:43:20.000000000 +0100
++++ gcc/unwind-compat.c 2006-04-21 13:59:59.000000000 +0200
+@@ -134,6 +134,13 @@ _Unwind_GetIP (struct _Unwind_Context *c
+ }
+ symver (_Unwind_GetIP, GCC_3.0);
+
++_Unwind_Ptr
++_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
++{
++ *ip_before_insn = 0;
++ return __libunwind_Unwind_GetIP (context);
++}
++
+ extern void *__libunwind_Unwind_GetLanguageSpecificData
+ (struct _Unwind_Context *);
+
+--- gcc/unwind-sjlj.c.jj 2005-11-21 14:43:21.000000000 +0100
++++ gcc/unwind-sjlj.c 2006-04-21 14:00:08.000000000 +0200
+@@ -202,6 +202,13 @@ _Unwind_GetIP (struct _Unwind_Context *c
+ return context->fc->call_site + 1;
+ }
+
++_Unwind_Ptr
++_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
++{
++ *ip_before_insn = 0;
++ return context->fc->call_site + 1;
++}
++
+ /* Set the return landing pad index in CONTEXT. */
+
+ void
+--- gcc/unwind.h.jj 2005-11-21 14:43:20.000000000 +0100
++++ gcc/unwind.h 2006-04-21 14:08:51.000000000 +0200
+@@ -151,6 +151,7 @@ extern _Unwind_Word _Unwind_GetGR (struc
+ extern void _Unwind_SetGR (struct _Unwind_Context *, int, _Unwind_Word);
+
+ extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *);
++extern _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *);
+ extern void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr);
+
+ /* @@@ Retrieve the CFA of the given context. */
+--- gcc/unwind-dw2.c.jj 2005-11-21 14:43:21.000000000 +0100
++++ gcc/unwind-dw2.c 2006-04-21 14:05:32.000000000 +0200
+@@ -82,6 +82,7 @@ struct _Unwind_Context
+ void *lsda;
+ struct dwarf_eh_bases bases;
+ _Unwind_Word args_size;
++ char signal_frame;
+ };
+
+ /* Byte size of every register managed by these routines. */
+@@ -137,6 +138,7 @@ typedef struct
+ unsigned char fde_encoding;
+ unsigned char lsda_encoding;
+ unsigned char saw_z;
++ unsigned char signal_frame;
+ void *eh_ptr;
+ } _Unwind_FrameState;
+ \f
+@@ -271,6 +273,16 @@ _Unwind_GetIP (struct _Unwind_Context *c
+ return (_Unwind_Ptr) context->ra;
+ }
+
++/* Retrieve the return address and flag whether that IP is before
++ or after first not yet fully executed instruction. */
++
++inline _Unwind_Ptr
++_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
++{
++ *ip_before_insn = context->signal_frame != 0;
++ return (_Unwind_Ptr) context->ra;
++}
++
+ /* Overwrite the return address for CONTEXT with VAL. */
+
+ inline void
+@@ -382,6 +394,13 @@ extract_cie_info (const struct dwarf_cie
+ aug += 1;
+ }
+
++ /* "S" indicates a signal frame. */
++ else if (aug[0] == 'S')
++ {
++ fs->signal_frame = 1;
++ aug += 1;
++ }
++
+ /* Otherwise we have an unknown augmentation string.
+ Bail unless we saw a 'z' prefix. */
+ else
+@@ -818,8 +837,10 @@ execute_cfa_program (const unsigned char
+ a different stack configuration that we are not interested in. We
+ assume that the call itself is unwind info-neutral; if not, or if
+ there are delay instructions that adjust the stack, these must be
+- reflected at the point immediately before the call insn. */
+- while (insn_ptr < insn_end && fs->pc < context->ra)
++ reflected at the point immediately before the call insn.
++ In signal frames, return address is after last completed instruction,
++ so we add 1 to return address to make the comparison <=. */
++ while (insn_ptr < insn_end && fs->pc < context->ra + context->signal_frame)
+ {
+ unsigned char insn = *insn_ptr++;
+ _Unwind_Word reg, utmp;
+@@ -1021,7 +1042,8 @@ uw_frame_state_for (struct _Unwind_Conte
+ if (context->ra == 0)
+ return _URC_END_OF_STACK;
+
+- fde = _Unwind_Find_FDE (context->ra - 1, &context->bases);
++ fde = _Unwind_Find_FDE (context->ra + context->signal_frame - 1,
++ &context->bases);
+ if (fde == NULL)
+ {
+ /* Couldn't find frame unwind info for this function. Try a
+@@ -1376,6 +1398,8 @@ uw_update_context_1 (struct _Unwind_Cont
+ break;
+ }
+
++ context->signal_frame = fs->signal_frame;
++
+ MD_FROB_UPDATE_CONTEXT (context, fs);
+ }
+
+--- gcc/unwind-dw2.c.jj 2006-05-22 13:39:48.000000000 -0400
++++ gcc/unwind-dw2.c 2006-05-22 13:48:20.000000000 -0400
+@@ -40,6 +40,7 @@
+ #include "unwind-pe.h"
+ #include "unwind-dw2-fde.h"
+ #include "gthr.h"
++#include <endian.h>
+
+
+ #ifndef __USING_SJLJ_EXCEPTIONS__
+@@ -81,8 +82,15 @@ struct _Unwind_Context
+ void *ra;
+ void *lsda;
+ struct dwarf_eh_bases bases;
+- _Unwind_Word args_size;
+- char signal_frame;
++#if __BYTE_ORDER == __BIG_ENDIAN
++ _Unwind_Word signal_frame : 1;
++ _Unwind_Word args_size : sizeof (_Unwind_Word) * 8 - 1;
++#elif __BYTE_ORDER == __LITTLE_ENDIAN
++ _Unwind_Word args_size : sizeof (_Unwind_Word) * 8 - 1;
++ _Unwind_Word signal_frame : 1;
++#else
++#error Unknown endianity
++#endif
+ };
+
+ /* Byte size of every register managed by these routines. */
+@@ -1003,7 +1011,13 @@ execute_cfa_program (const unsigned char
+ break;
+
+ case DW_CFA_GNU_args_size:
+- insn_ptr = read_uleb128 (insn_ptr, &context->args_size);
++ {
++ _Unwind_Word args_size;
++ insn_ptr = read_uleb128 (insn_ptr, &args_size);
++ context->args_size = args_size;
++ if (context->args_size != args_size)
++ abort ();
++ }
+ break;
+
+ case DW_CFA_GNU_negative_offset_extended:
+--- libjava/exception.cc.jj 2006-05-22 13:39:48.000000000 -0400
++++ libjava/exception.cc 2006-05-22 14:48:30.000000000 -0400
+@@ -31,6 +31,153 @@ namespace std
+ }
+ #include "unwind.h"
+
++#if defined PIC && !defined __ia64__
++
++#include <dlfcn.h>
++
++extern "C" {
++
++static void *libgcc_s_handle;
++
++_Unwind_Reason_Code __attribute__((visibility ("hidden")))
++_Unwind_RaiseException (struct _Unwind_Exception *exc)
++{
++ static _Unwind_Reason_Code (*RaiseException) (struct _Unwind_Exception *);
++
++ if (RaiseException == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ RaiseException = (__typeof (RaiseException))
++ dlsym (libgcc_s_handle, "_Unwind_RaiseException");
++ }
++ return RaiseException (exc);
++}
++
++void __attribute__((visibility ("hidden")))
++_Unwind_Resume (struct _Unwind_Exception *exc)
++{
++ static void (*Resume) (struct _Unwind_Exception *);
++
++ if (Resume == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ Resume = (__typeof (Resume))
++ dlsym (libgcc_s_handle, "_Unwind_Resume");
++ }
++ Resume (exc);
++}
++
++__attribute__((visibility ("hidden"))) void *
++_Unwind_GetLanguageSpecificData (struct _Unwind_Context *ctx)
++{
++ static void * (*GetLanguageSpecificData) (struct _Unwind_Context *);
++
++ if (GetLanguageSpecificData == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ GetLanguageSpecificData = (__typeof (GetLanguageSpecificData))
++ dlsym (libgcc_s_handle, "_Unwind_GetLanguageSpecificData");
++ }
++ return GetLanguageSpecificData (ctx);
++}
++
++_Unwind_Ptr __attribute__((visibility ("hidden")))
++_Unwind_GetRegionStart (struct _Unwind_Context *ctx)
++{
++ static _Unwind_Ptr (*GetRegionStart) (struct _Unwind_Context *);
++
++ if (GetRegionStart == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ GetRegionStart = (__typeof (GetRegionStart))
++ dlsym (libgcc_s_handle, "_Unwind_GetRegionStart");
++ }
++ return GetRegionStart (ctx);
++}
++
++_Unwind_Ptr __attribute__((visibility ("hidden")))
++_Unwind_GetDataRelBase (struct _Unwind_Context *ctx)
++{
++ static _Unwind_Ptr (*GetDataRelBase) (struct _Unwind_Context *);
++
++ if (GetDataRelBase == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ GetDataRelBase = (__typeof (GetDataRelBase))
++ dlsym (libgcc_s_handle, "_Unwind_GetDataRelBase");
++ }
++ return GetDataRelBase (ctx);
++}
++
++_Unwind_Ptr __attribute__((visibility ("hidden")))
++_Unwind_GetTextRelBase (struct _Unwind_Context *ctx)
++{
++ static _Unwind_Ptr (*GetTextRelBase) (struct _Unwind_Context *);
++
++ if (GetTextRelBase == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ GetTextRelBase = (__typeof (GetTextRelBase))
++ dlsym (libgcc_s_handle, "_Unwind_GetTextRelBase");
++ }
++ return GetTextRelBase (ctx);
++}
++
++_Unwind_Ptr __attribute__((visibility ("hidden")))
++_Unwind_GetIPInfo (struct _Unwind_Context *ctx, int *ip)
++{
++ static _Unwind_Ptr (*GetIPInfo) (struct _Unwind_Context *, int *ip);
++
++ if (GetIPInfo == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ GetIPInfo = (__typeof (GetIPInfo))
++ dlsym (libgcc_s_handle, "_Unwind_GetIPInfo");
++ }
++ return GetIPInfo (ctx, ip);
++}
++
++void __attribute__((visibility ("hidden")))
++_Unwind_SetIP (struct _Unwind_Context *ctx, _Unwind_Ptr ip)
++{
++ static void (*SetIP) (struct _Unwind_Context *, _Unwind_Ptr ip);
++
++ if (SetIP == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ SetIP = (__typeof (SetIP))
++ dlsym (libgcc_s_handle, "_Unwind_SetIP");
++ }
++ SetIP (ctx, ip);
++}
++
++void __attribute__((visibility ("hidden")))
++_Unwind_SetGR (struct _Unwind_Context *ctx, int num, _Unwind_Ptr gr)
++{
++ static void (*SetGR) (struct _Unwind_Context *, int num, _Unwind_Ptr gr);
++
++ if (SetGR == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ SetGR = (__typeof (SetGR))
++ dlsym (libgcc_s_handle, "_Unwind_SetGR");
++ }
++ SetGR (ctx, num, gr);
++}
++
++}
++
++#endif
++
+ struct alignment_test_struct
+ {
+ char space;
+2005-05-08 Roger Sayle <roger@eyesopen.com>
+
+ PR inline-asm/8788
+ * stmt.c (expand_asm_operands): Avoid calling force_reg on BLKmode
+ operands.
+
+ * gcc.dg/pr8788-1.c: New testcase.
+
+--- gcc/stmt.c (revision 99421)
++++ gcc/stmt.c (revision 99422)
+@@ -877,7 +877,7 @@ expand_asm_operands (tree string, tree o
+
+ if (asm_operand_ok (op, constraint) <= 0)
+ {
+- if (allows_reg)
++ if (allows_reg && TYPE_MODE (type) != BLKmode)
+ op = force_reg (TYPE_MODE (type), op);
+ else if (!allows_mem)
+ warning (0, "asm operand %d probably doesn%'t match constraints",
+--- gcc/testsuite/gcc.dg/pr8788-1.c (revision 0)
++++ gcc/testsuite/gcc.dg/pr8788-1.c (revision 99422)
+@@ -0,0 +1,20 @@
++/* PR inline-asm/8788 */
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++
++typedef struct {
++ long x[6];
++} myjmp_buf;
++
++typedef struct {
++ myjmp_buf regs;
++} my_stack;
++
++void switch_to_stack (my_stack *stack){
++ asm ( /* { dg-error "impossible constraint" } */
++/* { dg-warning "asm operand 1" "asm operand 1" { target *-*-* } 14 } */
++ "\n"
++ : "+r" (stack->regs)
++ );
++}
++
+2005-11-30 Alexandre Oliva <aoliva@redhat.com>
+
+ * gcc.c (find_a_file): Use update_path before access tests.
+ Mostly from Thomas Walker <thomas.walker@morganstanley.com>
+ * prefix.c (update_path): Move dir/../-stripping code to...
+ (maybe_strip_dotdots): New function. Reorganize.
+
+--- gcc/gcc.c.orig 2005-12-01 18:38:38.000000000 -0200
++++ gcc/gcc.c 2005-12-01 18:41:01.000000000 -0200
+@@ -2371,7 +2371,7 @@
+ find_a_file (struct path_prefix *pprefix, const char *name, int mode,
+ int multilib)
+ {
+- char *temp;
++ char *temp, *temp2;
+ const char *const file_suffix =
+ ((mode & X_OK) != 0 ? HOST_EXECUTABLE_SUFFIX : "");
+ struct prefix_list *pl;
+@@ -2407,19 +2407,18 @@
+ NULL));
+ }
+
+- temp = xmalloc (len);
+-
+ /* Determine the filename to execute (special case for absolute paths). */
+
+ if (IS_ABSOLUTE_PATH (name))
+ {
+- if (access (name, mode) == 0)
+- {
+- strcpy (temp, name);
+- return temp;
+- }
++ /* IS_ABSOLUTE_PATHNAME lets anything through that starts with '/' */
++ temp = update_path (name, NULL);
++ if (access (temp, mode) == 0)
++ return temp;
+ }
+ else
++ {
++ temp = xmalloc (len);
+ for (pl = pprefix->plist; pl; pl = pl->next)
+ {
+ const char *this_name
+@@ -2435,24 +2434,30 @@
+ strcat (temp, machine_suffix);
+ strcat (temp, multilib_name);
+ strcat (temp, file_suffix);
+- if (access_check (temp, mode) == 0)
++ temp2 = update_path (temp, NULL);
++ if (access_check (temp2, mode) == 0)
+ {
+ if (pl->used_flag_ptr != 0)
+ *pl->used_flag_ptr = 1;
+- return temp;
++ free (temp);
++ return temp2;
+ }
++ free (temp2);
+ }
+
+ /* Now try just the multilib_name. */
+ strcpy (temp, pl->prefix);
+ strcat (temp, machine_suffix);
+ strcat (temp, multilib_name);
+- if (access_check (temp, mode) == 0)
++ temp2 = update_path (temp, NULL);
++ if (access_check (temp2, mode) == 0)
+ {
+ if (pl->used_flag_ptr != 0)
+ *pl->used_flag_ptr = 1;
+- return temp;
++ free (temp);
++ return temp2;
+ }
++ free (temp2);
+ }
+
+ /* Certain prefixes are tried with just the machine type,
+@@ -2467,23 +2472,29 @@
+ strcat (temp, just_machine_suffix);
+ strcat (temp, multilib_name);
+ strcat (temp, file_suffix);
+- if (access_check (temp, mode) == 0)
++ temp2 = update_path (temp, NULL);
++ if (access_check (temp2, mode) == 0)
+ {
+ if (pl->used_flag_ptr != 0)
+ *pl->used_flag_ptr = 1;
+- return temp;
++ free (temp);
++ return temp2;
+ }
++ free (temp2);
+ }
+
+ strcpy (temp, pl->prefix);
+ strcat (temp, just_machine_suffix);
+ strcat (temp, multilib_name);
+- if (access_check (temp, mode) == 0)
++ temp2 = update_path (temp, NULL);
++ if (access_check (temp2, mode) == 0)
+ {
+ if (pl->used_flag_ptr != 0)
+ *pl->used_flag_ptr = 1;
+- return temp;
++ free (temp);
++ return temp2;
+ }
++ free (temp2);
+ }
+
+ /* Certain prefixes can't be used without the machine suffix
+@@ -2497,24 +2508,31 @@
+ strcpy (temp, pl->prefix);
+ strcat (temp, this_name);
+ strcat (temp, file_suffix);
+- if (access_check (temp, mode) == 0)
++ temp2 = update_path (temp, NULL);
++ if (access_check (temp2, mode) == 0)
+ {
+ if (pl->used_flag_ptr != 0)
+ *pl->used_flag_ptr = 1;
+- return temp;
++ free (temp);
++ return temp2;
+ }
++ free (temp2);
+ }
+
+ strcpy (temp, pl->prefix);
+ strcat (temp, this_name);
+- if (access_check (temp, mode) == 0)
++ temp2 = update_path (temp, NULL);
++ if (access_check (temp2, mode) == 0)
+ {
+ if (pl->used_flag_ptr != 0)
+ *pl->used_flag_ptr = 1;
+- return temp;
++ free (temp);
++ return temp2;
+ }
++ free (temp2);
+ }
+ }
++ }
+
+ free (temp);
+ return 0;
+--- gcc/prefix.c.orig 2005-12-01 18:38:38.000000000 -0200
++++ gcc/prefix.c 2005-12-01 18:46:37.000000000 -0200
+@@ -238,6 +238,105 @@
+ while (*string++);
+ }
+
++/* Strip dir/.. from a pathname when it makes sense, e.g., when this
++ would turn an inaccessible pathname into an accessible one.
++
++ We short-circuit dir/.. when dir does not exist, and when
++ some/dir/../thing does not exist but some/thing does. In case
++ there are multiple possible dir/../ stripping possibilities that
++ would turn an inaccessible pathname into an accessible one, the one
++ closer to the end of the pathname is preferred.
++
++ RESULT is the pathname that might contain such dotdot sequences to
++ be stripped. P points into RESULT, and indicates the location
++ where we should start looking for ../ sequences.
++
++ Even though RESULT is const, P is not, and that's because
++ characters in it may be temporarily overwritten, so RESULT must not
++ be in read-only storage.
++
++ The returned value is either a newly-allocated memory area, holding
++ a string that is the result of dotdot-stripping from the original
++ input strip, or RESULT itself, in which case any modifications made
++ to the string will have been undone. */
++
++static const char *
++maybe_strip_dotdots (const char *result, char *p)
++{
++ char *temp;
++ const char *path, *before, *after;
++ size_t len;
++
++ while (1)
++ {
++ p = strchr (p, '.');
++ if (p == NULL)
++ return result;
++ /* Look for `/../' */
++ if (p[1] == '.'
++ && IS_DIR_SEPARATOR (p[2])
++ && (p != result && IS_DIR_SEPARATOR (p[-1])))
++ break;
++ else
++ ++p;
++ }
++
++ *p = 0;
++ if (access (result, X_OK) == 0)
++ {
++ *p = '.';
++
++ path = maybe_strip_dotdots (result, p + 3);
++ if (access (path, F_OK) == 0)
++ return path;
++ if (path != result)
++ free ((char *) path);
++ }
++ else
++ *p = '.';
++
++ /* If we couldn't access the dir, or if recursion resulted in a
++ non-accessible pathname, we try stripping out dir/../. If `dir'
++ turns out to be `.', strip one more path component. */
++ before = p;
++ do
++ {
++ --before;
++ while (before != result && IS_DIR_SEPARATOR (*before))
++ --before;
++ while (before != result && !IS_DIR_SEPARATOR (before[-1]))
++ --before;
++ }
++ while (before != result && *before == '.'
++ && IS_DIR_SEPARATOR (*(before + 1)));
++ /* If we have something like `./..' or `/..', don't
++ strip anything more. */
++ if (*before == '.' || IS_DIR_SEPARATOR (*before))
++ return result;
++
++ after = p + 3;
++ while (IS_DIR_SEPARATOR (*after))
++ ++after;
++
++ len = (after - result) + strlen (after);
++
++ temp = xmalloc (len + 1 - (after - before));
++ memcpy (temp, result, before - result);
++ memcpy (temp + (before - result), after, len + 1 - (after - result));
++
++ path = maybe_strip_dotdots (temp, temp + (before - result));
++
++ if (path != temp)
++ free (temp);
++
++ if (access (path, F_OK) == 0)
++ result = path;
++ else if (path != result)
++ free ((char *) path);
++
++ return result;
++}
++
+ /* Update PATH using KEY if PATH starts with PREFIX. The returned
+ string is always malloc-ed, and the caller is responsible for
+ freeing it. */
+@@ -245,7 +344,7 @@
+ char *
+ update_path (const char *path, const char *key)
+ {
+- char *result, *p;
++ char *result, *temp;
+
+ if (! strncmp (path, std_prefix, strlen (std_prefix)) && key != 0)
+ {
+@@ -265,62 +364,11 @@
+ else
+ result = xstrdup (path);
+
+-#ifndef ALWAYS_STRIP_DOTDOT
+-#define ALWAYS_STRIP_DOTDOT 0
+-#endif
++ temp = result;
++ result = (char *) maybe_strip_dotdots (temp, temp);
+
+- p = result;
+- while (1)
+- {
+- char *src, *dest;
+-
+- p = strchr (p, '.');
+- if (p == NULL)
+- break;
+- /* Look for `/../' */
+- if (p[1] == '.'
+- && IS_DIR_SEPARATOR (p[2])
+- && (p != result && IS_DIR_SEPARATOR (p[-1])))
+- {
+- *p = 0;
+- if (!ALWAYS_STRIP_DOTDOT && access (result, X_OK) == 0)
+- {
+- *p = '.';
+- break;
+- }
+- else
+- {
+- /* We can't access the dir, so we won't be able to
+- access dir/.. either. Strip out `dir/../'. If `dir'
+- turns out to be `.', strip one more path component. */
+- dest = p;
+- do
+- {
+- --dest;
+- while (dest != result && IS_DIR_SEPARATOR (*dest))
+- --dest;
+- while (dest != result && !IS_DIR_SEPARATOR (dest[-1]))
+- --dest;
+- }
+- while (dest != result && *dest == '.');
+- /* If we have something like `./..' or `/..', don't
+- strip anything more. */
+- if (*dest == '.' || IS_DIR_SEPARATOR (*dest))
+- {
+- *p = '.';
+- break;
+- }
+- src = p + 3;
+- while (IS_DIR_SEPARATOR (*src))
+- ++src;
+- p = dest;
+- while ((*dest++ = *src++) != 0)
+- ;
+- }
+- }
+- else
+- ++p;
+- }
++ if (result != temp)
++ free (temp);
+
+ #ifdef UPDATE_PATH_HOST_CANONICALIZE
+ /* Perform host dependent canonicalization when needed. */
+2005-09-29 Alexandre Oliva <aoliva@redhat.com>
+
+ * error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message.
+
+ * g++.dg/overload/unknown1.C: New.
+
+--- gcc/cp/error.c.orig 2004-11-07 11:22:11.000000000 -0200
++++ gcc/cp/error.c 2005-09-29 16:13:20.000000000 -0300
+@@ -302,7 +302,7 @@
+ switch (TREE_CODE (t))
+ {
+ case UNKNOWN_TYPE:
+- pp_identifier (cxx_pp, "<unknown type>");
++ pp_identifier (cxx_pp, "<unresolved overloaded function type>");
+ break;
+
+ case TREE_LIST:
+--- gcc/testsuite/g++.dg/overload/unknown1.C 1970-01-01 00:00:00.000000000 +0000
++++ gcc/testsuite/g++.dg/overload/unknown1.C 2005-09-29 16:12:49.000000000 -0300
+@@ -0,0 +1,9 @@
++// { dg-do compile }
++
++void foo(void);
++int foo(int);
++template <typename T> void bar(T f);
++
++void baz() {
++ bar(foo); // { dg-error "<unresolved overloaded function type>" }
++}
+2005-12-18 Alexandre Oliva <aoliva@redhat.com>
+
+ * optabs.c (expand_vector_binop): Do not use a SUBREG to modify
+ a subword in the output if it matches any of the inputs.
+
+2006-04-20 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.c-torture/execute/20060420-1.c: New test.
+
+--- gcc/optabs.c.orig 2005-11-21 11:43:20.000000000 -0200
++++ gcc/optabs.c 2005-12-18 18:35:14.000000000 -0200
+@@ -1933,16 +1933,19 @@
+
+ for (i = 0; i < elts; ++i)
+ {
+- /* If this is part of a register, and not the first item in the
+- word, we can't store using a SUBREG - that would clobber
+- previous results.
++ /* If this is part of a register, and not the first item in
++ the word, we can't store using a SUBREG - that would
++ clobber previous results, or even the input operands, if
++ target matches any of them.
+ And storing with a SUBREG is only possible for the least
+ significant part, hence we can't do it for big endian
+ (unless we want to permute the evaluation order. */
+ if (GET_CODE (target) == REG
+ && (BYTES_BIG_ENDIAN
+ ? subsize < UNITS_PER_WORD
+- : ((i * subsize) % UNITS_PER_WORD) != 0))
++ : (((i * subsize) % UNITS_PER_WORD) != 0
++ || (subsize < UNITS_PER_WORD
++ && (target == op0 || target == op1)))))
+ t = NULL_RTX;
+ else
+ t = simplify_gen_subreg (submode, target, mode, i * subsize);
+--- gcc/testsuite/gcc.c-torture/execute/20060420-1.c.jj 2006-04-20 18:47:19.000000000 +0200
++++ gcc/testsuite/gcc.c-torture/execute/20060420-1.c 2006-04-20 19:07:20.000000000 +0200
+@@ -0,0 +1,71 @@
++extern void abort (void);
++
++typedef float v4flt __attribute__ ((vector_size (16)));
++
++void __attribute__ ((noinline)) foo (float *dst, float **src, int a, int n)
++{
++ int i, j;
++ int z = sizeof (v4flt) / sizeof (float);
++ unsigned m = sizeof (v4flt) - 1;
++
++ for (j = 0; j < n && (((unsigned long) dst + j) & m); ++j)
++ {
++ float t = src[0][j];
++ for (i = 1; i < a; ++i)
++ t += src[i][j];
++ dst[j] = t;
++ }
++
++ for (; j < (n - (4 * z - 1)); j += 4 * z)
++ {
++ v4flt t0 = *(v4flt *) (src[0] + j + 0 * z);
++ v4flt t1 = *(v4flt *) (src[0] + j + 1 * z);
++ v4flt t2 = *(v4flt *) (src[0] + j + 2 * z);
++ v4flt t3 = *(v4flt *) (src[0] + j + 3 * z);
++ for (i = 1; i < a; ++i)
++ {
++ t0 += *(v4flt *) (src[i] + j + 0 * z);
++ t1 += *(v4flt *) (src[i] + j + 1 * z);
++ t2 += *(v4flt *) (src[i] + j + 2 * z);
++ t3 += *(v4flt *) (src[i] + j + 3 * z);
++ }
++ *(v4flt *) (dst + j + 0 * z) = t0;
++ *(v4flt *) (dst + j + 1 * z) = t1;
++ *(v4flt *) (dst + j + 2 * z) = t2;
++ *(v4flt *) (dst + j + 3 * z) = t3;
++ }
++ for (; j < n; ++j)
++ {
++ float t = src[0][j];
++ for (i = 1; i < a; ++i)
++ t += src[i][j];
++ dst[j] = t;
++ }
++}
++
++float buffer[64];
++
++int
++main (void)
++{
++ int i;
++ float *dst, *src[2];
++
++ dst = buffer;
++ dst += (-(long int) buffer & (16 * sizeof (float) - 1)) / sizeof (float);
++ src[0] = dst + 16;
++ src[1] = dst + 32;
++ for (i = 0; i < 16; ++i)
++ {
++ src[0][i] = (float) i + 11 * (float) i;
++ src[1][i] = (float) i + 12 * (float) i;
++ }
++ foo (dst, src, 2, 16);
++ for (i = 0; i < 16; ++i)
++ {
++ float e = (float) i + 11 * (float) i + (float) i + 12 * (float) i;
++ if (dst[i] != e)
++ abort ();
++ }
++ return 0;
++}
+2006-03-01 Alexandre Oliva <aoliva@redhat.com>
+
+ * dwarf2out.c (dwarf2out_stack_adjust): Always track the stack
+ pointer, instead of assuming it is possible to derive the
+ correct args size from a call insn.
+
+--- gcc/dwarf2out.c.orig 2006-03-01 05:13:50.000000000 -0300
++++ gcc/dwarf2out.c 2006-03-01 05:41:38.000000000 -0300
+@@ -1069,26 +1069,6 @@ dwarf2out_stack_adjust (rtx insn)
+ if (prologue_epilogue_contains (insn) || sibcall_epilogue_contains (insn))
+ return;
+
+- if (!flag_asynchronous_unwind_tables && GET_CODE (insn) == CALL_INSN)
+- {
+- /* Extract the size of the args from the CALL rtx itself. */
+- insn = PATTERN (insn);
+- if (GET_CODE (insn) == PARALLEL)
+- insn = XVECEXP (insn, 0, 0);
+- if (GET_CODE (insn) == SET)
+- insn = SET_SRC (insn);
+- if (GET_CODE (insn) != CALL)
+- abort ();
+-
+- dwarf2out_args_size ("", INTVAL (XEXP (insn, 1)));
+- return;
+- }
+-
+- /* If only calls can throw, and we have a frame pointer,
+- save up adjustments until we see the CALL_INSN. */
+- else if (!flag_asynchronous_unwind_tables && cfa.reg != STACK_POINTER_REGNUM)
+- return;
+-
+ if (GET_CODE (insn) == BARRIER)
+ {
+ /* When we see a BARRIER, we know to reset args_size to 0. Usually
+@@ -1111,9 +1091,20 @@ dwarf2out_stack_adjust (rtx insn)
+ if (GET_CODE (XVECEXP (PATTERN (insn), 0, i)) == SET)
+ offset += stack_adjust_offset (XVECEXP (PATTERN (insn), 0, i));
+ }
++ else if (GET_CODE (insn) == CALL_INSN)
++ offset = 0;
+ else
+ return;
+
++ /* We handle this separately because we want stack adjustments in a
++ CALL_INSN to be handled. */;
++ if (GET_CODE (insn) == CALL_INSN)
++ {
++ /* If only calls can throw, adjust args_size only at call sites. */
++ if (!flag_asynchronous_unwind_tables)
++ dwarf2out_args_size ("", args_size);
++ }
++
+ if (offset == 0)
+ return;
+
+@@ -1128,6 +1119,16 @@ dwarf2out_stack_adjust (rtx insn)
+ if (args_size < 0)
+ args_size = 0;
+
++ /* If only calls can throw and we have a frame pointer, we'll save
++ up adjustments until we see the CALL_INSN. We used to return
++ early and derive args_size from NARGS in the CALL_INSN itself,
++ but that doesn't compute the right value if we have nested call
++ expansions, e.g., stack adjustments for a call have already been
++ emitted, and then we issue another call to compute an argument
++ for the enclosing call (i.e., bar (foo ())). */
++ if (!flag_asynchronous_unwind_tables && cfa.reg != STACK_POINTER_REGNUM)
++ return;
++
+ label = dwarf2out_cfi_label ();
+ def_cfa_1 (label, &cfa);
+ dwarf2out_args_size (label, args_size);
+2006-02-25 Alexandre Oliva <aoliva@redhat.com>
+
+ * varasm.c (copy_constant): Handle VECTOR_CST.
+
+ * gcc.dg/altivec-23.c: New test.
+
+--- gcc/varasm.c 2006-02-25 03:52:54.000000000 -0300
++++ gcc/varasm.c 2006-02-25 03:54:56.000000000 -0300
+@@ -2464,6 +2464,19 @@ copy_constant (tree exp)
+ return copy;
+ }
+
++ case VECTOR_CST:
++ {
++ tree copy = copy_node (exp);
++ tree list = copy_list (TREE_VECTOR_CST_ELTS (exp));
++ tree tail;
++
++ TREE_VECTOR_CST_ELTS (copy) = list;
++ for (tail = list; tail; tail = TREE_CHAIN (tail))
++ TREE_VALUE (tail) = copy_constant (TREE_VALUE (tail));
++
++ return copy;
++ }
++
+ default:
+ {
+ tree t;
+--- gcc/testsuite/gcc.dg/altivec-23.c 1970-01-01 00:00:00.000000000 +0000
++++ gcc/testsuite/gcc.dg/altivec-23.c 2006-02-25 04:10:36.000000000 -0300
+@@ -0,0 +1,25 @@
++/* Verify that it is possible to define variables of composite types
++ containing vector types. We used to crash handling the
++ initializer of automatic ones. */
++
++/* { dg-do compile { target powerpc*-*-* } } */
++/* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "-maltivec" } { "" } } */
++/* { dg-options "-maltivec -mabi=altivec" } */
++
++#include <altivec.h>
++
++typedef int bt;
++typedef vector bt vt;
++typedef struct { vt x; bt y[sizeof(vt) / sizeof (bt)]; } st;
++#define INIT { 1, 2, 3, 4 }
++
++void f ()
++{
++ vt x = INIT;
++ vt y[1] = { INIT };
++ st s = { INIT, INIT };
++}
++
++vt x = INIT;
++vt y[1] = { INIT };
++st s = { INIT, INIT };
+2006-12-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * g++.dg/template/array17.C: New test.
+
+2006-10-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * typeck.c (non_reference): Don't dereference NULL type.
+
+--- gcc/cp/typeck.c.orig 2005-11-21 11:56:03.000000000 -0200
++++ gcc/cp/typeck.c 2006-10-27 03:28:04.000000000 -0300
+@@ -6443,7 +6443,7 @@ casts_away_constness (tree t1, tree t2)
+ tree
+ non_reference (tree t)
+ {
+- if (TREE_CODE (t) == REFERENCE_TYPE)
++ if (t != NULL_TREE && TREE_CODE (t) == REFERENCE_TYPE)
+ t = TREE_TYPE (t);
+ return t;
+ }
+--- gcc/testsuite/g++.dg/template/array17.C 2006-10-04 16:28:56.502613000 +0200
++++ gcc/testsuite/g++.dg/template/array17.C 2006-12-08 12:38:27.000000000 +0100
+@@ -0,0 +1,23 @@
++// { dg-do compile }
++
++template <typename T>
++struct V {
++ T& operator[](int);
++};
++
++struct S {
++ S operator +(int);
++ template <typename T> T value();
++};
++
++template <typename T>
++void R (T v)
++{
++ v[(S() + 0).template value<int>()][0] = 0;
++}
++
++int
++main ()
++{
++ R(V<V<int> >());
++}
+2006-12-08 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/opt/ifcvt1.C: New test.
+
+2005-11-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * ifcvt.c (noce_get_alt_condition): Use prev_nonnote_insn.
+ (noce_try_abs): Negate if the comparison is reversed.
+ Look only one instruction backwards for a REG_EQUAL note.
+
+ * gcc.dg/ifcvt-fabs-1.c: New test.
+
+--- gcc/ifcvt.c.orig 2005-11-21 11:43:21.000000000 -0200
++++ gcc/ifcvt.c 2006-10-26 02:21:07.000000000 -0300
+@@ -1406,7 +1406,7 @@ noce_get_alt_condition (struct noce_if_i
+ rtx prev_insn;
+
+ /* First, look to see if we put a constant in a register. */
+- prev_insn = PREV_INSN (if_info->cond_earliest);
++ prev_insn = prev_nonnote_insn (if_info->cond_earliest);
+ if (prev_insn
+ && INSN_P (prev_insn)
+ && GET_CODE (PATTERN (prev_insn)) == SET)
+@@ -1642,25 +1642,30 @@ noce_try_abs (struct noce_if_info *if_in
+ if (rtx_equal_p (XEXP (cond, 0), b))
+ c = XEXP (cond, 1);
+ else if (rtx_equal_p (XEXP (cond, 1), b))
+- c = XEXP (cond, 0);
++ {
++ c = XEXP (cond, 0);
++ negate = !negate;
++ }
+ else
+ return FALSE;
+
+- /* Verify that C is zero. Search backward through the block for
+- a REG_EQUAL note if necessary. */
++ /* Verify that C is zero. Search one step backward for a
++ REG_EQUAL note or a simple source if necessary. */
+ if (REG_P (c))
+ {
+- rtx insn, note = NULL;
+- for (insn = earliest;
+- insn != BB_HEAD (if_info->test_bb);
+- insn = PREV_INSN (insn))
+- if (INSN_P (insn)
+- && ((note = find_reg_note (insn, REG_EQUAL, c))
+- || (note = find_reg_note (insn, REG_EQUIV, c))))
+- break;
+- if (! note)
++ rtx set, insn = prev_nonnote_insn (earliest);
++ if (insn
++ && (set = single_set (insn))
++ && rtx_equal_p (SET_DEST (set), c))
++ {
++ rtx note = find_reg_equal_equiv_note (insn);
++ if (note)
++ c = XEXP (note, 0);
++ else
++ c = SET_SRC (set);
++ }
++ else
+ return FALSE;
+- c = XEXP (note, 0);
+ }
+ if (GET_CODE (c) == MEM
+ && GET_CODE (XEXP (c, 0)) == SYMBOL_REF
+--- gcc/testsuite/gcc.dg/ifcvt-fabs-1.c 1970-01-01 00:00:00.000000000 +0000
++++ gcc/testsuite/gcc.dg/ifcvt-fabs-1.c 2006-10-26 02:20:24.000000000 -0300
+@@ -0,0 +1,21 @@
++/* { dg-do run } */
++/* { dg-options "-O" } */
++/* { dg-options "-O -march=i686" { target i686-*-* } } */
++
++extern void abort(void);
++
++float foo(float f)
++{
++ if (f < 0.0f)
++ f = -f;
++
++ return f;
++}
++
++int main(void)
++{
++ if (foo (-1.0f) != 1.0f)
++ abort ();
++
++ return 0;
++}
+--- gcc/testsuite/g++.dg/opt/ifcvt1.C 2006-10-04 16:28:56.502613000 +0200
++++ gcc/testsuite/g++.dg/opt/ifcvt1.C 2006-12-08 12:23:23.000000000 +0100
+@@ -0,0 +1,17 @@
++// { dg-do compile }
++// { dg-options "-O2 -fnon-call-exceptions" }
++
++struct S { ~S () throw () {} };
++double bar ();
++
++int
++foo ()
++{
++ S a;
++ int i = 0;
++ double c = bar ();
++ c = c < 0 ? -c : c;
++ if (c <= 1.e-8)
++ i += 24;
++ return i;
++}
+2007-04-02 Jakub Jelinek <jakub@redhat.com>
+
+ * expr.c (expand_expr_real) <case COMPLEX_EXPR>: Force op1
+ into register if target overlaps with op1.
+
+ * g77.f-torture/execute/20070402.f: New test.
+
+--- gcc/expr.c.jj 2006-10-05 00:37:01.000000000 +0200
++++ gcc/expr.c 2007-04-02 13:28:52.000000000 +0200
+@@ -8949,6 +8949,9 @@ expand_expr_real (tree exp, rtx target,
+
+ if (! target)
+ target = gen_reg_rtx (TYPE_MODE (TREE_TYPE (exp)));
++ else if (GET_CODE (target) == MEM
++ && reg_overlap_mentioned_p (target, op1))
++ op1 = force_reg (mode, op1);
+
+ start_sequence ();
+
+--- gcc/testsuite/g77.f-torture/execute/20070402.f.jj 2007-04-02 13:29:51.000000000 +0200
++++ gcc/testsuite/g77.f-torture/execute/20070402.f 2007-04-02 12:11:00.000000000 +0200
+@@ -0,0 +1,21 @@
++ program rh233941
++ implicit none
++ complex*16 z
++ z = dcmplx(1.0, 2.0)
++ call sub(z)
++ stop
++ end program rh233941
++
++ subroutine sub(z)
++ implicit none
++ complex*16 z
++ z = dcmplx(-dimag(z), dreal(z))
++ call sub2(z)
++ return
++ end subroutine sub
++
++ subroutine sub2(z)
++ implicit none
++ complex*16 z
++ if (dreal(z).ne.-2.0.or.dimag(z).ne.1.0) call abort
++ end subroutine sub2
+2007-01-24 Steve LoBasso <slobasso@yahoo.com>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/deque.tcc (deque<>::erase(iterator, iterator)):
+ Fix condition.
+ * testsuite/23_containers/deque/modifiers/erase/3.cc: New.
+
+--- libstdc++-v3/include/bits/deque.tcc (revision 121146)
++++ libstdc++-v3/include/bits/deque.tcc (revision 121147)
+@@ -140,7 +140,7 @@ namespace _GLIBCXX_STD
+ {
+ const difference_type __n = __last - __first;
+ const difference_type __elems_before = __first - this->_M_impl._M_start;
+- if (static_cast<size_type>(__elems_before) < (size() - __n) / 2)
++ if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2)
+ {
+ std::copy_backward(this->_M_impl._M_start, __first, __last);
+ iterator __new_start = this->_M_impl._M_start + __n;
+--- libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/3.cc (revision 0)
++++ libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/3.cc (revision 121147)
+@@ -0,0 +1,52 @@
++// Copyright (C) 2007 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
++// USA.
++
++// 23.2.1.3 deque modifiers
++
++#include <deque>
++#include <testsuite_hooks.h>
++
++void erase(size_t num_elm, size_t elm_strt, size_t elm_end)
++{
++ bool test __attribute__((unused)) = true;
++ using __gnu_test::copy_tracker;
++ using __gnu_test::assignment_operator;
++
++ std::deque<copy_tracker> x(num_elm);
++ copy_tracker::reset();
++
++ x.erase(x.begin() + elm_strt, x.begin() + elm_end);
++
++ const size_t min_num_cpy = std::min(elm_strt, num_elm - elm_end);
++ VERIFY( assignment_operator::count() == min_num_cpy );
++}
++
++// http://gcc.gnu.org/ml/libstdc++/2007-01/msg00098.html
++void test01()
++{
++ for (size_t num_elm = 0; num_elm <= 10; ++num_elm)
++ for (size_t elm_strt = 0; elm_strt <= num_elm; ++elm_strt)
++ for (size_t elm_end = elm_strt; elm_end <= num_elm; ++elm_end)
++ erase(num_elm, elm_strt, elm_end);
++}
++
++int main()
++{
++ test01();
++ return 0;
++}
+2007-04-12 Jakub Jelinek <jakub@redhat.com>
+
+ * fr.po: Use %s rather than %S.
+ * rw.po: Comment out translations with bogus format
+ strings.
+
+--- gcc/po/fr.po.jj 2006-10-05 00:33:36.000000000 +0200
++++ gcc/po/fr.po 2007-04-13 00:23:29.000000000 +0200
+@@ -17100,7 +17100,7 @@ msgstr "%s liste d'expressions traitée c
+
+ #: cp/typeck.c:4490
+ msgid "%s from type `%T' to type `%T' casts away constness"
+-msgstr "%S à partir du « %T » vers le type « %T » provoque un transtypage sans constante"
++msgstr "%s à partir du « %T » vers le type « %T » provoque un transtypage sans constante"
+
+ #: cp/typeck.c:4692
+ msgid "invalid static_cast from type `%T' to type `%T'"
+2007-04-21 Alexandre Oliva <aoliva@redhat.com>
+
+ * gcse.c (store_killed_in_insn): Handle PARALLELs.
+ (store_killed_in_pat): New.
+
+ * gcc.dg/movsi-sm-1.c: New.
+
+--- gcc/gcse.c.jj 2007-02-23 21:29:12.000000000 +0100
++++ gcc/gcse.c 2007-07-18 20:41:08.000000000 +0200
+@@ -7427,6 +7427,40 @@ find_loads (rtx x, rtx store_pattern, in
+ return ret;
+ }
+
++static inline bool
++store_killed_in_pat (rtx x, rtx pat, int after)
++{
++ if (GET_CODE (pat) == SET)
++ {
++ rtx dest = SET_DEST (pat);
++
++ if (GET_CODE (dest) == SIGN_EXTRACT
++ || GET_CODE (dest) == ZERO_EXTRACT)
++ dest = XEXP (dest, 0);
++
++ /* Check for memory stores to aliased objects. */
++ if (GET_CODE (dest) == MEM
++ && !expr_equiv_p (dest, x))
++ {
++ if (after)
++ {
++ if (output_dependence (dest, x))
++ return true;
++ }
++ else
++ {
++ if (output_dependence (x, dest))
++ return true;
++ }
++ }
++ }
++
++ if (find_loads (pat, x, after))
++ return true;
++
++ return false;
++}
++
+ /* Check if INSN kills the store pattern X (is aliased with it).
+ AFTER is true if we are checking the case when store X occurs
+ after the insn. Return true if it it does. */
+@@ -7434,7 +7468,7 @@ find_loads (rtx x, rtx store_pattern, in
+ static bool
+ store_killed_in_insn (rtx x, rtx x_regs, rtx insn, int after)
+ {
+- rtx reg, base, note;
++ rtx reg, base, note, pat;
+
+ if (!INSN_P (insn))
+ return false;
+@@ -7461,33 +7495,20 @@ store_killed_in_insn (rtx x, rtx x_regs,
+ return false;
+ }
+
+- if (GET_CODE (PATTERN (insn)) == SET)
++ pat = PATTERN (insn);
++ if (GET_CODE (pat) == SET)
+ {
+- rtx pat = PATTERN (insn);
+- rtx dest = SET_DEST (pat);
+-
+- if (GET_CODE (dest) == SIGN_EXTRACT
+- || GET_CODE (dest) == ZERO_EXTRACT)
+- dest = XEXP (dest, 0);
+-
+- /* Check for memory stores to aliased objects. */
+- if (GET_CODE (dest) == MEM
+- && !expr_equiv_p (dest, x))
+- {
+- if (after)
+- {
+- if (output_dependence (dest, x))
+- return true;
+- }
+- else
+- {
+- if (output_dependence (x, dest))
+- return true;
+- }
+- }
+- if (find_loads (SET_SRC (pat), x, after))
++ if (store_killed_in_pat (x, pat, after))
+ return true;
+ }
++ else if (GET_CODE (pat) == PARALLEL)
++ {
++ int i;
++
++ for (i = 0; i < XVECLEN (pat, 0); i++)
++ if (store_killed_in_pat (x, XVECEXP (pat, 0, i), after))
++ return true;
++ }
+ else if (find_loads (PATTERN (insn), x, after))
+ return true;
+
+--- gcc/testsuite/gcc.dg/movsi-sm-1.c.jj 2007-07-18 20:58:08.000000000 +0200
++++ gcc/testsuite/gcc.dg/movsi-sm-1.c 2007-07-18 21:01:52.000000000 +0200
+@@ -0,0 +1,35 @@
++/* { dg-do run } */
++/* { dg-options "-O2" } */
++/* { dg-options "-O2 -mtune=i386" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
++
++int ret = 1;
++char buf[128];
++
++void
++__attribute__((noinline))
++bug (int arg)
++{
++ char str[28];
++
++ __builtin_memcpy (str, "Bugged!", 8);
++
++ if (arg & 0200)
++ {
++ __builtin_memcpy (str, "This is what we should get!", 28);
++ ret = 0;
++ }
++
++ if (arg & 0100)
++ __builtin_memcpy (str, "Broken!", 8);
++
++ __builtin_sprintf (buf, "%s\n", str);
++}
++
++int
++main ()
++{
++ bug (0200);
++ if (ret)
++ return ret;
++ return __builtin_strcmp (buf, "This is what we should get!\n") != 0;
++}
+2007-06-08 Jatin Nansi <jnansi@redhat.com>
+
+ * config/locale/ieee_1003.1-2001/codecvt_specializations.h: Make sure
+ _M_int_enc and _M_ext_enc are '\0' terminated.
+
+--- libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h.jj 2007-02-23 21:29:34.000000000 +0100
++++ libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h 2007-07-19 14:20:20.000000000 +0200
+@@ -83,8 +83,10 @@
+ int __ibom = 0, int __ebom = 0)
+ : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(__ebom), _M_int_bom(__ibom)
+ {
+- strncpy(_M_int_enc, __int, _S_max_size);
+- strncpy(_M_ext_enc, __ext, _S_max_size);
++ strncpy(_M_int_enc, __int, _S_max_size - 1);
++ strncpy(_M_ext_enc, __ext, _S_max_size - 1);
++ _M_int_enc[_S_max_size - 1] = '\0';
++ _M_ext_enc[_S_max_size - 1] = '\0';
+ _M_init();
+ }
+
+@@ -98,8 +100,10 @@
+ // information.
+ __enc_traits(const __enc_traits& __obj): _M_in_desc(0), _M_out_desc(0)
+ {
+- strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
+- strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
++ strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size - 1);
++ strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size - 1);
++ _M_int_enc[_S_max_size - 1] = '\0';
++ _M_ext_enc[_S_max_size - 1] = '\0';
+ _M_ext_bom = __obj._M_ext_bom;
+ _M_int_bom = __obj._M_int_bom;
+ _M_destroy();
+@@ -110,8 +114,10 @@
+ __enc_traits&
+ operator=(const __enc_traits& __obj)
+ {
+- strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
+- strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
++ strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size - 1);
++ strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size - 1);
++ _M_int_enc[_S_max_size - 1] = '\0';
++ _M_ext_enc[_S_max_size - 1] = '\0';
+ _M_ext_bom = __obj._M_ext_bom;
+ _M_int_bom = __obj._M_int_bom;
+ _M_destroy();
--- /dev/null
+Index: gcc/ChangeLog
+from Alexandre Oliva <aoliva@redhat.com>
+
+ PR middle-end/15666
+ * c-decl.c (finish_decl): Use change_decl_assembler_name for the
+ builtin decl as well.
+
+Index: gcc/c-decl.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
+retrieving revision 1.504
+diff -u -p -r1.504 c-decl.c
+--- gcc/c-decl.c 31 May 2004 22:06:27 -0000 1.504
++++ gcc/c-decl.c 1 Jun 2004 04:03:41 -0000
+@@ -2886,7 +2886,7 @@ finish_decl (tree decl, tree init, tree
+ {
+ tree builtin = built_in_decls [DECL_FUNCTION_CODE (decl)];
+ SET_DECL_RTL (builtin, NULL_RTX);
+- SET_DECL_ASSEMBLER_NAME (builtin, get_identifier (starred));
++ change_decl_assembler_name (builtin, get_identifier (starred));
+ #ifdef TARGET_MEM_FUNCTIONS
+ if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMCPY)
+ init_block_move_fn (starred);
--- /dev/null
+diff -uNr gcc-3.4.3.orig/gcc/calls.c gcc-3.4.3/gcc/calls.c
+--- gcc-3.4.3.orig/gcc/calls.c 2004-06-24 09:26:50.000000000 +0200
++++ gcc-3.4.3/gcc/calls.c 2004-11-24 18:35:31.000000000 +0100
+@@ -2321,8 +2321,12 @@
+ {
+ /* For variable-sized objects, we must be called with a target
+ specified. If we were to allocate space on the stack here,
+- we would have no way of knowing when to free it. */
+- rtx d = assign_temp (TREE_TYPE (exp), 1, 1, 1);
++ we would have no way of knowing when to free it.
++
++ This is the structure of a function return object and it isn't
++ a character array for the stack protection, so it is
++ marked using the assignment of the KEEP argument to 5. */
++ rtx d = assign_temp (TREE_TYPE (exp), 5, 1, 1);
+
+ mark_temp_addr_taken (d);
+ structure_value_addr = XEXP (d, 0);
+diff -uNr gcc-3.4.3.orig/gcc/c-cppbuiltin.c gcc-3.4.3/gcc/c-cppbuiltin.c
+--- gcc-3.4.3.orig/gcc/c-cppbuiltin.c 2004-03-04 11:24:54.000000000 +0100
++++ gcc-3.4.3/gcc/c-cppbuiltin.c 2004-11-24 18:35:31.000000000 +0100
+@@ -408,6 +408,12 @@
+ if (c_dialect_objc () && flag_next_runtime)
+ cpp_define (pfile, "__NEXT_RUNTIME__");
+
++ /* Make the choice of the stack protector runtime visible to source code. */
++ if (flag_propolice_protection)
++ cpp_define (pfile, "__SSP__=1");
++ if (flag_stack_protection)
++ cpp_define (pfile, "__SSP_ALL__=2");
++
+ /* A straightforward target hook doesn't work, because of problems
+ linking that hook's body when part of non-C front ends. */
+ # define preprocessing_asm_p() (cpp_get_options (pfile)->lang == CLK_ASM)
+diff -uNr gcc-3.4.3.orig/gcc/combine.c gcc-3.4.3/gcc/combine.c
+--- gcc-3.4.3.orig/gcc/combine.c 2004-10-13 01:35:29.000000000 +0200
++++ gcc-3.4.3/gcc/combine.c 2004-11-24 18:35:31.000000000 +0100
+@@ -1401,6 +1401,10 @@
+ && ! fixed_regs[REGNO (dest)]
+ && CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (REGNO (dest))))))
+ return 1;
++ /* Never combine loads and stores protecting argument that use set insn
++ with used flag on. */
++ if (SET_VOLATILE_P (set))
++ return 1;
+
+ return 0;
+ }
+@@ -3781,7 +3785,20 @@
+ rtx inner_op0 = XEXP (XEXP (x, 0), 1);
+ rtx inner_op1 = XEXP (x, 1);
+ rtx inner;
+-
++
++#ifndef FRAME_GROWS_DOWNWARD
++ /* For the case where the frame grows upward,
++ the stack protector keeps the offset of the frame pointer
++ positive integer. */
++ if (flag_propolice_protection
++ && code == PLUS
++ && other == frame_pointer_rtx
++ && GET_CODE (inner_op0) == CONST_INT
++ && GET_CODE (inner_op1) == CONST_INT
++ && INTVAL (inner_op0) > 0
++ && INTVAL (inner_op0) + INTVAL (inner_op1) <= 0)
++ return x;
++#endif
+ /* Make sure we pass the constant operand if any as the second
+ one if this is a commutative operation. */
+ if (CONSTANT_P (inner_op0) && GET_RTX_CLASS (code) == 'c')
+@@ -4146,6 +4163,13 @@
+ they are now checked elsewhere. */
+ if (GET_CODE (XEXP (x, 0)) == PLUS
+ && CONSTANT_ADDRESS_P (XEXP (XEXP (x, 0), 1)))
++#ifndef FRAME_GROWS_DOWNWARD
++ /* The stack protector keeps the addressing style of a local variable
++ to be able to change its stack position. */
++ if (! (flag_propolice_protection
++ && XEXP (XEXP (x, 0), 0) == frame_pointer_rtx
++ && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT))
++#endif
+ return gen_binary (PLUS, mode,
+ gen_binary (PLUS, mode, XEXP (XEXP (x, 0), 0),
+ XEXP (x, 1)),
+@@ -4273,8 +4297,14 @@
+ }
+
+ /* Canonicalize (minus A (plus B C)) to (minus (minus A B) C) for
+- integers. */
+- if (GET_CODE (XEXP (x, 1)) == PLUS && INTEGRAL_MODE_P (mode))
++ integers.
++
++ The stack protector keeps the addressing style of
++ a local variable. */
++ if (GET_CODE (XEXP (x, 1)) == PLUS && INTEGRAL_MODE_P (mode)
++ && (! (flag_propolice_protection
++ && XEXP (XEXP (x, 1), 0) == frame_pointer_rtx
++ && GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT)))
+ return gen_binary (MINUS, mode,
+ gen_binary (MINUS, mode, XEXP (x, 0),
+ XEXP (XEXP (x, 1), 0)),
+diff -uNr gcc-3.4.3.orig/gcc/common.opt gcc-3.4.3/gcc/common.opt
+--- gcc-3.4.3.orig/gcc/common.opt 2004-11-24 18:04:19.000000000 +0100
++++ gcc-3.4.3/gcc/common.opt 2004-11-24 18:35:31.000000000 +0100
+@@ -152,6 +152,10 @@
+ Common
+ Warn when a variable is unused
+
++Wstack-protector
++Common
++Warn when not issuing stack smashing protection for some reason
++
+ aux-info
+ Common Separate
+ -aux-info <file> Emit declaration information into <file>
+@@ -743,6 +747,14 @@
+ Common
+ Put zero initialized data in the bss section
+
++fstack-protector
++Common
++Enables stack protection
++
++fstack-protector-all
++Common
++Enables stack protection of every function
++
+ g
+ Common JoinedOrMissing
+ Generate debug information in default format
+diff -uNr gcc-3.4.3.orig/gcc/config/arm/arm.md gcc-3.4.3/gcc/config/arm/arm.md
+--- gcc-3.4.3.orig/gcc/config/arm/arm.md 2004-08-25 17:46:19.000000000 +0200
++++ gcc-3.4.3/gcc/config/arm/arm.md 2004-11-24 18:35:31.000000000 +0100
+@@ -3840,7 +3840,13 @@
+ (match_operand:DI 1 "general_operand" ""))]
+ "TARGET_EITHER"
+ "
+- if (TARGET_THUMB)
++ if (TARGET_ARM)
++ {
++ /* Everything except mem = const or mem = mem can be done easily */
++ if (GET_CODE (operands[0]) == MEM)
++ operands[1] = force_reg (DImode, operands[1]);
++ }
++ else /* TARGET_THUMB.... */
+ {
+ if (!no_new_pseudos)
+ {
+diff -uNr gcc-3.4.3.orig/gcc/config/t-linux gcc-3.4.3/gcc/config/t-linux
+--- gcc-3.4.3.orig/gcc/config/t-linux 2003-09-23 20:55:57.000000000 +0200
++++ gcc-3.4.3/gcc/config/t-linux 2004-11-24 18:35:31.000000000 +0100
+@@ -1,7 +1,7 @@
+ # Compile crtbeginS.o and crtendS.o with pic.
+ CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
+ # Compile libgcc2.a with pic.
+-TARGET_LIBGCC2_CFLAGS = -fPIC
++TARGET_LIBGCC2_CFLAGS = -fPIC -DHAVE_SYSLOG
+
+ # Override t-slibgcc-elf-ver to export some libgcc symbols with
+ # the symbol versions that glibc used.
+diff -uNr gcc-3.4.3.orig/gcc/configure gcc-3.4.3/gcc/configure
+--- gcc-3.4.3.orig/gcc/configure 2004-11-05 05:14:05.000000000 +0100
++++ gcc-3.4.3/gcc/configure 2004-11-24 18:44:13.000000000 +0100
+@@ -4809,6 +4809,9 @@
+ fi;
+
+
++ENABLESSP=""
++
++
+ # -------------------------
+ # Checks for other programs
+ # -------------------------
+@@ -13036,6 +13039,7 @@
+ s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
+ s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
+ s,@onestep@,$onestep,;t t
++s,@ENABLESSP@,$ENABLESSP,;t t
+ s,@SET_MAKE@,$SET_MAKE,;t t
+ s,@AWK@,$AWK,;t t
+ s,@LN@,$LN,;t t
+diff -uNr gcc-3.4.3.orig/gcc/configure.ac gcc-3.4.3/gcc/configure.ac
+--- gcc-3.4.3.orig/gcc/configure.ac 2004-11-24 18:04:19.000000000 +0100
++++ gcc-3.4.3/gcc/configure.ac 2004-11-24 18:46:57.000000000 +0100
+@@ -613,6 +613,9 @@
+ [onestep=""])
+ AC_SUBST(onestep)
+
++ENABLESSP=""
++AC_SUBST(ENABLESSP)
++
+ # -------------------------
+ # Checks for other programs
+ # -------------------------
+diff -uNr gcc-3.4.3.orig/gcc/cse.c gcc-3.4.3/gcc/cse.c
+--- gcc-3.4.3.orig/gcc/cse.c 2004-10-26 20:05:42.000000000 +0200
++++ gcc-3.4.3/gcc/cse.c 2004-11-24 18:35:31.000000000 +0100
+@@ -4212,7 +4212,14 @@
+
+ if (new_const == 0)
+ break;
+-
++#ifndef FRAME_GROWS_DOWNWARD
++ if (flag_propolice_protection
++ && GET_CODE (y) == PLUS
++ && XEXP (y, 0) == frame_pointer_rtx
++ && INTVAL (inner_const) > 0
++ && INTVAL (new_const) <= 0)
++ break;
++#endif
+ /* If we are associating shift operations, don't let this
+ produce a shift of the size of the object or larger.
+ This could occur when we follow a sign-extend by a right
+@@ -4744,6 +4751,14 @@
+ if (SET_DEST (x) == pc_rtx
+ && GET_CODE (SET_SRC (x)) == LABEL_REF)
+ ;
++ /* cut the reg propagation of stack-protected argument. */
++ else if (SET_VOLATILE_P (x)) {
++ rtx x1 = SET_DEST (x);
++ if (GET_CODE (x1) == SUBREG && GET_CODE (SUBREG_REG (x1)) == REG)
++ x1 = SUBREG_REG (x1);
++ if (! REGNO_QTY_VALID_P(REGNO (x1)))
++ make_new_qty (REGNO (x1), GET_MODE (x1));
++ }
+
+ /* Don't count call-insns, (set (reg 0) (call ...)), as a set.
+ The hard function value register is used only once, to copy to
+diff -uNr gcc-3.4.3.orig/gcc/doc/invoke.texi gcc-3.4.3/gcc/doc/invoke.texi
+--- gcc-3.4.3.orig/gcc/doc/invoke.texi 2004-11-24 18:04:19.000000000 +0100
++++ gcc-3.4.3/gcc/doc/invoke.texi 2004-11-24 18:35:32.000000000 +0100
+@@ -228,7 +228,7 @@
+ -Wno-multichar -Wnonnull -Wpacked -Wpadded @gol
+ -Wparentheses -Wpointer-arith -Wredundant-decls @gol
+ -Wreturn-type -Wsequence-point -Wshadow @gol
+--Wsign-compare -Wstrict-aliasing @gol
++-Wsign-compare -Wstack-protector -Wstrict-aliasing @gol
+ -Wswitch -Wswitch-default -Wswitch-enum @gol
+ -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol
+ -Wunknown-pragmas -Wunreachable-code @gol
+@@ -673,6 +673,7 @@
+ -fshort-double -fshort-wchar @gol
+ -fverbose-asm -fpack-struct -fstack-check @gol
+ -fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol
++-fstack-protector -fstack-protector-all @gol
+ -fargument-alias -fargument-noalias @gol
+ -fargument-noalias-global -fleading-underscore @gol
+ -ftls-model=@var{model} @gol
+@@ -3006,6 +3007,10 @@
+ complex; GCC will refuse to optimize programs when the optimization
+ itself is likely to take inordinate amounts of time.
+
++@item -Wstack-protector
++@opindex Wstack-protector
++Warn when not issuing stack smashing protection for some reason.
++
+ @item -Werror
+ @opindex Werror
+ Make all warnings into errors.
+@@ -11202,6 +11207,24 @@
+ @option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit
+ of 128KB@. Note that this may only work with the GNU linker.
+
++@item -fstack-protector
++@item -fstack-protector-all
++@opindex fstack-protector
++@opindex fstack-protector-all
++@opindex fno-stack-protector
++Generate code to protect an application from a stack smashing
++attack. The features are (1) the insertion of random value next to the
++frame pointer to detect the integrity of the stack, (2) the reordering
++of local variables to place buffers after pointers to avoid the
++corruption of pointers that could be used to further corrupt arbitrary
++memory locations, (3) the copying of pointers in function arguments to
++an area preceding local variable buffers to prevent the corruption of
++pointers that could be used to further corrupt arbitrary memory
++locations, and the (4) omission of instrumentation code from some
++functions to decrease the performance overhead. If the integrity
++would be broken, the program is aborted. If stack-protector-all is
++specified, instrumentation codes are generated at every functions.
++
+ @cindex aliasing of parameters
+ @cindex parameters, aliased
+ @item -fargument-alias
+diff -uNr gcc-3.4.3.orig/gcc/explow.c gcc-3.4.3/gcc/explow.c
+--- gcc-3.4.3.orig/gcc/explow.c 2004-04-03 01:05:26.000000000 +0200
++++ gcc-3.4.3/gcc/explow.c 2004-11-24 18:35:31.000000000 +0100
+@@ -84,7 +84,8 @@
+ rtx tem;
+ int all_constant = 0;
+
+- if (c == 0)
++ if (c == 0
++ && ! (flag_propolice_protection && x == virtual_stack_vars_rtx))
+ return x;
+
+ restart:
+@@ -185,7 +186,10 @@
+ break;
+ }
+
+- if (c != 0)
++ /* For the use of stack protection, keep the frame and offset pattern
++ even if the offset is zero. */
++ if (c != 0
++ || (flag_propolice_protection && x == virtual_stack_vars_rtx))
+ x = gen_rtx_PLUS (mode, x, GEN_INT (c));
+
+ if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF)
+@@ -474,6 +478,26 @@
+ if (memory_address_p (mode, oldx))
+ goto win2;
+
++ /* The stack protector keeps the addressing style of a local variable.
++ LEGITIMIZE_ADDRESS changes the addressing to the machine-dependent
++ style, so the protector split the frame address to a register using
++ force_reg. */
++ if (flag_propolice_protection)
++ {
++#define FRAMEADDR_P(X) (GET_CODE (X) == PLUS \
++ && XEXP (X, 0) == virtual_stack_vars_rtx \
++ && GET_CODE (XEXP (X, 1)) == CONST_INT)
++ rtx y;
++ if (FRAMEADDR_P (x))
++ goto win;
++ for (y = x; y != 0 && GET_CODE (y) == PLUS; y = XEXP (y, 0))
++ {
++ if (FRAMEADDR_P (XEXP (y, 0)))
++ XEXP (y, 0) = force_reg (GET_MODE (XEXP (y, 0)), XEXP (y, 0));
++ if (FRAMEADDR_P (XEXP (y, 1)))
++ XEXP (y, 1) = force_reg (GET_MODE (XEXP (y, 1)), XEXP (y, 1));
++ }
++ }
+ /* Perform machine-dependent transformations on X
+ in certain cases. This is not necessary since the code
+ below can handle all possible cases, but machine-dependent
+diff -uNr gcc-3.4.3.orig/gcc/expr.c gcc-3.4.3/gcc/expr.c
+--- gcc-3.4.3.orig/gcc/expr.c 2004-05-27 21:35:17.000000000 +0200
++++ gcc-3.4.3/gcc/expr.c 2004-11-24 18:35:31.000000000 +0100
+@@ -48,6 +48,7 @@
+ #include "intl.h"
+ #include "tm_p.h"
+ #include "target.h"
++#include "protector.h"
+
+ /* Decide whether a function's arguments should be processed
+ from first to last or from last to first.
+@@ -1060,7 +1061,11 @@
+
+ If ENDP is 0 return to, if ENDP is 1 return memory at the end ala
+ mempcpy, and if ENDP is 2 return memory the end minus one byte ala
+- stpcpy. */
++ stpcpy.
++
++ When the stack protector is used at the reverse move, it starts the move
++ instruction from the address within the region of a variable.
++ So it eliminates the first address decrement instruction. */
+
+ rtx
+ move_by_pieces (rtx to, rtx from, unsigned HOST_WIDE_INT len,
+@@ -1123,6 +1128,8 @@
+
+ if (USE_LOAD_PRE_DECREMENT (mode) && data.reverse && ! data.autinc_from)
+ {
++ if (flag_propolice_protection)
++ len = len - GET_MODE_SIZE (mode);
+ data.from_addr = copy_addr_to_reg (plus_constant (from_addr, len));
+ data.autinc_from = 1;
+ data.explicit_inc_from = -1;
+@@ -1137,6 +1144,8 @@
+ data.from_addr = copy_addr_to_reg (from_addr);
+ if (USE_STORE_PRE_DECREMENT (mode) && data.reverse && ! data.autinc_to)
+ {
++ if (flag_propolice_protection)
++ len = len - GET_MODE_SIZE (mode);
+ data.to_addr = copy_addr_to_reg (plus_constant (to_addr, len));
+ data.autinc_to = 1;
+ data.explicit_inc_to = -1;
+@@ -1280,11 +1289,15 @@
+ from1 = adjust_address (data->from, mode, data->offset);
+
+ if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0)
+- emit_insn (gen_add2_insn (data->to_addr,
+- GEN_INT (-(HOST_WIDE_INT)size)));
++ /* The stack protector skips the first address decrement instruction
++ at the reverse move. */
++ if (!flag_propolice_protection || data->explicit_inc_to < -1)
++ emit_insn (gen_add2_insn (data->to_addr,
++ GEN_INT (-(HOST_WIDE_INT)size)));
+ if (HAVE_PRE_DECREMENT && data->explicit_inc_from < 0)
+- emit_insn (gen_add2_insn (data->from_addr,
+- GEN_INT (-(HOST_WIDE_INT)size)));
++ if (!flag_propolice_protection || data->explicit_inc_from < -1)
++ emit_insn (gen_add2_insn (data->from_addr,
++ GEN_INT (-(HOST_WIDE_INT)size)));
+
+ if (data->to)
+ emit_insn ((*genfun) (to1, from1));
+@@ -2475,7 +2488,12 @@
+
+ if (USE_STORE_PRE_DECREMENT (mode) && data->reverse && ! data->autinc_to)
+ {
+- data->to_addr = copy_addr_to_reg (plus_constant (to_addr, data->len));
++ int len = data->len;
++ /* The stack protector starts the store instruction from
++ the address within the region of a variable. */
++ if (flag_propolice_protection)
++ len -= GET_MODE_SIZE (mode);
++ data->to_addr = copy_addr_to_reg (plus_constant (to_addr, len));
+ data->autinc_to = 1;
+ data->explicit_inc_to = -1;
+ }
+@@ -2544,8 +2562,11 @@
+ to1 = adjust_address (data->to, mode, data->offset);
+
+ if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0)
+- emit_insn (gen_add2_insn (data->to_addr,
+- GEN_INT (-(HOST_WIDE_INT) size)));
++ /* The stack protector skips the first address decrement instruction
++ at the reverse store. */
++ if (!flag_propolice_protection || data->explicit_inc_to < -1)
++ emit_insn (gen_add2_insn (data->to_addr,
++ GEN_INT (-(HOST_WIDE_INT) size)));
+
+ cst = (*data->constfun) (data->constfundata, data->offset, mode);
+ emit_insn ((*genfun) (to1, cst));
+@@ -5701,7 +5722,9 @@
+ && GET_CODE (XEXP (value, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (value, 0), 0)) == REG
+ && REGNO (XEXP (XEXP (value, 0), 0)) >= FIRST_VIRTUAL_REGISTER
+- && REGNO (XEXP (XEXP (value, 0), 0)) <= LAST_VIRTUAL_REGISTER)
++ && REGNO (XEXP (XEXP (value, 0), 0)) <= LAST_VIRTUAL_REGISTER
++ && (!flag_propolice_protection
++ || XEXP (XEXP (value, 0), 0) != virtual_stack_vars_rtx))
+ {
+ rtx temp = expand_simple_binop (GET_MODE (value), code,
+ XEXP (XEXP (value, 0), 0), op2,
+diff -uNr gcc-3.4.3.orig/gcc/flags.h gcc-3.4.3/gcc/flags.h
+--- gcc-3.4.3.orig/gcc/flags.h 2004-11-24 18:04:19.000000000 +0100
++++ gcc-3.4.3/gcc/flags.h 2004-11-24 18:35:31.492689688 +0100
+@@ -210,6 +210,10 @@
+
+ extern bool warn_strict_aliasing;
+
++/* Warn when not issuing stack smashing protection for some reason. */
++
++extern bool warn_stack_protector;
++
+ /* Nonzero if generating code to do profiling. */
+
+ extern int profile_flag;
+@@ -795,4 +799,12 @@
+ #define HONOR_SIGN_DEPENDENT_ROUNDING(MODE) \
+ (MODE_HAS_SIGN_DEPENDENT_ROUNDING (MODE) && flag_rounding_math)
+
++/* Nonzero means use propolice as a stack protection method. */
++
++extern int flag_propolice_protection;
++
++/* Nonzero means use a stack protection method for every function. */
++
++extern int flag_stack_protection;
++
+ #endif /* ! GCC_FLAGS_H */
+diff -uNr gcc-3.4.3.orig/gcc/function.c gcc-3.4.3/gcc/function.c
+--- gcc-3.4.3.orig/gcc/function.c 2004-10-14 01:18:13.000000000 +0200
++++ gcc-3.4.3/gcc/function.c 2004-11-24 18:35:31.542682088 +0100
+@@ -63,6 +63,7 @@
+ #include "integrate.h"
+ #include "langhooks.h"
+ #include "target.h"
++#include "protector.h"
+
+ #ifndef TRAMPOLINE_ALIGNMENT
+ #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
+@@ -155,6 +156,10 @@
+ /* Array of INSN_UIDs to hold the INSN_UIDs for each sibcall epilogue
+ in this function. */
+ static GTY(()) varray_type sibcall_epilogue;
++
++/* Current boundary mark for character arrays. */
++static int temp_boundary_mark = 0;
++
+ \f
+ /* In order to evaluate some expressions, such as function calls returning
+ structures in memory, we need to temporarily allocate stack locations.
+@@ -208,6 +213,8 @@
+ /* The size of the slot, including extra space for alignment. This
+ info is for combine_temp_slots. */
+ HOST_WIDE_INT full_size;
++ /* Boundary mark of a character array and the others. This info is for propolice. */
++ int boundary_mark;
+ };
+ \f
+ /* This structure is used to record MEMs or pseudos used to replace VAR, any
+@@ -638,6 +645,7 @@
+ whose lifetime is controlled by CLEANUP_POINT_EXPRs. KEEP is 3
+ if we are to allocate something at an inner level to be treated as
+ a variable in the block (e.g., a SAVE_EXPR).
++ KEEP is 5 if we allocate a place to return structure.
+
+ TYPE is the type that will be used for the stack slot. */
+
+@@ -648,6 +656,8 @@
+ unsigned int align;
+ struct temp_slot *p, *best_p = 0;
+ rtx slot;
++ int char_array = (flag_propolice_protection
++ && keep == 1 && search_string_def (type));
+
+ /* If SIZE is -1 it means that somebody tried to allocate a temporary
+ of a variable size. */
+@@ -673,7 +683,8 @@
+ && ! p->in_use
+ && objects_must_conflict_p (p->type, type)
+ && (best_p == 0 || best_p->size > p->size
+- || (best_p->size == p->size && best_p->align > p->align)))
++ || (best_p->size == p->size && best_p->align > p->align))
++ && (! char_array || p->boundary_mark != 0))
+ {
+ if (p->align == align && p->size == size)
+ {
+@@ -708,6 +719,7 @@
+ p->address = 0;
+ p->rtl_expr = 0;
+ p->type = best_p->type;
++ p->boundary_mark = best_p->boundary_mark;
+ p->next = temp_slots;
+ temp_slots = p;
+
+@@ -768,6 +780,7 @@
+ p->full_size = frame_offset - frame_offset_old;
+ #endif
+ p->address = 0;
++ p->boundary_mark = char_array ? ++temp_boundary_mark : 0;
+ p->next = temp_slots;
+ temp_slots = p;
+ }
+@@ -932,14 +945,16 @@
+ int delete_q = 0;
+ if (! q->in_use && GET_MODE (q->slot) == BLKmode)
+ {
+- if (p->base_offset + p->full_size == q->base_offset)
++ if (p->base_offset + p->full_size == q->base_offset &&
++ p->boundary_mark == q->boundary_mark)
+ {
+ /* Q comes after P; combine Q into P. */
+ p->size += q->size;
+ p->full_size += q->full_size;
+ delete_q = 1;
+ }
+- else if (q->base_offset + q->full_size == p->base_offset)
++ else if (q->base_offset + q->full_size == p->base_offset &&
++ p->boundary_mark == q->boundary_mark)
+ {
+ /* P comes after Q; combine P into Q. */
+ q->size += p->size;
+@@ -1449,7 +1464,9 @@
+ }
+
+ if (new == 0)
+- new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func);
++ new = function ?
++ assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func)
++ : assign_stack_local_for_pseudo_reg (decl_mode, GET_MODE_SIZE (decl_mode), 0);
+
+ PUT_CODE (reg, MEM);
+ PUT_MODE (reg, decl_mode);
+@@ -3937,10 +3954,13 @@
+ }
+
+ /* Otherwise copy the new constant into a register and replace
+- constant with that register. */
++ constant with that register.
++ At the use of stack protection, stop to replace the frame
++ offset with a register. */
+ temp = gen_reg_rtx (Pmode);
+ XEXP (x, 0) = new;
+- if (validate_change (object, &XEXP (x, 1), temp, 0))
++ if (validate_change (object, &XEXP (x, 1), temp, 0)
++ && !flag_propolice_protection)
+ emit_insn_before (gen_move_insn (temp, new_offset), object);
+ else
+ {
+diff -uNr gcc-3.4.3.orig/gcc/gcse.c gcc-3.4.3/gcc/gcse.c
+--- gcc-3.4.3.orig/gcc/gcse.c 2004-10-30 20:02:53.000000000 +0200
++++ gcc-3.4.3/gcc/gcse.c 2004-11-24 18:35:31.583675856 +0100
+@@ -4176,9 +4176,13 @@
+ continue;
+
+ /* Find an assignment that sets reg_used and is available
+- at the start of the block. */
++ at the start of the block.
++
++ Skip the copy propagation not to eliminate the register that is
++ the duplicated pointer of a function argument. It is used for
++ the function argument protection. */
+ set = find_avail_set (regno, insn);
+- if (! set)
++ if (! set || SET_VOLATILE_P (set->expr))
+ continue;
+
+ pat = set->expr;
+diff -uNr gcc-3.4.3.orig/gcc/integrate.c gcc-3.4.3/gcc/integrate.c
+--- gcc-3.4.3.orig/gcc/integrate.c 2004-01-24 00:36:00.000000000 +0100
++++ gcc-3.4.3/gcc/integrate.c 2004-11-24 18:35:31.603672816 +0100
+@@ -393,6 +393,11 @@
+ /* These args would always appear unused, if not for this. */
+ TREE_USED (copy) = 1;
+
++ /* The inlined variable is marked as INLINE not to change the location
++ by stack protector. */
++ if (flag_propolice_protection && TREE_CODE (copy) == VAR_DECL)
++ DECL_COPIED (copy) = 1;
++
+ /* Set the context for the new declaration. */
+ if (!DECL_CONTEXT (decl))
+ /* Globals stay global. */
+@@ -1970,6 +1975,12 @@
+
+ seq = get_insns ();
+ end_sequence ();
++#ifdef ARGS_GROWS_DOWNWARD
++ /* Mark this pointer as the top of the argument
++ block. The pointer minus one is in the block. */
++ if (flag_propolice_protection && GET_CODE (seq) == SET)
++ RTX_INTEGRATED_P (SET_SRC (seq)) = 1;
++#endif
+ emit_insn_after (seq, map->insns_at_start);
+ return temp;
+ }
+diff -uNr gcc-3.4.3.orig/gcc/libgcc2.c gcc-3.4.3/gcc/libgcc2.c
+--- gcc-3.4.3.orig/gcc/libgcc2.c 2004-09-26 22:47:14.000000000 +0200
++++ gcc-3.4.3/gcc/libgcc2.c 2004-11-24 18:35:31.627669168 +0100
+@@ -1678,3 +1678,124 @@
+ #endif /* no INIT_SECTION_ASM_OP and not CTOR_LISTS_DEFINED_EXTERNALLY */
+ #endif /* L_ctors */
+
++\f
++#ifdef L_stack_smash_handler
++#ifndef _LIBC_PROVIDES_SSP_
++#include <stdio.h>
++#include <string.h>
++#include <fcntl.h>
++#include <unistd.h>
++
++#ifdef _POSIX_SOURCE
++#include <signal.h>
++#endif
++
++#if defined(HAVE_SYSLOG)
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <sys/un.h>
++
++#include <sys/syslog.h>
++#ifndef _PATH_LOG
++#define _PATH_LOG "/dev/log"
++#endif
++#endif
++
++long __guard[8] = {0, 0, 0, 0, 0, 0, 0, 0};
++static void __guard_setup (void) __attribute__ ((constructor));
++
++static void
++__guard_setup (void)
++{
++ int fd;
++ if (__guard[0] != 0)
++ return;
++ fd = open ("/dev/urandom", 0);
++ if (fd != -1) {
++ ssize_t size = read (fd, (char*)&__guard, sizeof(__guard));
++ close (fd) ;
++ if (size == sizeof(__guard))
++ return;
++ }
++ /* If a random generator can't be used, the protector switches the guard
++ to the "terminator canary". */
++ ((char*)__guard)[0] = 0;
++ ((char*)__guard)[1] = 0;
++ ((char*)__guard)[2] = '\n';
++ ((char*)__guard)[3] = 255;
++}
++
++extern void __stack_smash_handler (char func[], ATTRIBUTE_UNUSED int damaged);
++void
++__stack_smash_handler (char func[], ATTRIBUTE_UNUSED int damaged)
++{
++#if defined (__GNU_LIBRARY__)
++ extern char * __progname;
++#endif
++ const char message[] = ": stack smashing attack in function ";
++ int bufsz = 256, len;
++ char buf[bufsz];
++#if defined(HAVE_SYSLOG)
++ int log_file;
++ struct sockaddr_un sys_log_addr; /* AF_UNIX address of local logger. */
++#endif
++#ifdef _POSIX_SOURCE
++ {
++ sigset_t mask;
++ sigfillset (&mask);
++ /* Block all signal handlers except SIGABRT. */
++ sigdelset (&mask, SIGABRT);
++ sigprocmask (SIG_BLOCK, &mask, NULL);
++ }
++#endif
++
++ /* send LOG_CRIT. */
++ strcpy (buf, "<2>"); len=3;
++#if defined (__GNU_LIBRARY__)
++ strncat (buf, __progname, bufsz - len - 1);
++ len = strlen (buf);
++#endif
++ if (bufsz > len)
++ {
++ strncat (buf, message, bufsz - len - 1);
++ len = strlen (buf);
++ }
++ if (bufsz > len)
++ {
++ strncat (buf, func, bufsz - len - 1);
++ len = strlen (buf);
++ }
++
++ /* Print error message. */
++ write (STDERR_FILENO, buf + 3, len - 3);
++#if defined(HAVE_SYSLOG)
++ if ((log_file = socket (AF_UNIX, SOCK_DGRAM, 0)) != -1)
++ {
++
++ /* Send "found" message to the "/dev/log" path. */
++ sys_log_addr.sun_family = AF_UNIX;
++ (void)strncpy (sys_log_addr.sun_path, _PATH_LOG,
++ sizeof (sys_log_addr.sun_path) - 1);
++ sys_log_addr.sun_path[sizeof (sys_log_addr.sun_path) - 1] = '\0';
++ sendto(log_file, buf, len, 0, (struct sockaddr *)&sys_log_addr,
++ sizeof (sys_log_addr));
++ }
++#endif
++
++#ifdef _POSIX_SOURCE
++ {
++ /* Make sure the default handler is associated with SIGABRT. */
++ struct sigaction sa;
++
++ memset (&sa, 0, sizeof(struct sigaction));
++ sigfillset (&sa.sa_mask); /* Block all signals. */
++ sa.sa_flags = 0;
++ sa.sa_handler = SIG_DFL;
++ sigaction (SIGABRT, &sa, NULL);
++ (void)kill (getpid(), SIGABRT);
++ }
++#endif
++ _exit (127);
++}
++#endif /* _LIBC_PROVIDES_SSP_ */
++#endif /* L_stack_smash_handler */
+diff -uNr gcc-3.4.3.orig/gcc/libgcc-std.ver gcc-3.4.3/gcc/libgcc-std.ver
+--- gcc-3.4.3.orig/gcc/libgcc-std.ver 2004-09-01 21:14:33.000000000 +0200
++++ gcc-3.4.3/gcc/libgcc-std.ver 2004-11-24 18:35:31.620670232 +0100
+@@ -174,6 +174,12 @@
+ _Unwind_SjLj_RaiseException
+ _Unwind_SjLj_ForcedUnwind
+ _Unwind_SjLj_Resume
++
++%if !defined(_LIBC_PROVIDES_SSP_)
++ # stack smash handler symbols
++ __guard
++ __stack_smash_handler
++%endif
+ }
+
+ %inherit GCC_3.3 GCC_3.0
+diff -uNr gcc-3.4.3.orig/gcc/loop.c gcc-3.4.3/gcc/loop.c
+--- gcc-3.4.3.orig/gcc/loop.c 2004-07-13 17:29:08.000000000 +0200
++++ gcc-3.4.3/gcc/loop.c 2004-11-24 18:35:31.680661112 +0100
+@@ -6514,6 +6514,14 @@
+ if (GET_CODE (*mult_val) == USE)
+ *mult_val = XEXP (*mult_val, 0);
+
++#ifndef FRAME_GROWS_DOWNWARD
++ if (flag_propolice_protection
++ && GET_CODE (*add_val) == PLUS
++ && (XEXP (*add_val, 0) == frame_pointer_rtx
++ || XEXP (*add_val, 1) == frame_pointer_rtx))
++ return 0;
++#endif
++
+ if (is_addr)
+ *pbenefit += address_cost (orig_x, addr_mode) - reg_address_cost;
+ else
+diff -uNr gcc-3.4.3.orig/gcc/Makefile.in gcc-3.4.3/gcc/Makefile.in
+--- gcc-3.4.3.orig/gcc/Makefile.in 2004-11-24 18:04:18.000000000 +0100
++++ gcc-3.4.3/gcc/Makefile.in 2004-11-24 18:35:31.038758696 +0100
+@@ -867,7 +867,7 @@
+ sibcall.o simplify-rtx.o sreal.o stmt.o stor-layout.o stringpool.o \
+ targhooks.o timevar.o toplev.o tracer.o tree.o tree-dump.o unroll.o \
+ varasm.o varray.o version.o vmsdbgout.o xcoffout.o alloc-pool.o \
+- et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) web.o
++ et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) web.o protector.o
+
+ OBJS-md = $(out_object_file)
+ OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) hashtable.o tree-inline.o \
+@@ -1549,7 +1549,7 @@
+ langhooks.h insn-flags.h cfglayout.h real.h cfgloop.h \
+ hosthooks.h $(LANGHOOKS_DEF_H) cgraph.h $(COVERAGE_H) alloc-pool.h
+ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+- -DTARGET_NAME=\"$(target_noncanonical)\" \
++ -DTARGET_NAME=\"$(target_noncanonical)\" @ENABLESSP@ \
+ -c $(srcdir)/toplev.c $(OUTPUT_OPTION)
+ main.o : main.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h
+
+@@ -1852,6 +1852,10 @@
+ params.o : params.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(PARAMS_H) toplev.h
+ hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H)
+ pretty-print.o: $(CONFIG_H) $(SYSTEM_H) pretty-print.c $(PRETTY_PRINT_H)
++protector.o : protector.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
++ flags.h function.h $(EXPR_H) $(OPTABS_H) $(REGS_H) toplev.h hard-reg-set.h \
++ insn-config.h insn-flags.h $(RECOG_H) output.h toplev.h except.h reload.h \
++ $(TM_P_H) conditions.h $(INSN_ATTR_H) real.h protector.h
+
+ $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) $(GGC_H) \
+ $(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \
+diff -uNr gcc-3.4.3.orig/gcc/mklibgcc.in gcc-3.4.3/gcc/mklibgcc.in
+--- gcc-3.4.3.orig/gcc/mklibgcc.in 2004-10-18 18:00:43.000000000 +0200
++++ gcc-3.4.3/gcc/mklibgcc.in 2004-11-24 18:35:31.699658224 +0100
+@@ -57,7 +57,7 @@
+ _enable_execute_stack _trampoline __main _absvsi2 _absvdi2 _addvsi3
+ _addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors
+ _ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2 _popcount_tab
+- _popcountsi2 _popcountdi2 _paritysi2 _paritydi2'
++ _popcountsi2 _popcountdi2 _paritysi2 _paritydi2 _stack_smash_handler'
+
+ # Disable SHLIB_LINK if shared libgcc not enabled.
+ if [ "@enable_shared@" = "no" ]; then
+diff -uNr gcc-3.4.3.orig/gcc/optabs.c gcc-3.4.3/gcc/optabs.c
+--- gcc-3.4.3.orig/gcc/optabs.c 2004-03-03 01:45:01.000000000 +0100
++++ gcc-3.4.3/gcc/optabs.c 2004-11-24 18:35:31.739652144 +0100
+@@ -678,6 +678,27 @@
+ if (target)
+ target = protect_from_queue (target, 1);
+
++ /* Keep the frame and offset pattern at the use of stack protection. */
++ if (flag_propolice_protection
++ && binoptab->code == PLUS
++ && op0 == virtual_stack_vars_rtx
++ && GET_CODE(op1) == CONST_INT)
++ {
++ int icode = (int) binoptab->handlers[(int) mode].insn_code;
++ if (target)
++ temp = target;
++ else
++ temp = gen_reg_rtx (mode);
++
++ if (! (*insn_data[icode].operand[0].predicate) (temp, mode)
++ || GET_CODE (temp) != REG)
++ temp = gen_reg_rtx (mode);
++
++ emit_insn (gen_rtx_SET (VOIDmode, temp,
++ gen_rtx_PLUS (GET_MODE (op0), op0, op1)));
++ return temp;
++ }
++
+ if (flag_force_mem)
+ {
+ /* Load duplicate non-volatile operands once. */
+diff -uNr gcc-3.4.3.orig/gcc/opts.c gcc-3.4.3/gcc/opts.c
+--- gcc-3.4.3.orig/gcc/opts.c 2004-11-24 18:04:19.000000000 +0100
++++ gcc-3.4.3/gcc/opts.c 2004-11-24 18:35:31.762648648 +0100
+@@ -125,6 +125,9 @@
+ bool warn_unused_variable;
+ bool warn_unused_value;
+
++/* Warn when not issuing stack smashing protection for some reason */
++bool warn_stack_protector;
++
+ /* Hack for cooperation between set_Wunused and set_Wextra. */
+ static bool maybe_warn_unused_parameter;
+
+@@ -804,6 +807,10 @@
+ warn_unused_variable = value;
+ break;
+
++ case OPT_Wstack_protector:
++ warn_stack_protector = value;
++ break;
++
+ case OPT_aux_info:
+ case OPT_aux_info_:
+ aux_info_file_name = arg;
+@@ -1367,6 +1374,14 @@
+ stack_limit_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (arg));
+ break;
+
++ case OPT_fstack_protector:
++ flag_propolice_protection = value;
++ break;
++
++ case OPT_fstack_protector_all:
++ flag_stack_protection = value;
++ break;
++
+ case OPT_fstrength_reduce:
+ flag_strength_reduce = value;
+ break;
+diff -uNr gcc-3.4.3.orig/gcc/protector.c gcc-3.4.3/gcc/protector.c
+--- gcc-3.4.3.orig/gcc/protector.c 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.3/gcc/protector.c 2004-09-02 11:36:11.000000000 +0200
+@@ -0,0 +1,2730 @@
++/* RTL buffer overflow protection function for GNU C compiler
++ Copyright (C) 2003 Free Software Foundation, Inc.
++
++This file is part of GCC.
++
++GCC is free software; you can redistribute it and/or modify it under
++the terms of the GNU General Public License as published by the Free
++Software Foundation; either version 2, or (at your option) any later
++version.
++
++GCC is distributed in the hope that it will be useful, but WITHOUT ANY
++WARRANTY; without even the implied warranty of MERCHANTABILITY or
++FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++for more details.
++
++You should have received a copy of the GNU General Public License
++along with GCC; see the file COPYING. If not, write to the Free
++Software Foundation, 59 Temple Place - Suite 330, Boston, MA
++02111-1307, USA. */
++
++/* This file contains several memory arrangement functions to protect
++ the return address and the frame pointer of the stack
++ from a stack-smashing attack. It also
++ provides the function that protects pointer variables. */
++
++#include "config.h"
++#include "system.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "machmode.h"
++#include "real.h"
++#include "rtl.h"
++#include "tree.h"
++#include "regs.h"
++#include "flags.h"
++#include "insn-config.h"
++#include "insn-flags.h"
++#include "expr.h"
++#include "output.h"
++#include "recog.h"
++#include "hard-reg-set.h"
++#include "except.h"
++#include "function.h"
++#include "toplev.h"
++#include "tm_p.h"
++#include "conditions.h"
++#include "insn-attr.h"
++#include "optabs.h"
++#include "reload.h"
++#include "protector.h"
++
++
++/* Round a value to the lowest integer less than it that is a multiple of
++ the required alignment. Avoid using division in case the value is
++ negative. Assume the alignment is a power of two. */
++#define FLOOR_ROUND(VALUE,ALIGN) ((VALUE) & ~((ALIGN) - 1))
++
++/* Similar, but round to the next highest integer that meets the
++ alignment. */
++#define CEIL_ROUND(VALUE,ALIGN) (((VALUE) + (ALIGN) - 1) & ~((ALIGN)- 1))
++
++
++/* Nonzero if function being compiled can define string buffers that may be
++ damaged by the stack-smash attack. */
++static int current_function_defines_vulnerable_string;
++static int current_function_defines_short_string;
++static int current_function_has_variable_string;
++static int current_function_defines_vsized_array;
++static int current_function_is_inlinable;
++
++/* Nonzero if search_string_def finds the variable which contains an array. */
++static int is_array;
++
++/* Nonzero if search_string_def finds a byte-pointer variable,
++ which may be assigned to alloca output. */
++static int may_have_alloca_pointer;
++
++static rtx guard_area, _guard;
++static rtx function_first_insn, prologue_insert_point;
++
++/* Offset to end of sweeped area for gathering character arrays. */
++static HOST_WIDE_INT sweep_frame_offset;
++
++/* Offset to end of allocated area for instantiating pseudo registers. */
++static HOST_WIDE_INT push_allocated_offset = 0;
++
++/* Offset to end of assigned area for instantiating pseudo registers. */
++static HOST_WIDE_INT push_frame_offset = 0;
++
++/* Set to 1 after cse_not_expected becomes nonzero. it is used to identify
++ which stage assign_stack_local_for_pseudo_reg is called from. */
++static int saved_cse_not_expected = 0;
++
++static int search_string_from_argsandvars (int);
++static int search_string_from_local_vars (tree);
++static int search_pointer_def (tree);
++static int search_func_pointer (tree);
++static int check_used_flag (rtx);
++static void reset_used_flags_for_insns (rtx);
++static void reset_used_flags_for_decls (tree);
++static void reset_used_flags_of_plus (rtx);
++static void rtl_prologue (rtx);
++static void rtl_epilogue (rtx);
++static void arrange_var_order (tree);
++static void copy_args_for_protection (void);
++static void sweep_string_variable (rtx, HOST_WIDE_INT);
++static void sweep_string_in_decls (tree, HOST_WIDE_INT, HOST_WIDE_INT);
++static void sweep_string_in_args (tree, HOST_WIDE_INT, HOST_WIDE_INT);
++static void sweep_string_use_of_insns (rtx, HOST_WIDE_INT, HOST_WIDE_INT);
++static void sweep_string_in_operand (rtx, rtx *, HOST_WIDE_INT, HOST_WIDE_INT);
++static void move_arg_location (rtx, rtx, rtx, HOST_WIDE_INT);
++static void change_arg_use_of_insns (rtx, rtx, rtx *, HOST_WIDE_INT);
++static void change_arg_use_in_operand (rtx, rtx, rtx, rtx *, HOST_WIDE_INT);
++static void validate_insns_of_varrefs (rtx);
++static void validate_operand_of_varrefs (rtx, rtx *);
++
++/* Specify which size of buffers should be protected from a stack smashing
++ attack. Because small buffers are not used in situations which may
++ overflow buffer, the default size sets to the size of 64 bit register. */
++#ifndef SUSPICIOUS_BUF_SIZE
++#define SUSPICIOUS_BUF_SIZE 8
++#endif
++
++#define AUTO_BASEPTR(X) \
++ (GET_CODE (X) == PLUS ? XEXP (X, 0) : X)
++#define AUTO_OFFSET(X) \
++ (GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0)
++#undef PARM_PASSED_IN_MEMORY
++#define PARM_PASSED_IN_MEMORY(PARM) \
++ (GET_CODE (DECL_INCOMING_RTL (PARM)) == MEM)
++#define TREE_VISITED(NODE) ((NODE)->common.unused_0)
++
++/* Argument values for calling search_string_from_argsandvars. */
++#define CALL_FROM_PREPARE_STACK_PROTECTION 0
++#define CALL_FROM_PUSH_FRAME 1
++
++
++/* Prepare several stack protection instruments for the current function
++ if the function has an array as a local variable, which may be vulnerable
++ from a stack smashing attack, and it is not inlinable.
++
++ The overall steps are as follows;
++ (1)search an array,
++ (2)insert guard_area on the stack,
++ (3)duplicate pointer arguments into local variables, and
++ (4)arrange the location of local variables. */
++void
++prepare_stack_protection (int inlinable)
++{
++ tree blocks = DECL_INITIAL (current_function_decl);
++ current_function_is_inlinable = inlinable && !flag_no_inline;
++ push_frame_offset = push_allocated_offset = 0;
++ saved_cse_not_expected = 0;
++
++ /* Skip the protection if the function has no block
++ or it is an inline function. */
++ if (current_function_is_inlinable)
++ validate_insns_of_varrefs (get_insns ());
++ if (! blocks || current_function_is_inlinable)
++ return;
++
++ current_function_defines_vulnerable_string
++ = search_string_from_argsandvars (CALL_FROM_PREPARE_STACK_PROTECTION);
++
++ if (current_function_defines_vulnerable_string
++ || flag_stack_protection)
++ {
++ function_first_insn = get_insns ();
++
++ if (current_function_contains_functions)
++ {
++ if (warn_stack_protector)
++ warning ("not protecting function: it contains functions");
++ return;
++ }
++
++ /* Initialize recognition, indicating that volatile is OK. */
++ init_recog ();
++
++ sweep_frame_offset = 0;
++
++#ifdef STACK_GROWS_DOWNWARD
++ /* frame_offset: offset to end of allocated area of stack frame.
++ It is defined in the function.c. */
++
++ /* the location must be before buffers. */
++ guard_area = assign_stack_local (BLKmode, UNITS_PER_GUARD, -1);
++ PUT_MODE (guard_area, GUARD_m);
++ MEM_VOLATILE_P (guard_area) = 1;
++
++#ifndef FRAME_GROWS_DOWNWARD
++ sweep_frame_offset = frame_offset;
++#endif
++
++ /* For making room for guard value, scan all insns and fix the offset
++ address of the variable that is based on frame pointer.
++ Scan all declarations of variables and fix the offset address
++ of the variable that is based on the frame pointer. */
++ sweep_string_variable (guard_area, UNITS_PER_GUARD);
++
++
++ /* the location of guard area moves to the beginning of stack frame. */
++ if (AUTO_OFFSET(XEXP (guard_area, 0)))
++ XEXP (XEXP (guard_area, 0), 1)
++ = gen_rtx_CONST_INT (VOIDmode, sweep_frame_offset);
++
++
++ /* Insert prologue rtl instructions. */
++ rtl_prologue (function_first_insn);
++
++ if (! current_function_has_variable_string)
++ {
++ /* Generate argument saving instruction. */
++ copy_args_for_protection ();
++
++#ifndef FRAME_GROWS_DOWNWARD
++ /* If frame grows upward, character arrays for protecting args
++ may copy to the top of the guard variable.
++ So sweep the guard variable again. */
++ sweep_frame_offset = CEIL_ROUND (frame_offset,
++ BIGGEST_ALIGNMENT / BITS_PER_UNIT);
++ sweep_string_variable (guard_area, UNITS_PER_GUARD);
++#endif
++ }
++ /* Variable can't be protected from the overflow of variable length
++ buffer. But variable reordering is still effective against
++ the overflow of fixed size character arrays. */
++ else if (warn_stack_protector)
++ warning ("not protecting variables: it has a variable length buffer");
++#endif
++#ifndef FRAME_GROWS_DOWNWARD
++ if (STARTING_FRAME_OFFSET == 0)
++ {
++ /* This part may be only for alpha. */
++ push_allocated_offset = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
++ assign_stack_local (BLKmode, push_allocated_offset, -1);
++ sweep_frame_offset = frame_offset;
++ sweep_string_variable (const0_rtx, -push_allocated_offset);
++ sweep_frame_offset = AUTO_OFFSET (XEXP (guard_area, 0));
++ }
++#endif
++
++ /* Arrange the order of local variables. */
++ arrange_var_order (blocks);
++
++#ifdef STACK_GROWS_DOWNWARD
++ /* Insert epilogue rtl instructions. */
++ rtl_epilogue (get_last_insn ());
++#endif
++ init_recog_no_volatile ();
++ }
++ else if (current_function_defines_short_string
++ && warn_stack_protector)
++ warning ("not protecting function: buffer is less than %d bytes long",
++ SUSPICIOUS_BUF_SIZE);
++}
++
++/*
++ Search string from arguments and local variables.
++ caller: CALL_FROM_PREPARE_STACK_PROTECTION (0)
++ CALL_FROM_PUSH_FRAME (1)
++*/
++static int
++search_string_from_argsandvars (int caller)
++{
++ tree blocks, parms;
++ int string_p;
++
++ /* Saves a latest search result as a cached infomation. */
++ static tree __latest_search_decl = 0;
++ static int __latest_search_result = FALSE;
++
++ if (__latest_search_decl == current_function_decl)
++ return __latest_search_result;
++ else
++ if (caller == CALL_FROM_PUSH_FRAME)
++ return FALSE;
++
++ __latest_search_decl = current_function_decl;
++ __latest_search_result = TRUE;
++
++ current_function_defines_short_string = FALSE;
++ current_function_has_variable_string = FALSE;
++ current_function_defines_vsized_array = FALSE;
++ may_have_alloca_pointer = FALSE;
++
++ /* Search a string variable from local variables. */
++ blocks = DECL_INITIAL (current_function_decl);
++ string_p = search_string_from_local_vars (blocks);
++
++ if (! current_function_defines_vsized_array
++ && may_have_alloca_pointer
++ && current_function_calls_alloca)
++ {
++ current_function_has_variable_string = TRUE;
++ return TRUE;
++ }
++
++ if (string_p)
++ return TRUE;
++
++#ifdef STACK_GROWS_DOWNWARD
++ /* Search a string variable from arguments. */
++ parms = DECL_ARGUMENTS (current_function_decl);
++
++ for (; parms; parms = TREE_CHAIN (parms))
++ if (DECL_NAME (parms) && TREE_TYPE (parms) != error_mark_node)
++ {
++ if (PARM_PASSED_IN_MEMORY (parms))
++ {
++ string_p = search_string_def (TREE_TYPE(parms));
++ if (string_p)
++ return TRUE;
++ }
++ }
++#endif
++
++ __latest_search_result = FALSE;
++ return FALSE;
++}
++
++
++/* Search string from local variables in the specified scope. */
++static int
++search_string_from_local_vars (tree block)
++{
++ tree types;
++ int found = FALSE;
++
++ while (block && TREE_CODE(block)==BLOCK)
++ {
++ for (types = BLOCK_VARS(block); types; types = TREE_CHAIN(types))
++ {
++ /* Skip the declaration that refers an external variable. */
++ /* name: types.decl.name.identifier.id */
++ if (! DECL_EXTERNAL (types) && ! TREE_STATIC (types)
++ && TREE_CODE (types) == VAR_DECL
++ && ! DECL_ARTIFICIAL (types)
++ && DECL_RTL_SET_P (types)
++ && GET_CODE (DECL_RTL (types)) == MEM
++
++ && search_string_def (TREE_TYPE (types)))
++ {
++ rtx home = DECL_RTL (types);
++
++ if (GET_CODE (home) == MEM
++ && (GET_CODE (XEXP (home, 0)) == MEM
++ || (GET_CODE (XEXP (home, 0)) == REG
++ && XEXP (home, 0) != virtual_stack_vars_rtx
++ && REGNO (XEXP (home, 0)) != HARD_FRAME_POINTER_REGNUM
++ && REGNO (XEXP (home, 0)) != STACK_POINTER_REGNUM
++#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
++ && REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM
++#endif
++ )))
++ /* If the value is indirect by memory or by a register
++ that isn't the frame pointer then it means the object is
++ variable-sized and address through
++ that register or stack slot.
++ The protection has no way to hide pointer variables
++ behind the array, so all we can do is staying
++ the order of variables and arguments. */
++ {
++ current_function_has_variable_string = TRUE;
++ }
++
++ /* Found character array. */
++ found = TRUE;
++ }
++ }
++
++ if (search_string_from_local_vars (BLOCK_SUBBLOCKS (block)))
++ {
++ found = TRUE;
++ }
++
++ block = BLOCK_CHAIN (block);
++ }
++
++ return found;
++}
++
++
++/* Search a character array from the specified type tree. */
++int
++search_string_def (tree type)
++{
++ tree tem;
++
++ if (! type)
++ return FALSE;
++
++ switch (TREE_CODE (type))
++ {
++ case ARRAY_TYPE:
++ /* Check if the array is a variable-sized array. */
++ if (TYPE_DOMAIN (type) == 0
++ || (TYPE_MAX_VALUE (TYPE_DOMAIN (type)) != 0
++ && TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) == NOP_EXPR))
++ current_function_defines_vsized_array = TRUE;
++
++ /* Check if the array is related to char array. */
++ if (TYPE_MAIN_VARIANT (TREE_TYPE(type)) == char_type_node
++ || TYPE_MAIN_VARIANT (TREE_TYPE(type)) == signed_char_type_node
++ || TYPE_MAIN_VARIANT (TREE_TYPE(type)) == unsigned_char_type_node)
++ {
++ /* Check if the string is a variable string. */
++ if (TYPE_DOMAIN (type) == 0
++ || (TYPE_MAX_VALUE (TYPE_DOMAIN (type)) != 0
++ && TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) == NOP_EXPR))
++ return TRUE;
++
++ /* Check if the string size is greater than SUSPICIOUS_BUF_SIZE. */
++ if (TYPE_MAX_VALUE (TYPE_DOMAIN (type)) != 0
++ && (TREE_INT_CST_LOW(TYPE_MAX_VALUE(TYPE_DOMAIN(type)))+1
++ >= SUSPICIOUS_BUF_SIZE))
++ return TRUE;
++
++ current_function_defines_short_string = TRUE;
++ }
++
++ /* to protect every functions, sweep any arrays to the frame top. */
++ is_array = TRUE;
++
++ return search_string_def(TREE_TYPE(type));
++
++ case UNION_TYPE:
++ case QUAL_UNION_TYPE:
++ case RECORD_TYPE:
++ /* Check if each field has character arrays. */
++ for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
++ {
++ /* Omit here local type decls until we know how to support them. */
++ if ((TREE_CODE (tem) == TYPE_DECL)
++ || (TREE_CODE (tem) == VAR_DECL && TREE_STATIC (tem)))
++ continue;
++
++ if (search_string_def(TREE_TYPE(tem)))
++ return TRUE;
++ }
++ break;
++
++ case POINTER_TYPE:
++ /* Check if pointer variables, which may be a pointer assigned
++ by alloca function call, are declared. */
++ if (TYPE_MAIN_VARIANT (TREE_TYPE(type)) == char_type_node
++ || TYPE_MAIN_VARIANT (TREE_TYPE(type)) == signed_char_type_node
++ || TYPE_MAIN_VARIANT (TREE_TYPE(type)) == unsigned_char_type_node)
++ may_have_alloca_pointer = TRUE;
++ break;
++
++ case REFERENCE_TYPE:
++ case OFFSET_TYPE:
++ default:
++ break;
++ }
++
++ return FALSE;
++}
++
++
++/* Examine whether the input contains frame pointer addressing. */
++int
++contains_fp (rtx op)
++{
++ enum rtx_code code;
++ rtx x;
++ int i, j;
++ const char *fmt;
++
++ x = op;
++ if (x == 0)
++ return FALSE;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case CONST:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case REG:
++ case ADDRESSOF:
++ return FALSE;
++
++ case MEM:
++ /* This case is not generated at the stack protection.
++ see plus_constant_wide and simplify_plus_minus function. */
++ if (XEXP (x, 0) == virtual_stack_vars_rtx)
++ abort ();
++
++ case PLUS:
++ if (XEXP (x, 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (x, 1)) == CONST_INT)
++ return TRUE;
++
++ default:
++ break;
++ }
++
++ /* Scan all subexpressions. */
++ fmt = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
++ if (*fmt == 'e')
++ {
++ if (contains_fp (XEXP (x, i)))
++ return TRUE;
++ }
++ else if (*fmt == 'E')
++ for (j = 0; j < XVECLEN (x, i); j++)
++ if (contains_fp (XVECEXP (x, i, j)))
++ return TRUE;
++
++ return FALSE;
++}
++
++
++/* Examine whether the input contains any pointer. */
++static int
++search_pointer_def (tree type)
++{
++ tree tem;
++
++ if (! type)
++ return FALSE;
++
++ switch (TREE_CODE (type))
++ {
++ case UNION_TYPE:
++ case QUAL_UNION_TYPE:
++ case RECORD_TYPE:
++ /* Check if each field has a pointer. */
++ for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
++ {
++ if ((TREE_CODE (tem) == TYPE_DECL)
++ || (TREE_CODE (tem) == VAR_DECL && TREE_STATIC (tem)))
++ continue;
++
++ if (search_pointer_def (TREE_TYPE(tem)))
++ return TRUE;
++ }
++ break;
++
++ case ARRAY_TYPE:
++ return search_pointer_def (TREE_TYPE(type));
++
++ case POINTER_TYPE:
++ case REFERENCE_TYPE:
++ case OFFSET_TYPE:
++ if (TYPE_READONLY (TREE_TYPE (type)))
++ {
++ /* If this pointer contains function pointer,
++ it should be protected. */
++ return search_func_pointer (TREE_TYPE (type));
++ }
++ return TRUE;
++
++ default:
++ break;
++ }
++
++ return FALSE;
++}
++
++
++/* Examine whether the input contains function pointer. */
++static int
++search_func_pointer (tree type)
++{
++ tree tem;
++
++ if (! type)
++ return FALSE;
++
++ switch (TREE_CODE (type))
++ {
++ case UNION_TYPE:
++ case QUAL_UNION_TYPE:
++ case RECORD_TYPE:
++ if (! TREE_VISITED (type))
++ {
++ /* Mark the type as having been visited already. */
++ TREE_VISITED (type) = 1;
++
++ /* Check if each field has a function pointer. */
++ for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
++ {
++ if (TREE_CODE (tem) == FIELD_DECL
++ && search_func_pointer (TREE_TYPE(tem)))
++ {
++ TREE_VISITED (type) = 0;
++ return TRUE;
++ }
++ }
++
++ TREE_VISITED (type) = 0;
++ }
++ break;
++
++ case ARRAY_TYPE:
++ return search_func_pointer (TREE_TYPE(type));
++
++ case POINTER_TYPE:
++ case REFERENCE_TYPE:
++ case OFFSET_TYPE:
++ if (TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE)
++ return TRUE;
++ return search_func_pointer (TREE_TYPE(type));
++
++ default:
++ break;
++ }
++
++ return FALSE;
++}
++
++
++/* Check whether the specified rtx contains PLUS rtx with used flag. */
++static int
++check_used_flag (rtx x)
++{
++ register int i, j;
++ register enum rtx_code code;
++ register const char *format_ptr;
++
++ if (x == 0)
++ return FALSE;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case REG:
++ case QUEUED:
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ return FALSE;
++
++ case PLUS:
++ if (x->used)
++ return TRUE;
++
++ default:
++ break;
++ }
++
++ format_ptr = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++)
++ {
++ switch (*format_ptr++)
++ {
++ case 'e':
++ if (check_used_flag (XEXP (x, i)))
++ return TRUE;
++ break;
++
++ case 'E':
++ for (j = 0; j < XVECLEN (x, i); j++)
++ if (check_used_flag (XVECEXP (x, i, j)))
++ return TRUE;
++ break;
++ }
++ }
++
++ return FALSE;
++}
++
++
++/* Reset used flag of every insns after the spcecified insn. */
++static void
++reset_used_flags_for_insns (rtx insn)
++{
++ int i, j;
++ enum rtx_code code;
++ const char *format_ptr;
++
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
++ || GET_CODE (insn) == CALL_INSN)
++ {
++ code = GET_CODE (insn);
++ insn->used = 0;
++ format_ptr = GET_RTX_FORMAT (code);
++
++ for (i = 0; i < GET_RTX_LENGTH (code); i++)
++ {
++ switch (*format_ptr++)
++ {
++ case 'e':
++ reset_used_flags_of_plus (XEXP (insn, i));
++ break;
++
++ case 'E':
++ for (j = 0; j < XVECLEN (insn, i); j++)
++ reset_used_flags_of_plus (XVECEXP (insn, i, j));
++ break;
++ }
++ }
++ }
++}
++
++
++/* Reset used flag of every variables in the specified block. */
++static void
++reset_used_flags_for_decls (tree block)
++{
++ tree types;
++ rtx home;
++
++ while (block && TREE_CODE(block)==BLOCK)
++ {
++ types = BLOCK_VARS(block);
++
++ for (types= BLOCK_VARS(block); types; types = TREE_CHAIN(types))
++ {
++ /* Skip the declaration that refers an external variable and
++ also skip an global variable. */
++ if (! DECL_EXTERNAL (types))
++ {
++ if (! DECL_RTL_SET_P (types))
++ continue;
++ home = DECL_RTL (types);
++
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == PLUS
++ && GET_CODE (XEXP (XEXP (home, 0), 1)) == CONST_INT)
++ {
++ XEXP (home, 0)->used = 0;
++ }
++ }
++ }
++
++ reset_used_flags_for_decls (BLOCK_SUBBLOCKS (block));
++
++ block = BLOCK_CHAIN (block);
++ }
++}
++
++
++/* Reset the used flag of every PLUS rtx derived from the specified rtx. */
++static void
++reset_used_flags_of_plus (rtx x)
++{
++ int i, j;
++ enum rtx_code code;
++ const char *format_ptr;
++
++ if (x == 0)
++ return;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ /* These types may be freely shared so we needn't do any resetting
++ for them. */
++ case REG:
++ case QUEUED:
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ return;
++
++ case INSN:
++ case JUMP_INSN:
++ case CALL_INSN:
++ case NOTE:
++ case LABEL_REF:
++ case BARRIER:
++ /* The chain of insns is not being copied. */
++ return;
++
++ case PLUS:
++ x->used = 0;
++ break;
++
++ case CALL_PLACEHOLDER:
++ reset_used_flags_for_insns (XEXP (x, 0));
++ reset_used_flags_for_insns (XEXP (x, 1));
++ reset_used_flags_for_insns (XEXP (x, 2));
++ break;
++
++ default:
++ break;
++ }
++
++ format_ptr = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++)
++ {
++ switch (*format_ptr++)
++ {
++ case 'e':
++ reset_used_flags_of_plus (XEXP (x, i));
++ break;
++
++ case 'E':
++ for (j = 0; j < XVECLEN (x, i); j++)
++ reset_used_flags_of_plus (XVECEXP (x, i, j));
++ break;
++ }
++ }
++}
++
++
++/* Generate the prologue insns of the protector into the specified insn. */
++static void
++rtl_prologue (rtx insn)
++{
++#if defined(INIT_SECTION_ASM_OP) && !defined(INVOKE__main)
++#undef HAS_INIT_SECTION
++#define HAS_INIT_SECTION
++#endif
++
++ rtx _val;
++
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == NOTE
++ && NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG)
++ break;
++
++#if !defined (HAS_INIT_SECTION)
++ /* If this function is `main', skip a call to `__main'
++ to run guard instruments after global initializers, etc. */
++ if (DECL_NAME (current_function_decl)
++ && MAIN_NAME_P (DECL_NAME (current_function_decl))
++ && DECL_CONTEXT (current_function_decl) == NULL_TREE)
++ {
++ rtx fbinsn = insn;
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == NOTE
++ && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG)
++ break;
++ if (insn == 0)
++ insn = fbinsn;
++ }
++#endif
++
++ /* Mark the next insn of FUNCTION_BEG insn. */
++ prologue_insert_point = NEXT_INSN (insn);
++
++ start_sequence ();
++
++ _guard = gen_rtx_MEM (GUARD_m, gen_rtx_SYMBOL_REF (Pmode, "__guard"));
++ emit_move_insn ( guard_area, _guard);
++
++ _val = get_insns ();
++ end_sequence ();
++
++ emit_insn_before (_val, prologue_insert_point);
++}
++
++
++/* Generate the epilogue insns of the protector into the specified insn. */
++static void
++rtl_epilogue (rtx insn)
++{
++ rtx if_false_label;
++ rtx _val;
++ rtx funcname;
++ tree funcstr;
++ int flag_have_return = FALSE;
++
++ start_sequence ();
++
++#ifdef HAVE_return
++ if (HAVE_return)
++ {
++ rtx insn;
++ return_label = gen_label_rtx ();
++
++ for (insn = prologue_insert_point; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == JUMP_INSN
++ && GET_CODE (PATTERN (insn)) == RETURN
++ && GET_MODE (PATTERN (insn)) == VOIDmode)
++ {
++ rtx pat = gen_rtx_SET (VOIDmode,
++ pc_rtx,
++ gen_rtx_LABEL_REF (VOIDmode,
++ return_label));
++ PATTERN (insn) = pat;
++ flag_have_return = TRUE;
++ }
++
++
++ emit_label (return_label);
++ }
++#endif
++
++ /* if (guard_area != _guard) */
++ compare_from_rtx (guard_area, _guard, NE, 0, GUARD_m, NULL_RTX);
++
++ if_false_label = gen_label_rtx (); /* { */
++ emit_jump_insn ( gen_beq(if_false_label));
++
++ /* generate string for the current function name */
++ funcstr = build_string (strlen(current_function_name ())+1,
++ current_function_name ());
++ TREE_TYPE (funcstr) = build_array_type (char_type_node, 0);
++ funcname = output_constant_def (funcstr, 1);
++
++ emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__stack_smash_handler"),
++ 0, VOIDmode, 2,
++ XEXP (funcname, 0), Pmode, guard_area, GUARD_m);
++
++ /* generate RTL to return from the current function */
++
++ emit_barrier (); /* } */
++ emit_label (if_false_label);
++
++ /* generate RTL to return from the current function */
++ if (DECL_RTL_SET_P (DECL_RESULT (current_function_decl)))
++ use_return_register ();
++
++#ifdef HAVE_return
++ if (HAVE_return && flag_have_return)
++ {
++ emit_jump_insn (gen_return ());
++ emit_barrier ();
++ }
++#endif
++
++ _val = get_insns ();
++ end_sequence ();
++
++ emit_insn_after (_val, insn);
++}
++
++
++/* For every variable which type is character array, moves its location
++ in the stack frame to the sweep_frame_offset position. */
++static void
++arrange_var_order (tree block)
++{
++ tree types;
++ HOST_WIDE_INT offset;
++
++ while (block && TREE_CODE(block)==BLOCK)
++ {
++ /* arrange the location of character arrays in depth first. */
++ arrange_var_order (BLOCK_SUBBLOCKS (block));
++
++ for (types = BLOCK_VARS (block); types; types = TREE_CHAIN(types))
++ {
++ /* Skip the declaration that refers an external variable. */
++ if (! DECL_EXTERNAL (types) && ! TREE_STATIC (types)
++ && TREE_CODE (types) == VAR_DECL
++ && ! DECL_ARTIFICIAL (types)
++ && DECL_RTL_SET_P (types)
++ && GET_CODE (DECL_RTL (types)) == MEM
++ && GET_MODE (DECL_RTL (types)) == BLKmode
++
++ && (is_array=0,
++ search_string_def (TREE_TYPE (types))
++ || (! current_function_defines_vulnerable_string && is_array)))
++ {
++ rtx home = DECL_RTL (types);
++
++ if (!(GET_CODE (home) == MEM
++ && (GET_CODE (XEXP (home, 0)) == MEM
++ || (GET_CODE (XEXP (home, 0)) == REG
++ && XEXP (home, 0) != virtual_stack_vars_rtx
++ && REGNO (XEXP (home, 0)) != HARD_FRAME_POINTER_REGNUM
++ && REGNO (XEXP (home, 0)) != STACK_POINTER_REGNUM
++#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
++ && REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM
++#endif
++ ))))
++ {
++ /* Found a string variable. */
++ HOST_WIDE_INT var_size =
++ ((TREE_INT_CST_LOW (DECL_SIZE (types)) + BITS_PER_UNIT - 1)
++ / BITS_PER_UNIT);
++
++ /* Confirmed it is BLKmode. */
++ int alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
++ var_size = CEIL_ROUND (var_size, alignment);
++
++ /* Skip the variable if it is top of the region
++ specified by sweep_frame_offset. */
++ offset = AUTO_OFFSET (XEXP (DECL_RTL (types), 0));
++ if (offset == sweep_frame_offset - var_size)
++ sweep_frame_offset -= var_size;
++
++ else if (offset < sweep_frame_offset - var_size)
++ sweep_string_variable (DECL_RTL (types), var_size);
++ }
++ }
++ }
++
++ block = BLOCK_CHAIN (block);
++ }
++}
++
++
++/* To protect every pointer argument and move character arrays in the argument,
++ Copy those variables to the top of the stack frame and move the location of
++ character arrays to the posion of sweep_frame_offset. */
++static void
++copy_args_for_protection (void)
++{
++ tree parms = DECL_ARGUMENTS (current_function_decl);
++ rtx temp_rtx;
++
++ parms = DECL_ARGUMENTS (current_function_decl);
++ for (; parms; parms = TREE_CHAIN (parms))
++ if (DECL_NAME (parms) && TREE_TYPE (parms) != error_mark_node)
++ {
++ if (PARM_PASSED_IN_MEMORY (parms) && DECL_NAME (parms))
++ {
++ int string_p;
++ rtx seq;
++
++ string_p = search_string_def (TREE_TYPE(parms));
++
++ /* Check if it is a candidate to move. */
++ if (string_p || search_pointer_def (TREE_TYPE (parms)))
++ {
++ int arg_size
++ = ((TREE_INT_CST_LOW (DECL_SIZE (parms)) + BITS_PER_UNIT - 1)
++ / BITS_PER_UNIT);
++ tree passed_type = DECL_ARG_TYPE (parms);
++ tree nominal_type = TREE_TYPE (parms);
++
++ start_sequence ();
++
++ if (GET_CODE (DECL_RTL (parms)) == REG)
++ {
++ rtx safe = 0;
++
++ change_arg_use_of_insns (prologue_insert_point,
++ DECL_RTL (parms), &safe, 0);
++ if (safe)
++ {
++ /* Generate codes for copying the content. */
++ rtx movinsn = emit_move_insn (safe, DECL_RTL (parms));
++
++ /* Avoid register elimination in gcse.c. */
++ PATTERN (movinsn)->volatil = 1;
++
++ /* Save debugger info. */
++ SET_DECL_RTL (parms, safe);
++ }
++ }
++ else if (GET_CODE (DECL_RTL (parms)) == MEM
++ && GET_CODE (XEXP (DECL_RTL (parms), 0)) == ADDRESSOF)
++ {
++ rtx movinsn;
++ rtx safe = gen_reg_rtx (GET_MODE (DECL_RTL (parms)));
++
++ /* Generate codes for copying the content. */
++ movinsn = emit_move_insn (safe, DECL_INCOMING_RTL (parms));
++ /* Avoid register elimination in gcse.c. */
++ PATTERN (movinsn)->volatil = 1;
++
++ /* Change the addressof information to the newly
++ allocated pseudo register. */
++ emit_move_insn (DECL_RTL (parms), safe);
++
++ /* Save debugger info. */
++ SET_DECL_RTL (parms, safe);
++ }
++
++ /* See if the frontend wants to pass this by invisible
++ reference. */
++ else if (passed_type != nominal_type
++ && POINTER_TYPE_P (passed_type)
++ && TREE_TYPE (passed_type) == nominal_type)
++ {
++ rtx safe = 0, orig = XEXP (DECL_RTL (parms), 0);
++
++ change_arg_use_of_insns (prologue_insert_point,
++ orig, &safe, 0);
++ if (safe)
++ {
++ /* Generate codes for copying the content. */
++ rtx movinsn = emit_move_insn (safe, orig);
++
++ /* Avoid register elimination in gcse.c */
++ PATTERN (movinsn)->volatil = 1;
++
++ /* Save debugger info. */
++ SET_DECL_RTL (parms, safe);
++ }
++ }
++
++ else
++ {
++ /* Declare temporary local variable for parms. */
++ temp_rtx
++ = assign_stack_local (DECL_MODE (parms), arg_size,
++ DECL_MODE (parms) == BLKmode ?
++ -1 : 0);
++
++ MEM_IN_STRUCT_P (temp_rtx)
++ = AGGREGATE_TYPE_P (TREE_TYPE (parms));
++ set_mem_alias_set (temp_rtx, get_alias_set (parms));
++
++ /* Generate codes for copying the content. */
++ store_expr (parms, temp_rtx, 0);
++
++ /* Change the reference for each instructions. */
++ move_arg_location (prologue_insert_point, DECL_RTL (parms),
++ temp_rtx, arg_size);
++
++ /* Change the location of parms variable. */
++ SET_DECL_RTL (parms, temp_rtx);
++ }
++
++ seq = get_insns ();
++ end_sequence ();
++ emit_insn_before (seq, prologue_insert_point);
++
++#ifdef FRAME_GROWS_DOWNWARD
++ /* Process the string argument. */
++ if (string_p && DECL_MODE (parms) == BLKmode)
++ {
++ int alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
++ arg_size = CEIL_ROUND (arg_size, alignment);
++
++ /* Change the reference for each instructions. */
++ sweep_string_variable (DECL_RTL (parms), arg_size);
++ }
++#endif
++ }
++ }
++ }
++}
++
++
++/* Sweep a string variable to the positon of sweep_frame_offset in the
++ stack frame, that is a last position of string variables. */
++static void
++sweep_string_variable (rtx sweep_var, HOST_WIDE_INT var_size)
++{
++ HOST_WIDE_INT sweep_offset;
++
++ switch (GET_CODE (sweep_var))
++ {
++ case MEM:
++ if (GET_CODE (XEXP (sweep_var, 0)) == ADDRESSOF
++ && GET_CODE (XEXP (XEXP (sweep_var, 0), 0)) == REG)
++ return;
++ sweep_offset = AUTO_OFFSET(XEXP (sweep_var, 0));
++ break;
++ case CONST_INT:
++ sweep_offset = INTVAL (sweep_var);
++ break;
++ default:
++ abort ();
++ }
++
++ /* Scan all declarations of variables and fix the offset address of
++ the variable based on the frame pointer. */
++ sweep_string_in_decls (DECL_INITIAL (current_function_decl),
++ sweep_offset, var_size);
++
++ /* Scan all argument variable and fix the offset address based on
++ the frame pointer. */
++ sweep_string_in_args (DECL_ARGUMENTS (current_function_decl),
++ sweep_offset, var_size);
++
++ /* For making room for sweep variable, scan all insns and
++ fix the offset address of the variable that is based on frame pointer. */
++ sweep_string_use_of_insns (function_first_insn, sweep_offset, var_size);
++
++
++ /* Clear all the USED bits in operands of all insns and declarations of
++ local variables. */
++ reset_used_flags_for_decls (DECL_INITIAL (current_function_decl));
++ reset_used_flags_for_insns (function_first_insn);
++
++ sweep_frame_offset -= var_size;
++}
++
++
++
++/* Move an argument to the local variable addressed by frame_offset. */
++static void
++move_arg_location (rtx insn, rtx orig, rtx new, HOST_WIDE_INT var_size)
++{
++ /* For making room for sweep variable, scan all insns and
++ fix the offset address of the variable that is based on frame pointer. */
++ change_arg_use_of_insns (insn, orig, &new, var_size);
++
++
++ /* Clear all the USED bits in operands of all insns and declarations
++ of local variables. */
++ reset_used_flags_for_insns (insn);
++}
++
++
++/* Sweep character arrays declared as local variable. */
++static void
++sweep_string_in_decls (tree block, HOST_WIDE_INT sweep_offset,
++ HOST_WIDE_INT sweep_size)
++{
++ tree types;
++ HOST_WIDE_INT offset;
++ rtx home;
++
++ while (block && TREE_CODE(block)==BLOCK)
++ {
++ for (types = BLOCK_VARS(block); types; types = TREE_CHAIN(types))
++ {
++ /* Skip the declaration that refers an external variable and
++ also skip an global variable. */
++ if (! DECL_EXTERNAL (types) && ! TREE_STATIC (types)) {
++
++ if (! DECL_RTL_SET_P (types))
++ continue;
++
++ home = DECL_RTL (types);
++
++ /* Process for static local variable. */
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == SYMBOL_REF)
++ continue;
++
++ if (GET_CODE (home) == MEM
++ && XEXP (home, 0) == virtual_stack_vars_rtx)
++ {
++ offset = 0;
++
++ /* the operand related to the sweep variable. */
++ if (sweep_offset <= offset
++ && offset < sweep_offset + sweep_size)
++ {
++ offset = sweep_frame_offset - sweep_size - sweep_offset;
++
++ XEXP (home, 0) = plus_constant (virtual_stack_vars_rtx,
++ offset);
++ XEXP (home, 0)->used = 1;
++ }
++ else if (sweep_offset <= offset
++ && offset < sweep_frame_offset)
++ {
++ /* the rest of variables under sweep_frame_offset,
++ shift the location. */
++ XEXP (home, 0) = plus_constant (virtual_stack_vars_rtx,
++ -sweep_size);
++ XEXP (home, 0)->used = 1;
++ }
++ }
++
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == MEM)
++ {
++ /* Process for dynamically allocated array. */
++ home = XEXP (home, 0);
++ }
++
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == PLUS
++ && XEXP (XEXP (home, 0), 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (XEXP (home, 0), 1)) == CONST_INT)
++ {
++ if (! XEXP (home, 0)->used)
++ {
++ offset = AUTO_OFFSET(XEXP (home, 0));
++
++ /* the operand related to the sweep variable. */
++ if (sweep_offset <= offset
++ && offset < sweep_offset + sweep_size)
++ {
++
++ offset
++ += sweep_frame_offset - sweep_size - sweep_offset;
++ XEXP (XEXP (home, 0), 1) = gen_rtx_CONST_INT (VOIDmode,
++ offset);
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++ else if (sweep_offset <= offset
++ && offset < sweep_frame_offset)
++ {
++ /* the rest of variables under sweep_frame_offset,
++ so shift the location. */
++
++ XEXP (XEXP (home, 0), 1)
++ = gen_rtx_CONST_INT (VOIDmode, offset - sweep_size);
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++ }
++ }
++ }
++ }
++
++ sweep_string_in_decls (BLOCK_SUBBLOCKS (block),
++ sweep_offset, sweep_size);
++
++ block = BLOCK_CHAIN (block);
++ }
++}
++
++
++/* Sweep character arrays declared as argument. */
++static void
++sweep_string_in_args (tree parms, HOST_WIDE_INT sweep_offset,
++ HOST_WIDE_INT sweep_size)
++{
++ rtx home;
++ HOST_WIDE_INT offset;
++
++ for (; parms; parms = TREE_CHAIN (parms))
++ if (DECL_NAME (parms) && TREE_TYPE (parms) != error_mark_node)
++ {
++ if (PARM_PASSED_IN_MEMORY (parms) && DECL_NAME (parms))
++ {
++ home = DECL_INCOMING_RTL (parms);
++
++ if (XEXP (home, 0)->used)
++ continue;
++
++ offset = AUTO_OFFSET(XEXP (home, 0));
++
++ /* the operand related to the sweep variable. */
++ if (AUTO_BASEPTR (XEXP (home, 0)) == virtual_stack_vars_rtx)
++ {
++ if (sweep_offset <= offset
++ && offset < sweep_offset + sweep_size)
++ {
++ offset += sweep_frame_offset - sweep_size - sweep_offset;
++ XEXP (XEXP (home, 0), 1) = gen_rtx_CONST_INT (VOIDmode,
++ offset);
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++ else if (sweep_offset <= offset
++ && offset < sweep_frame_offset)
++ {
++ /* the rest of variables under sweep_frame_offset,
++ shift the location. */
++ XEXP (XEXP (home, 0), 1)
++ = gen_rtx_CONST_INT (VOIDmode, offset - sweep_size);
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++ }
++ }
++ }
++}
++
++
++/* Set to 1 when the instruction contains virtual registers. */
++static int has_virtual_reg;
++
++/* Sweep the specified character array for every insns. The array starts from
++ the sweep_offset and its size is sweep_size. */
++static void
++sweep_string_use_of_insns (rtx insn, HOST_WIDE_INT sweep_offset,
++ HOST_WIDE_INT sweep_size)
++{
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
++ || GET_CODE (insn) == CALL_INSN)
++ {
++ has_virtual_reg = FALSE;
++ sweep_string_in_operand (insn, &PATTERN (insn),
++ sweep_offset, sweep_size);
++ sweep_string_in_operand (insn, ®_NOTES (insn),
++ sweep_offset, sweep_size);
++ }
++}
++
++
++/* Sweep the specified character array, which starts from the sweep_offset and
++ its size is sweep_size.
++
++ When a pointer is given,
++ if it points the address higher than the array, it stays.
++ if it points the address inside the array, it changes to point inside
++ the sweeped array.
++ if it points the address lower than the array, it shifts higher address by
++ the sweep_size. */
++static void
++sweep_string_in_operand (rtx insn, rtx *loc,
++ HOST_WIDE_INT sweep_offset, HOST_WIDE_INT sweep_size)
++{
++ rtx x = *loc;
++ enum rtx_code code;
++ int i, j, k = 0;
++ HOST_WIDE_INT offset;
++ const char *fmt;
++
++ if (x == 0)
++ return;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case CONST:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ case ASM_INPUT:
++ case ADDR_VEC:
++ case ADDR_DIFF_VEC:
++ case RETURN:
++ case ADDRESSOF:
++ return;
++
++ case REG:
++ if (x == virtual_incoming_args_rtx
++ || x == virtual_stack_vars_rtx
++ || x == virtual_stack_dynamic_rtx
++ || x == virtual_outgoing_args_rtx
++ || x == virtual_cfa_rtx)
++ has_virtual_reg = TRUE;
++ return;
++
++ case SET:
++ /*
++ skip setjmp setup insn and setjmp restore insn
++ Example:
++ (set (MEM (reg:SI xx)) (virtual_stack_vars_rtx)))
++ (set (virtual_stack_vars_rtx) (REG))
++ */
++ if (GET_CODE (XEXP (x, 0)) == MEM
++ && XEXP (x, 1) == virtual_stack_vars_rtx)
++ return;
++ if (XEXP (x, 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (x, 1)) == REG)
++ return;
++ break;
++
++ case PLUS:
++ /* Handle typical case of frame register plus constant. */
++ if (XEXP (x, 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (x, 1)) == CONST_INT)
++ {
++ if (x->used)
++ goto single_use_of_virtual_reg;
++
++ offset = AUTO_OFFSET(x);
++
++ /* When arguments grow downward, the virtual incoming
++ args pointer points to the top of the argument block,
++ so block is identified by the pointer - 1.
++ The flag is set at the copy_rtx_and_substitute in integrate.c */
++ if (RTX_INTEGRATED_P (x))
++ k = -1;
++
++ /* the operand related to the sweep variable. */
++ if (sweep_offset <= offset + k
++ && offset + k < sweep_offset + sweep_size)
++ {
++ offset += sweep_frame_offset - sweep_size - sweep_offset;
++
++ XEXP (x, 0) = virtual_stack_vars_rtx;
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset);
++ x->used = 1;
++ }
++ else if (sweep_offset <= offset + k
++ && offset + k < sweep_frame_offset)
++ {
++ /* the rest of variables under sweep_frame_offset,
++ shift the location. */
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset - sweep_size);
++ x->used = 1;
++ }
++
++ single_use_of_virtual_reg:
++ if (has_virtual_reg) {
++ /* excerpt from insn_invalid_p in recog.c */
++ int icode = recog_memoized (insn);
++
++ if (icode < 0 && asm_noperands (PATTERN (insn)) < 0)
++ {
++ rtx temp, seq;
++
++ start_sequence ();
++ temp = force_operand (x, NULL_RTX);
++ seq = get_insns ();
++ end_sequence ();
++
++ emit_insn_before (seq, insn);
++ if (! validate_change (insn, loc, temp, 0)
++ && !validate_replace_rtx (x, temp, insn))
++ fatal_insn ("sweep_string_in_operand", insn);
++ }
++ }
++
++ has_virtual_reg = TRUE;
++ return;
++ }
++
++#ifdef FRAME_GROWS_DOWNWARD
++ /* Alert the case of frame register plus constant given by reg. */
++ else if (XEXP (x, 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (x, 1)) == REG)
++ fatal_insn ("sweep_string_in_operand: unknown addressing", insn);
++#endif
++
++ /*
++ process further subtree:
++ Example: (plus:SI (mem/s:SI (plus:SI (reg:SI 17) (const_int 8)))
++ (const_int 5))
++ */
++ break;
++
++ case CALL_PLACEHOLDER:
++ for (i = 0; i < 3; i++)
++ {
++ rtx seq = XEXP (x, i);
++ if (seq)
++ {
++ push_to_sequence (seq);
++ sweep_string_use_of_insns (XEXP (x, i),
++ sweep_offset, sweep_size);
++ XEXP (x, i) = get_insns ();
++ end_sequence ();
++ }
++ }
++ break;
++
++ default:
++ break;
++ }
++
++ /* Scan all subexpressions. */
++ fmt = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
++ if (*fmt == 'e')
++ {
++ /*
++ virtual_stack_vars_rtx without offset
++ Example:
++ (set (reg:SI xx) (reg:SI 78))
++ (set (reg:SI xx) (MEM (reg:SI 78)))
++ */
++ if (XEXP (x, i) == virtual_stack_vars_rtx)
++ fatal_insn ("sweep_string_in_operand: unknown fp usage", insn);
++ sweep_string_in_operand (insn, &XEXP (x, i), sweep_offset, sweep_size);
++ }
++ else if (*fmt == 'E')
++ for (j = 0; j < XVECLEN (x, i); j++)
++ sweep_string_in_operand (insn, &XVECEXP (x, i, j), sweep_offset, sweep_size);
++}
++
++
++/* Change the use of an argument to the use of the duplicated variable for
++ every insns, The variable is addressed by new rtx. */
++static void
++change_arg_use_of_insns (rtx insn, rtx orig, rtx *new, HOST_WIDE_INT size)
++{
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
++ || GET_CODE (insn) == CALL_INSN)
++ {
++ rtx seq;
++
++ start_sequence ();
++ change_arg_use_in_operand (insn, PATTERN (insn), orig, new, size);
++
++ seq = get_insns ();
++ end_sequence ();
++ emit_insn_before (seq, insn);
++
++ /* load_multiple insn from virtual_incoming_args_rtx have several
++ load insns. If every insn change the load address of arg
++ to frame region, those insns are moved before the PARALLEL insn
++ and remove the PARALLEL insn. */
++ if (GET_CODE (PATTERN (insn)) == PARALLEL
++ && XVECLEN (PATTERN (insn), 0) == 0)
++ delete_insn (insn);
++ }
++}
++
++
++/* Change the use of an argument to the use of the duplicated variable for
++ every rtx derived from the x. */
++static void
++change_arg_use_in_operand (rtx insn, rtx x, rtx orig, rtx *new, HOST_WIDE_INT size)
++{
++ enum rtx_code code;
++ int i, j;
++ HOST_WIDE_INT offset;
++ const char *fmt;
++
++ if (x == 0)
++ return;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case CONST:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ case ASM_INPUT:
++ case ADDR_VEC:
++ case ADDR_DIFF_VEC:
++ case RETURN:
++ case REG:
++ case ADDRESSOF:
++ return;
++
++ case MEM:
++ /* Handle special case of MEM (incoming_args). */
++ if (GET_CODE (orig) == MEM
++ && XEXP (x, 0) == virtual_incoming_args_rtx)
++ {
++ offset = 0;
++
++ /* the operand related to the sweep variable. */
++ if (AUTO_OFFSET(XEXP (orig, 0)) <= offset &&
++ offset < AUTO_OFFSET(XEXP (orig, 0)) + size) {
++
++ offset = AUTO_OFFSET(XEXP (*new, 0))
++ + (offset - AUTO_OFFSET(XEXP (orig, 0)));
++
++ XEXP (x, 0) = plus_constant (virtual_stack_vars_rtx, offset);
++ XEXP (x, 0)->used = 1;
++
++ return;
++ }
++ }
++ break;
++
++ case PLUS:
++ /* Handle special case of frame register plus constant. */
++ if (GET_CODE (orig) == MEM
++ && XEXP (x, 0) == virtual_incoming_args_rtx
++ && GET_CODE (XEXP (x, 1)) == CONST_INT
++ && ! x->used)
++ {
++ offset = AUTO_OFFSET(x);
++
++ /* the operand related to the sweep variable. */
++ if (AUTO_OFFSET(XEXP (orig, 0)) <= offset &&
++ offset < AUTO_OFFSET(XEXP (orig, 0)) + size)
++ {
++
++ offset = (AUTO_OFFSET(XEXP (*new, 0))
++ + (offset - AUTO_OFFSET(XEXP (orig, 0))));
++
++ XEXP (x, 0) = virtual_stack_vars_rtx;
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset);
++ x->used = 1;
++
++ return;
++ }
++
++ /*
++ process further subtree:
++ Example: (plus:SI (mem/s:SI (plus:SI (reg:SI 17) (const_int 8)))
++ (const_int 5))
++ */
++ }
++ break;
++
++ case SET:
++ /* Handle special case of "set (REG or MEM) (incoming_args)".
++ It means that the the address of the 1st argument is stored. */
++ if (GET_CODE (orig) == MEM
++ && XEXP (x, 1) == virtual_incoming_args_rtx)
++ {
++ offset = 0;
++
++ /* the operand related to the sweep variable. */
++ if (AUTO_OFFSET(XEXP (orig, 0)) <= offset &&
++ offset < AUTO_OFFSET(XEXP (orig, 0)) + size)
++ {
++ offset = (AUTO_OFFSET(XEXP (*new, 0))
++ + (offset - AUTO_OFFSET(XEXP (orig, 0))));
++
++ XEXP (x, 1) = force_operand (plus_constant (virtual_stack_vars_rtx,
++ offset), NULL_RTX);
++ XEXP (x, 1)->used = 1;
++
++ return;
++ }
++ }
++ break;
++
++ case CALL_PLACEHOLDER:
++ for (i = 0; i < 3; i++)
++ {
++ rtx seq = XEXP (x, i);
++ if (seq)
++ {
++ push_to_sequence (seq);
++ change_arg_use_of_insns (XEXP (x, i), orig, new, size);
++ XEXP (x, i) = get_insns ();
++ end_sequence ();
++ }
++ }
++ break;
++
++ case PARALLEL:
++ for (j = 0; j < XVECLEN (x, 0); j++)
++ {
++ change_arg_use_in_operand (insn, XVECEXP (x, 0, j), orig, new, size);
++ }
++ if (recog_memoized (insn) < 0)
++ {
++ for (i = 0, j = 0; j < XVECLEN (x, 0); j++)
++ {
++ /* if parallel insn has a insn used virtual_incoming_args_rtx,
++ the insn is removed from this PARALLEL insn. */
++ if (check_used_flag (XVECEXP (x, 0, j)))
++ {
++ emit_insn (XVECEXP (x, 0, j));
++ XVECEXP (x, 0, j) = NULL;
++ }
++ else
++ XVECEXP (x, 0, i++) = XVECEXP (x, 0, j);
++ }
++ PUT_NUM_ELEM (XVEC (x, 0), i);
++ }
++ return;
++
++ default:
++ break;
++ }
++
++ /* Scan all subexpressions. */
++ fmt = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
++ if (*fmt == 'e')
++ {
++ if (XEXP (x, i) == orig)
++ {
++ if (*new == 0)
++ *new = gen_reg_rtx (GET_MODE (orig));
++ XEXP (x, i) = *new;
++ continue;
++ }
++ change_arg_use_in_operand (insn, XEXP (x, i), orig, new, size);
++ }
++ else if (*fmt == 'E')
++ for (j = 0; j < XVECLEN (x, i); j++)
++ {
++ if (XVECEXP (x, i, j) == orig)
++ {
++ if (*new == 0)
++ *new = gen_reg_rtx (GET_MODE (orig));
++ XVECEXP (x, i, j) = *new;
++ continue;
++ }
++ change_arg_use_in_operand (insn, XVECEXP (x, i, j), orig, new, size);
++ }
++}
++
++
++/* Validate every instructions from the specified instruction.
++
++ The stack protector prohibits to generate machine specific frame addressing
++ for the first rtl generation. The prepare_stack_protection must convert
++ machine independent frame addressing to machine specific frame addressing,
++ so instructions for inline functions, which skip the conversion of
++ the stack protection, validate every instructions. */
++static void
++validate_insns_of_varrefs (rtx insn)
++{
++ rtx next;
++
++ /* Initialize recognition, indicating that volatile is OK. */
++ init_recog ();
++
++ for (; insn; insn = next)
++ {
++ next = NEXT_INSN (insn);
++ if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
++ || GET_CODE (insn) == CALL_INSN)
++ {
++ /* excerpt from insn_invalid_p in recog.c */
++ int icode = recog_memoized (insn);
++
++ if (icode < 0 && asm_noperands (PATTERN (insn)) < 0)
++ validate_operand_of_varrefs (insn, &PATTERN (insn));
++ }
++ }
++
++ init_recog_no_volatile ();
++}
++
++
++/* Validate frame addressing of the rtx and covert it to machine specific one. */
++static void
++validate_operand_of_varrefs (rtx insn, rtx *loc)
++{
++ enum rtx_code code;
++ rtx x, temp, seq;
++ int i, j;
++ const char *fmt;
++
++ x = *loc;
++ if (x == 0)
++ return;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case USE:
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case CONST:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ case ASM_INPUT:
++ case ADDR_VEC:
++ case ADDR_DIFF_VEC:
++ case RETURN:
++ case REG:
++ case ADDRESSOF:
++ return;
++
++ case PLUS:
++ /* validate insn of frame register plus constant. */
++ if (GET_CODE (x) == PLUS
++ && XEXP (x, 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (x, 1)) == CONST_INT)
++ {
++ start_sequence ();
++
++ { /* excerpt from expand_binop in optabs.c */
++ optab binoptab = add_optab;
++ enum machine_mode mode = GET_MODE (x);
++ int icode = (int) binoptab->handlers[(int) mode].insn_code;
++ enum machine_mode mode1 = insn_data[icode].operand[2].mode;
++ rtx pat;
++ rtx xop0 = XEXP (x, 0), xop1 = XEXP (x, 1);
++ temp = gen_reg_rtx (mode);
++
++ /* Now, if insn's predicates don't allow offset operands,
++ put them into pseudo regs. */
++
++ if (! (*insn_data[icode].operand[2].predicate) (xop1, mode1)
++ && mode1 != VOIDmode)
++ xop1 = copy_to_mode_reg (mode1, xop1);
++
++ pat = GEN_FCN (icode) (temp, xop0, xop1);
++ if (pat)
++ emit_insn (pat);
++ else
++ abort (); /* there must be add_optab handler. */
++ }
++ seq = get_insns ();
++ end_sequence ();
++
++ emit_insn_before (seq, insn);
++ if (! validate_change (insn, loc, temp, 0))
++ abort ();
++ return;
++ }
++ break;
++
++
++ case CALL_PLACEHOLDER:
++ for (i = 0; i < 3; i++)
++ {
++ rtx seq = XEXP (x, i);
++ if (seq)
++ {
++ push_to_sequence (seq);
++ validate_insns_of_varrefs (XEXP (x, i));
++ XEXP (x, i) = get_insns ();
++ end_sequence ();
++ }
++ }
++ break;
++
++ default:
++ break;
++ }
++
++ /* Scan all subexpressions. */
++ fmt = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
++ if (*fmt == 'e')
++ validate_operand_of_varrefs (insn, &XEXP (x, i));
++ else if (*fmt == 'E')
++ for (j = 0; j < XVECLEN (x, i); j++)
++ validate_operand_of_varrefs (insn, &XVECEXP (x, i, j));
++}
++
++
++
++/* Return size that is not allocated for stack frame. It will be allocated
++ to modify the home of pseudo registers called from global_alloc. */
++HOST_WIDE_INT
++get_frame_free_size (void)
++{
++ if (! flag_propolice_protection)
++ return 0;
++
++ return push_allocated_offset - push_frame_offset;
++}
++
++
++/* The following codes are invoked after the instantiation of pseudo registers.
++
++ Reorder local variables to place a peudo register after buffers to avoid
++ the corruption of local variables that could be used to further corrupt
++ arbitrary memory locations. */
++#if !defined(FRAME_GROWS_DOWNWARD) && defined(STACK_GROWS_DOWNWARD)
++static void push_frame (HOST_WIDE_INT, HOST_WIDE_INT);
++static void push_frame_in_decls (tree, HOST_WIDE_INT, HOST_WIDE_INT);
++static void push_frame_in_args (tree, HOST_WIDE_INT, HOST_WIDE_INT);
++static void push_frame_of_insns (rtx, HOST_WIDE_INT, HOST_WIDE_INT);
++static void push_frame_in_operand (rtx, rtx, HOST_WIDE_INT, HOST_WIDE_INT);
++static void push_frame_of_reg_equiv_memory_loc (HOST_WIDE_INT, HOST_WIDE_INT);
++static void push_frame_of_reg_equiv_constant (HOST_WIDE_INT, HOST_WIDE_INT);
++static void reset_used_flags_for_push_frame (void);
++static int check_out_of_frame_access (rtx, HOST_WIDE_INT);
++static int check_out_of_frame_access_in_operand (rtx, HOST_WIDE_INT);
++#endif
++
++
++/* Assign stack local at the stage of register allocater. if a pseudo reg is
++ spilled out from such an allocation, it is allocated on the stack.
++ The protector keep the location be lower stack region than the location of
++ sweeped arrays. */
++rtx
++assign_stack_local_for_pseudo_reg (enum machine_mode mode,
++ HOST_WIDE_INT size, int align)
++{
++#if defined(FRAME_GROWS_DOWNWARD) || !defined(STACK_GROWS_DOWNWARD)
++ return assign_stack_local (mode, size, align);
++#else
++ tree blocks = DECL_INITIAL (current_function_decl);
++ rtx new;
++ HOST_WIDE_INT saved_frame_offset, units_per_push, starting_frame;
++ int first_call_from_purge_addressof, first_call_from_global_alloc;
++
++ if (! flag_propolice_protection
++ || size == 0
++ || ! blocks
++ || current_function_is_inlinable
++ || ! search_string_from_argsandvars (CALL_FROM_PUSH_FRAME)
++ || current_function_contains_functions)
++ return assign_stack_local (mode, size, align);
++
++ first_call_from_purge_addressof = !push_frame_offset && !cse_not_expected;
++ first_call_from_global_alloc = !saved_cse_not_expected && cse_not_expected;
++ saved_cse_not_expected = cse_not_expected;
++
++ starting_frame = ((STARTING_FRAME_OFFSET)
++ ? STARTING_FRAME_OFFSET : BIGGEST_ALIGNMENT / BITS_PER_UNIT);
++ units_per_push = MAX (BIGGEST_ALIGNMENT / BITS_PER_UNIT,
++ GET_MODE_SIZE (mode));
++
++ if (first_call_from_purge_addressof)
++ {
++ push_frame_offset = push_allocated_offset;
++ if (check_out_of_frame_access (get_insns (), starting_frame))
++ {
++ /* After the purge_addressof stage, there may be an instruction which
++ have the pointer less than the starting_frame.
++ if there is an access below frame, push dummy region to seperate
++ the address of instantiated variables. */
++ push_frame (GET_MODE_SIZE (DImode), 0);
++ assign_stack_local (BLKmode, GET_MODE_SIZE (DImode), -1);
++ }
++ }
++
++ if (first_call_from_global_alloc)
++ {
++ push_frame_offset = push_allocated_offset = 0;
++ if (check_out_of_frame_access (get_insns (), starting_frame))
++ {
++ if (STARTING_FRAME_OFFSET)
++ {
++ /* if there is an access below frame, push dummy region
++ to seperate the address of instantiated variables. */
++ push_frame (GET_MODE_SIZE (DImode), 0);
++ assign_stack_local (BLKmode, GET_MODE_SIZE (DImode), -1);
++ }
++ else
++ push_allocated_offset = starting_frame;
++ }
++ }
++
++ saved_frame_offset = frame_offset;
++ frame_offset = push_frame_offset;
++
++ new = assign_stack_local (mode, size, align);
++
++ push_frame_offset = frame_offset;
++ frame_offset = saved_frame_offset;
++
++ if (push_frame_offset > push_allocated_offset)
++ {
++ push_frame (units_per_push,
++ push_allocated_offset + STARTING_FRAME_OFFSET);
++
++ assign_stack_local (BLKmode, units_per_push, -1);
++ push_allocated_offset += units_per_push;
++ }
++
++ /* At the second call from global alloc, alpha push frame and assign
++ a local variable to the top of the stack. */
++ if (first_call_from_global_alloc && STARTING_FRAME_OFFSET == 0)
++ push_frame_offset = push_allocated_offset = 0;
++
++ return new;
++#endif
++}
++
++
++#if !defined(FRAME_GROWS_DOWNWARD) && defined(STACK_GROWS_DOWNWARD)
++
++/* push frame infomation for instantiating pseudo register at the top of stack.
++ This is only for the "frame grows upward", it means FRAME_GROWS_DOWNWARD is
++ not defined.
++
++ It is called by purge_addressof function and global_alloc (or reload)
++ function. */
++static void
++push_frame (HOST_WIDE_INT var_size, HOST_WIDE_INT boundary)
++{
++ reset_used_flags_for_push_frame();
++
++ /* Scan all declarations of variables and fix the offset address of
++ the variable based on the frame pointer. */
++ push_frame_in_decls (DECL_INITIAL (current_function_decl),
++ var_size, boundary);
++
++ /* Scan all argument variable and fix the offset address based on
++ the frame pointer. */
++ push_frame_in_args (DECL_ARGUMENTS (current_function_decl),
++ var_size, boundary);
++
++ /* Scan all operands of all insns and fix the offset address
++ based on the frame pointer. */
++ push_frame_of_insns (get_insns (), var_size, boundary);
++
++ /* Scan all reg_equiv_memory_loc and reg_equiv_constant. */
++ push_frame_of_reg_equiv_memory_loc (var_size, boundary);
++ push_frame_of_reg_equiv_constant (var_size, boundary);
++
++ reset_used_flags_for_push_frame();
++}
++
++
++/* Reset used flag of every insns, reg_equiv_memory_loc,
++ and reg_equiv_constant. */
++static void
++reset_used_flags_for_push_frame(void)
++{
++ int i;
++ extern rtx *reg_equiv_memory_loc;
++ extern rtx *reg_equiv_constant;
++
++ /* Clear all the USED bits in operands of all insns and declarations of
++ local vars. */
++ reset_used_flags_for_decls (DECL_INITIAL (current_function_decl));
++ reset_used_flags_for_insns (get_insns ());
++
++
++ /* The following codes are processed if the push_frame is called from
++ global_alloc (or reload) function. */
++ if (reg_equiv_memory_loc == 0)
++ return;
++
++ for (i=LAST_VIRTUAL_REGISTER+1; i < max_regno; i++)
++ if (reg_equiv_memory_loc[i])
++ {
++ rtx x = reg_equiv_memory_loc[i];
++
++ if (GET_CODE (x) == MEM
++ && GET_CODE (XEXP (x, 0)) == PLUS
++ && AUTO_BASEPTR (XEXP (x, 0)) == frame_pointer_rtx)
++ {
++ /* reset */
++ XEXP (x, 0)->used = 0;
++ }
++ }
++
++
++ if (reg_equiv_constant == 0)
++ return;
++
++ for (i=LAST_VIRTUAL_REGISTER+1; i < max_regno; i++)
++ if (reg_equiv_constant[i])
++ {
++ rtx x = reg_equiv_constant[i];
++
++ if (GET_CODE (x) == PLUS
++ && AUTO_BASEPTR (x) == frame_pointer_rtx)
++ {
++ /* reset */
++ x->used = 0;
++ }
++ }
++}
++
++
++/* Push every variables declared as a local variable and make a room for
++ instantiated register. */
++static void
++push_frame_in_decls (tree block, HOST_WIDE_INT push_size,
++ HOST_WIDE_INT boundary)
++{
++ tree types;
++ HOST_WIDE_INT offset;
++ rtx home;
++
++ while (block && TREE_CODE(block)==BLOCK)
++ {
++ for (types = BLOCK_VARS(block); types; types = TREE_CHAIN(types))
++ {
++ /* Skip the declaration that refers an external variable and
++ also skip an global variable. */
++ if (! DECL_EXTERNAL (types) && ! TREE_STATIC (types))
++ {
++ if (! DECL_RTL_SET_P (types))
++ continue;
++
++ home = DECL_RTL (types);
++
++ /* Process for static local variable. */
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == SYMBOL_REF)
++ continue;
++
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == REG)
++ {
++ if (XEXP (home, 0) != frame_pointer_rtx
++ || boundary != 0)
++ continue;
++
++ XEXP (home, 0) = plus_constant (frame_pointer_rtx,
++ push_size);
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == MEM)
++ {
++ /* Process for dynamically allocated array. */
++ home = XEXP (home, 0);
++ }
++
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == PLUS
++ && GET_CODE (XEXP (XEXP (home, 0), 1)) == CONST_INT)
++ {
++ offset = AUTO_OFFSET(XEXP (home, 0));
++
++ if (! XEXP (home, 0)->used
++ && offset >= boundary)
++ {
++ offset += push_size;
++ XEXP (XEXP (home, 0), 1)
++ = gen_rtx_CONST_INT (VOIDmode, offset);
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++ }
++ }
++ }
++
++ push_frame_in_decls (BLOCK_SUBBLOCKS (block), push_size, boundary);
++ block = BLOCK_CHAIN (block);
++ }
++}
++
++
++/* Push every variables declared as an argument and make a room for
++ instantiated register. */
++static void
++push_frame_in_args (tree parms, HOST_WIDE_INT push_size,
++ HOST_WIDE_INT boundary)
++{
++ rtx home;
++ HOST_WIDE_INT offset;
++
++ for (; parms; parms = TREE_CHAIN (parms))
++ if (DECL_NAME (parms) && TREE_TYPE (parms) != error_mark_node)
++ {
++ if (PARM_PASSED_IN_MEMORY (parms))
++ {
++ home = DECL_INCOMING_RTL (parms);
++ offset = AUTO_OFFSET(XEXP (home, 0));
++
++ if (XEXP (home, 0)->used || offset < boundary)
++ continue;
++
++ /* the operand related to the sweep variable. */
++ if (AUTO_BASEPTR (XEXP (home, 0)) == frame_pointer_rtx)
++ {
++ if (XEXP (home, 0) == frame_pointer_rtx)
++ XEXP (home, 0) = plus_constant (frame_pointer_rtx,
++ push_size);
++ else {
++ offset += push_size;
++ XEXP (XEXP (home, 0), 1) = gen_rtx_CONST_INT (VOIDmode,
++ offset);
++ }
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++ }
++ }
++}
++
++
++/* Set to 1 when the instruction has the reference to be pushed. */
++static int insn_pushed;
++
++/* Tables of equivalent registers with frame pointer. */
++static int *fp_equiv = 0;
++
++
++/* Push the frame region to make a room for allocated local variable. */
++static void
++push_frame_of_insns (rtx insn, HOST_WIDE_INT push_size, HOST_WIDE_INT boundary)
++{
++ /* init fp_equiv */
++ fp_equiv = (int *) xcalloc (max_reg_num (), sizeof (int));
++
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
++ || GET_CODE (insn) == CALL_INSN)
++ {
++ rtx last;
++
++ insn_pushed = FALSE;
++
++ /* Push frame in INSN operation. */
++ push_frame_in_operand (insn, PATTERN (insn), push_size, boundary);
++
++ /* Push frame in NOTE. */
++ push_frame_in_operand (insn, REG_NOTES (insn), push_size, boundary);
++
++ /* Push frame in CALL EXPR_LIST. */
++ if (GET_CODE (insn) == CALL_INSN)
++ push_frame_in_operand (insn, CALL_INSN_FUNCTION_USAGE (insn),
++ push_size, boundary);
++
++ /* Pushed frame addressing style may not be machine specific one.
++ so the instruction should be converted to use the machine specific
++ frame addressing. */
++ if (insn_pushed
++ && (last = try_split (PATTERN (insn), insn, 1)) != insn)
++ {
++ rtx first = NEXT_INSN (insn);
++ rtx trial = NEXT_INSN (first);
++ rtx pattern = PATTERN (trial);
++ rtx set;
++
++ /* Update REG_EQUIV info to the first splitted insn. */
++ if ((set = single_set (insn))
++ && find_reg_note (insn, REG_EQUIV, SET_SRC (set))
++ && GET_CODE (PATTERN (first)) == SET)
++ {
++ REG_NOTES (first)
++ = gen_rtx_EXPR_LIST (REG_EQUIV,
++ SET_SRC (PATTERN (first)),
++ REG_NOTES (first));
++ }
++
++ /* copy the first insn of splitted insns to the original insn and
++ delete the first insn,
++ because the original insn is pointed from records:
++ insn_chain, reg_equiv_init, used for global_alloc. */
++ if (cse_not_expected)
++ {
++ add_insn_before (insn, first);
++
++ /* Copy the various flags, and other information. */
++ memcpy (insn, first, sizeof (struct rtx_def) - sizeof (rtunion));
++ PATTERN (insn) = PATTERN (first);
++ INSN_CODE (insn) = INSN_CODE (first);
++ LOG_LINKS (insn) = LOG_LINKS (first);
++ REG_NOTES (insn) = REG_NOTES (first);
++
++ /* then remove the first insn of splitted insns. */
++ remove_insn (first);
++ INSN_DELETED_P (first) = 1;
++ }
++
++ if (GET_CODE (pattern) == SET
++ && GET_CODE (XEXP (pattern, 0)) == REG
++ && GET_CODE (XEXP (pattern, 1)) == PLUS
++ && XEXP (pattern, 0) == XEXP (XEXP (pattern, 1), 0)
++ && GET_CODE (XEXP (XEXP (pattern, 1), 1)) == CONST_INT)
++ {
++ rtx offset = XEXP (XEXP (pattern, 1), 1);
++ fp_equiv[REGNO (XEXP (pattern, 0))] = INTVAL (offset);
++
++ delete_insn (trial);
++ }
++
++ insn = last;
++ }
++ }
++
++ /* Clean up. */
++ free (fp_equiv);
++}
++
++
++/* Push the frame region by changing the operand that points the frame. */
++static void
++push_frame_in_operand (rtx insn, rtx orig,
++ HOST_WIDE_INT push_size, HOST_WIDE_INT boundary)
++{
++ rtx x = orig;
++ enum rtx_code code;
++ int i, j;
++ HOST_WIDE_INT offset;
++ const char *fmt;
++
++ if (x == 0)
++ return;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case CONST:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ case ASM_INPUT:
++ case ADDR_VEC:
++ case ADDR_DIFF_VEC:
++ case RETURN:
++ case REG:
++ case ADDRESSOF:
++ case USE:
++ return;
++
++ case SET:
++ /*
++ Skip setjmp setup insn and setjmp restore insn
++ alpha case:
++ (set (MEM (reg:SI xx)) (frame_pointer_rtx)))
++ (set (frame_pointer_rtx) (REG))
++ */
++ if (GET_CODE (XEXP (x, 0)) == MEM
++ && XEXP (x, 1) == frame_pointer_rtx)
++ return;
++ if (XEXP (x, 0) == frame_pointer_rtx
++ && GET_CODE (XEXP (x, 1)) == REG)
++ return;
++
++ /*
++ powerpc case: restores setjmp address
++ (set (frame_pointer_rtx) (plus frame_pointer_rtx const_int -n))
++ or
++ (set (reg) (plus frame_pointer_rtx const_int -n))
++ (set (frame_pointer_rtx) (reg))
++ */
++ if (GET_CODE (XEXP (x, 0)) == REG
++ && GET_CODE (XEXP (x, 1)) == PLUS
++ && XEXP (XEXP (x, 1), 0) == frame_pointer_rtx
++ && GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT
++ && INTVAL (XEXP (XEXP (x, 1), 1)) < 0)
++ {
++ x = XEXP (x, 1);
++ offset = AUTO_OFFSET(x);
++ if (x->used || -offset < boundary)
++ return;
++
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset - push_size);
++ x->used = 1; insn_pushed = TRUE;
++ return;
++ }
++
++ /* Reset fp_equiv register. */
++ else if (GET_CODE (XEXP (x, 0)) == REG
++ && fp_equiv[REGNO (XEXP (x, 0))])
++ fp_equiv[REGNO (XEXP (x, 0))] = 0;
++
++ /* Propagete fp_equiv register. */
++ else if (GET_CODE (XEXP (x, 0)) == REG
++ && GET_CODE (XEXP (x, 1)) == REG
++ && fp_equiv[REGNO (XEXP (x, 1))])
++ if (REGNO (XEXP (x, 0)) <= LAST_VIRTUAL_REGISTER
++ || reg_renumber[REGNO (XEXP (x, 0))] > 0)
++ fp_equiv[REGNO (XEXP (x, 0))] = fp_equiv[REGNO (XEXP (x, 1))];
++ break;
++
++ case MEM:
++ if (XEXP (x, 0) == frame_pointer_rtx
++ && boundary == 0)
++ {
++ XEXP (x, 0) = plus_constant (frame_pointer_rtx, push_size);
++ XEXP (x, 0)->used = 1; insn_pushed = TRUE;
++ return;
++ }
++ break;
++
++ case PLUS:
++ /* Handle special case of frame register plus constant. */
++ if (GET_CODE (XEXP (x, 1)) == CONST_INT
++ && XEXP (x, 0) == frame_pointer_rtx)
++ {
++ offset = AUTO_OFFSET(x);
++
++ if (x->used || offset < boundary)
++ return;
++
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset + push_size);
++ x->used = 1; insn_pushed = TRUE;
++
++ return;
++ }
++ /*
++ Handle alpha case:
++ (plus:SI (subreg:SI (reg:DI 63 FP) 0) (const_int 64 [0x40]))
++ */
++ if (GET_CODE (XEXP (x, 1)) == CONST_INT
++ && GET_CODE (XEXP (x, 0)) == SUBREG
++ && SUBREG_REG (XEXP (x, 0)) == frame_pointer_rtx)
++ {
++ offset = AUTO_OFFSET(x);
++
++ if (x->used || offset < boundary)
++ return;
++
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset + push_size);
++ x->used = 1; insn_pushed = TRUE;
++
++ return;
++ }
++ /*
++ Handle powerpc case:
++ (set (reg x) (plus fp const))
++ (set (.....) (... (plus (reg x) (const B))))
++ */
++ else if (GET_CODE (XEXP (x, 1)) == CONST_INT
++ && GET_CODE (XEXP (x, 0)) == REG
++ && fp_equiv[REGNO (XEXP (x, 0))])
++ {
++ offset = AUTO_OFFSET(x);
++
++ if (x->used)
++ return;
++
++ offset += fp_equiv[REGNO (XEXP (x, 0))];
++
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset);
++ x->used = 1; insn_pushed = TRUE;
++
++ return;
++ }
++ /*
++ Handle special case of frame register plus reg (constant).
++ (set (reg x) (const B))
++ (set (....) (...(plus fp (reg x))))
++ */
++ else if (XEXP (x, 0) == frame_pointer_rtx
++ && GET_CODE (XEXP (x, 1)) == REG
++ && PREV_INSN (insn)
++ && PATTERN (PREV_INSN (insn))
++ && SET_DEST (PATTERN (PREV_INSN (insn))) == XEXP (x, 1)
++ && GET_CODE (SET_SRC (PATTERN (PREV_INSN (insn)))) == CONST_INT)
++ {
++ offset = INTVAL (SET_SRC (PATTERN (PREV_INSN (insn))));
++
++ if (x->used || offset < boundary)
++ return;
++
++ SET_SRC (PATTERN (PREV_INSN (insn)))
++ = gen_rtx_CONST_INT (VOIDmode, offset + push_size);
++ x->used = 1;
++ XEXP (x, 1)->used = 1;
++
++ return;
++ }
++ /*
++ Handle special case of frame register plus reg (used).
++ The register already have a pushed offset, just mark this frame
++ addressing.
++ */
++ else if (XEXP (x, 0) == frame_pointer_rtx
++ && XEXP (x, 1)->used)
++ {
++ x->used = 1;
++ return;
++ }
++ /*
++ Process further subtree:
++ Example: (plus:SI (mem/s:SI (plus:SI (FP) (const_int 8)))
++ (const_int 5))
++ */
++ break;
++
++ case CALL_PLACEHOLDER:
++ push_frame_of_insns (XEXP (x, 0), push_size, boundary);
++ push_frame_of_insns (XEXP (x, 1), push_size, boundary);
++ push_frame_of_insns (XEXP (x, 2), push_size, boundary);
++ break;
++
++ default:
++ break;
++ }
++
++ /* Scan all subexpressions. */
++ fmt = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
++ if (*fmt == 'e')
++ {
++ if (XEXP (x, i) == frame_pointer_rtx && boundary == 0)
++ fatal_insn ("push_frame_in_operand", insn);
++ push_frame_in_operand (insn, XEXP (x, i), push_size, boundary);
++ }
++ else if (*fmt == 'E')
++ for (j = 0; j < XVECLEN (x, i); j++)
++ push_frame_in_operand (insn, XVECEXP (x, i, j), push_size, boundary);
++}
++
++
++/* Change the location pointed in reg_equiv_memory_loc. */
++static void
++push_frame_of_reg_equiv_memory_loc (HOST_WIDE_INT push_size,
++ HOST_WIDE_INT boundary)
++{
++ int i;
++ extern rtx *reg_equiv_memory_loc;
++
++ /* This function is processed if the push_frame is called from
++ global_alloc (or reload) function. */
++ if (reg_equiv_memory_loc == 0)
++ return;
++
++ for (i=LAST_VIRTUAL_REGISTER+1; i < max_regno; i++)
++ if (reg_equiv_memory_loc[i])
++ {
++ rtx x = reg_equiv_memory_loc[i];
++ int offset;
++
++ if (GET_CODE (x) == MEM
++ && GET_CODE (XEXP (x, 0)) == PLUS
++ && XEXP (XEXP (x, 0), 0) == frame_pointer_rtx)
++ {
++ offset = AUTO_OFFSET(XEXP (x, 0));
++
++ if (! XEXP (x, 0)->used
++ && offset >= boundary)
++ {
++ offset += push_size;
++ XEXP (XEXP (x, 0), 1) = gen_rtx_CONST_INT (VOIDmode, offset);
++
++ /* mark */
++ XEXP (x, 0)->used = 1;
++ }
++ }
++ else if (GET_CODE (x) == MEM
++ && XEXP (x, 0) == frame_pointer_rtx
++ && boundary == 0)
++ {
++ XEXP (x, 0) = plus_constant (frame_pointer_rtx, push_size);
++ XEXP (x, 0)->used = 1; insn_pushed = TRUE;
++ }
++ }
++}
++
++
++/* Change the location pointed in reg_equiv_constant. */
++static void
++push_frame_of_reg_equiv_constant (HOST_WIDE_INT push_size,
++ HOST_WIDE_INT boundary)
++{
++ int i;
++ extern rtx *reg_equiv_constant;
++
++ /* This function is processed if the push_frame is called from
++ global_alloc (or reload) function. */
++ if (reg_equiv_constant == 0)
++ return;
++
++ for (i = LAST_VIRTUAL_REGISTER + 1; i < max_regno; i++)
++ if (reg_equiv_constant[i])
++ {
++ rtx x = reg_equiv_constant[i];
++ int offset;
++
++ if (GET_CODE (x) == PLUS
++ && XEXP (x, 0) == frame_pointer_rtx)
++ {
++ offset = AUTO_OFFSET(x);
++
++ if (! x->used
++ && offset >= boundary)
++ {
++ offset += push_size;
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset);
++
++ /* mark */
++ x->used = 1;
++ }
++ }
++ else if (x == frame_pointer_rtx
++ && boundary == 0)
++ {
++ reg_equiv_constant[i]
++ = plus_constant (frame_pointer_rtx, push_size);
++ reg_equiv_constant[i]->used = 1; insn_pushed = TRUE;
++ }
++ }
++}
++
++
++/* Check every instructions if insn's memory reference is out of frame. */
++static int
++check_out_of_frame_access (rtx insn, HOST_WIDE_INT boundary)
++{
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
++ || GET_CODE (insn) == CALL_INSN)
++ {
++ if (check_out_of_frame_access_in_operand (PATTERN (insn), boundary))
++ return TRUE;
++ }
++ return FALSE;
++}
++
++
++/* Check every operands if the reference is out of frame. */
++static int
++check_out_of_frame_access_in_operand (rtx orig, HOST_WIDE_INT boundary)
++{
++ rtx x = orig;
++ enum rtx_code code;
++ int i, j;
++ const char *fmt;
++
++ if (x == 0)
++ return FALSE;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case CONST:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ case ASM_INPUT:
++ case ADDR_VEC:
++ case ADDR_DIFF_VEC:
++ case RETURN:
++ case REG:
++ case ADDRESSOF:
++ return FALSE;
++
++ case MEM:
++ if (XEXP (x, 0) == frame_pointer_rtx)
++ if (0 < boundary)
++ return TRUE;
++ break;
++
++ case PLUS:
++ /* Handle special case of frame register plus constant. */
++ if (GET_CODE (XEXP (x, 1)) == CONST_INT
++ && XEXP (x, 0) == frame_pointer_rtx)
++ {
++ if (0 <= AUTO_OFFSET(x)
++ && AUTO_OFFSET(x) < boundary)
++ return TRUE;
++ return FALSE;
++ }
++ /*
++ Process further subtree:
++ Example: (plus:SI (mem/s:SI (plus:SI (reg:SI 17) (const_int 8)))
++ (const_int 5))
++ */
++ break;
++
++ case CALL_PLACEHOLDER:
++ if (check_out_of_frame_access (XEXP (x, 0), boundary))
++ return TRUE;
++ if (check_out_of_frame_access (XEXP (x, 1), boundary))
++ return TRUE;
++ if (check_out_of_frame_access (XEXP (x, 2), boundary))
++ return TRUE;
++ break;
++
++ default:
++ break;
++ }
++
++ /* Scan all subexpressions. */
++ fmt = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
++ if (*fmt == 'e')
++ {
++ if (check_out_of_frame_access_in_operand (XEXP (x, i), boundary))
++ return TRUE;
++ }
++ else if (*fmt == 'E')
++ for (j = 0; j < XVECLEN (x, i); j++)
++ if (check_out_of_frame_access_in_operand (XVECEXP (x, i, j), boundary))
++ return TRUE;
++
++ return FALSE;
++}
++#endif
+diff -uNr gcc-3.4.3.orig/gcc/protector.h gcc-3.4.3/gcc/protector.h
+--- gcc-3.4.3.orig/gcc/protector.h 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.3/gcc/protector.h 2004-01-20 03:01:39.000000000 +0100
+@@ -0,0 +1,55 @@
++/* RTL buffer overflow protection function for GNU C compiler
++ Copyright (C) 2003 Free Software Foundation, Inc.
++
++This file is part of GCC.
++
++GCC is free software; you can redistribute it and/or modify it under
++the terms of the GNU General Public License as published by the Free
++Software Foundation; either version 2, or (at your option) any later
++version.
++
++GCC is distributed in the hope that it will be useful, but WITHOUT ANY
++WARRANTY; without even the implied warranty of MERCHANTABILITY or
++FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++for more details.
++
++You should have received a copy of the GNU General Public License
++along with GCC; see the file COPYING. If not, write to the Free
++Software Foundation, 59 Temple Place - Suite 330, Boston, MA
++02111-1307, USA. */
++
++
++/* Declare GUARD variable. */
++#define GUARD_m Pmode
++#define UNITS_PER_GUARD \
++ MAX(BIGGEST_ALIGNMENT / BITS_PER_UNIT, GET_MODE_SIZE (GUARD_m))
++
++#ifndef L_stack_smash_handler
++
++/* Insert a guard variable before a character buffer and change the order
++ of pointer variables, character buffers and pointer arguments. */
++
++extern void prepare_stack_protection (int);
++
++#ifdef TREE_CODE
++/* Search a character array from the specified type tree. */
++
++extern int search_string_def (tree);
++#endif
++
++/* Examine whether the input contains frame pointer addressing. */
++
++extern int contains_fp (rtx);
++
++/* Return size that is not allocated for stack frame. It will be allocated
++ to modify the home of pseudo registers called from global_alloc. */
++
++extern HOST_WIDE_INT get_frame_free_size (void);
++
++/* Allocate a local variable in the stack area before character buffers
++ to avoid the corruption of it. */
++
++extern rtx assign_stack_local_for_pseudo_reg (enum machine_mode,
++ HOST_WIDE_INT, int);
++
++#endif
+diff -uNr gcc-3.4.3.orig/gcc/reload1.c gcc-3.4.3/gcc/reload1.c
+--- gcc-3.4.3.orig/gcc/reload1.c 2004-05-02 14:37:17.000000000 +0200
++++ gcc-3.4.3/gcc/reload1.c 2004-11-24 18:35:31.812641048 +0100
+@@ -43,6 +43,7 @@
+ #include "toplev.h"
+ #include "except.h"
+ #include "tree.h"
++#include "protector.h"
+
+ /* This file contains the reload pass of the compiler, which is
+ run after register allocation has been done. It checks that
+@@ -891,7 +892,7 @@
+ if (cfun->stack_alignment_needed)
+ assign_stack_local (BLKmode, 0, cfun->stack_alignment_needed);
+
+- starting_frame_size = get_frame_size ();
++ starting_frame_size = get_frame_size () - get_frame_free_size ();
+
+ set_initial_elim_offsets ();
+ set_initial_label_offsets ();
+@@ -955,7 +956,7 @@
+ setup_save_areas ();
+
+ /* If we allocated another stack slot, redo elimination bookkeeping. */
+- if (starting_frame_size != get_frame_size ())
++ if (starting_frame_size != get_frame_size () - get_frame_free_size ())
+ continue;
+
+ if (caller_save_needed)
+@@ -974,7 +975,7 @@
+
+ /* If we allocated any new memory locations, make another pass
+ since it might have changed elimination offsets. */
+- if (starting_frame_size != get_frame_size ())
++ if (starting_frame_size != get_frame_size () - get_frame_free_size ())
+ something_changed = 1;
+
+ {
+@@ -1066,11 +1067,11 @@
+ if (insns_need_reload != 0 || something_needs_elimination
+ || something_needs_operands_changed)
+ {
+- HOST_WIDE_INT old_frame_size = get_frame_size ();
++ HOST_WIDE_INT old_frame_size = get_frame_size () - get_frame_free_size ();
+
+ reload_as_needed (global);
+
+- if (old_frame_size != get_frame_size ())
++ if (old_frame_size != get_frame_size () - get_frame_free_size ())
+ abort ();
+
+ if (num_eliminable)
+@@ -1957,8 +1958,10 @@
+ inherent space, and no less total space, then the previous slot. */
+ if (from_reg == -1)
+ {
+- /* No known place to spill from => no slot to reuse. */
+- x = assign_stack_local (GET_MODE (regno_reg_rtx[i]), total_size,
++ /* No known place to spill from => no slot to reuse.
++ For the stack protection, an allocated slot should be placed in
++ the safe region from the stack smaching attack. */
++ x = assign_stack_local_for_pseudo_reg (GET_MODE (regno_reg_rtx[i]), total_size,
+ inherent_size == total_size ? 0 : -1);
+ if (BYTES_BIG_ENDIAN)
+ /* Cancel the big-endian correction done in assign_stack_local.
+diff -uNr gcc-3.4.3.orig/gcc/rtl.h gcc-3.4.3/gcc/rtl.h
+--- gcc-3.4.3.orig/gcc/rtl.h 2004-10-13 01:35:32.000000000 +0200
++++ gcc-3.4.3/gcc/rtl.h 2004-11-24 18:35:31.830638312 +0100
+@@ -473,6 +473,18 @@
+ __FUNCTION__); \
+ _rtx; })
+
++#define RTL_FLAG_CHECK9(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8, C9) \
++ __extension__ \
++({ rtx const _rtx = (RTX); \
++ if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
++ && GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4 \
++ && GET_CODE(_rtx) != C5 && GET_CODE(_rtx) != C6 \
++ && GET_CODE(_rtx) != C7 && GET_CODE(_rtx) != C8 \
++ && GET_CODE(_rtx) != C9) \
++ rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
++ __FUNCTION__); \
++ _rtx; })
++
+ extern void rtl_check_failed_flag (const char *, rtx, const char *,
+ int, const char *)
+ ATTRIBUTE_NORETURN
+@@ -488,6 +500,7 @@
+ #define RTL_FLAG_CHECK6(NAME, RTX, C1, C2, C3, C4, C5, C6) (RTX)
+ #define RTL_FLAG_CHECK7(NAME, RTX, C1, C2, C3, C4, C5, C6, C7) (RTX)
+ #define RTL_FLAG_CHECK8(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8) (RTX)
++#define RTL_FLAG_CHECK9(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8, C9) (RTX)
+ #endif
+
+ #define CLEAR_RTX_FLAGS(RTX) \
+@@ -583,9 +596,9 @@
+ #define LOG_LINKS(INSN) XEXP(INSN, 7)
+
+ #define RTX_INTEGRATED_P(RTX) \
+- (RTL_FLAG_CHECK8("RTX_INTEGRATED_P", (RTX), INSN, CALL_INSN, \
++ (RTL_FLAG_CHECK9("RTX_INTEGRATED_P", (RTX), INSN, CALL_INSN, \
+ JUMP_INSN, INSN_LIST, BARRIER, CODE_LABEL, CONST, \
+- NOTE)->integrated)
++ PLUS, NOTE)->integrated)
+ #define RTX_UNCHANGING_P(RTX) \
+ (RTL_FLAG_CHECK3("RTX_UNCHANGING_P", (RTX), REG, MEM, CONCAT)->unchanging)
+ #define RTX_FRAME_RELATED_P(RTX) \
+@@ -1125,6 +1138,10 @@
+ (RTL_FLAG_CHECK3("MEM_VOLATILE_P", (RTX), MEM, ASM_OPERANDS, \
+ ASM_INPUT)->volatil)
+
++/* 1 if RTX is an SET rtx that is not eliminated for the stack protection. */
++#define SET_VOLATILE_P(RTX) \
++ (RTL_FLAG_CHECK1("SET_VOLATILE_P", (RTX), SET)->volatil)
++
+ /* 1 if RTX is a mem that refers to an aggregate, either to the
+ aggregate itself of to a field of the aggregate. If zero, RTX may
+ or may not be such a reference. */
+diff -uNr gcc-3.4.3.orig/gcc/simplify-rtx.c gcc-3.4.3/gcc/simplify-rtx.c
+--- gcc-3.4.3.orig/gcc/simplify-rtx.c 2004-10-10 23:53:35.000000000 +0200
++++ gcc-3.4.3/gcc/simplify-rtx.c 2004-11-24 18:35:31.858634056 +0100
+@@ -2287,6 +2287,7 @@
+ int n_ops = 2, input_ops = 2, input_consts = 0, n_consts;
+ int first, changed;
+ int i, j;
++ HOST_WIDE_INT fp_offset = 0;
+
+ memset (ops, 0, sizeof ops);
+
+@@ -2312,6 +2313,10 @@
+ switch (this_code)
+ {
+ case PLUS:
++ if (flag_propolice_protection
++ && XEXP (this_op, 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (this_op, 1)) == CONST_INT)
++ fp_offset = INTVAL (XEXP (this_op, 1));
+ case MINUS:
+ if (n_ops == 7)
+ return NULL_RTX;
+@@ -2473,11 +2478,24 @@
+ && GET_CODE (ops[n_ops - 1].op) == CONST_INT
+ && CONSTANT_P (ops[n_ops - 2].op))
+ {
+- rtx value = ops[n_ops - 1].op;
+- if (ops[n_ops - 1].neg ^ ops[n_ops - 2].neg)
+- value = neg_const_int (mode, value);
+- ops[n_ops - 2].op = plus_constant (ops[n_ops - 2].op, INTVAL (value));
+- n_ops--;
++ if (!flag_propolice_protection)
++ {
++ rtx value = ops[n_ops - 1].op;
++ if (ops[n_ops - 1].neg ^ ops[n_ops - 2].neg)
++ value = neg_const_int (mode, value);
++ ops[n_ops - 2].op = plus_constant (ops[n_ops - 2].op, INTVAL (value));
++ n_ops--;
++ }
++ /* The stack protector keeps the addressing style of a local variable,
++ so it doesn't use neg_const_int function not to change
++ the offset value. */
++ else {
++ HOST_WIDE_INT value = INTVAL (ops[n_ops - 1].op);
++ if (ops[n_ops - 1].neg ^ ops[n_ops - 2].neg)
++ value = -value;
++ ops[n_ops - 2].op = plus_constant (ops[n_ops - 2].op, value);
++ n_ops--;
++ }
+ }
+
+ /* Count the number of CONSTs that we generated. */
+@@ -2495,6 +2513,59 @@
+ || (n_ops + n_consts == input_ops && n_consts <= input_consts)))
+ return NULL_RTX;
+
++ if (flag_propolice_protection)
++ {
++ /* keep the addressing style of local variables
++ as (plus (virtual_stack_vars_rtx) (CONST_int x)).
++ For the case array[r-1],
++ converts from (+ (+VFP c1) (+r -1)) to (SET R (+VFP c1)) (+ R (+r -1)).
++
++ This loop finds ops[i] which is the register for the frame
++ addressing, Then, makes the frame addressing using the register and
++ the constant of ops[n_ops - 1]. */
++ for (i = 0; i < n_ops; i++)
++#ifdef FRAME_GROWS_DOWNWARD
++ if (ops[i].op == virtual_stack_vars_rtx)
++#else
++ if (ops[i].op == virtual_stack_vars_rtx
++ || ops[i].op == frame_pointer_rtx)
++#endif
++ {
++ if (GET_CODE (ops[n_ops - 1].op) == CONST_INT)
++ {
++ HOST_WIDE_INT value = INTVAL (ops[n_ops - 1].op);
++ if (value >= fp_offset)
++ {
++ ops[i].op = plus_constant (ops[i].op, value);
++ n_ops--;
++ }
++ else
++ {
++ if (!force
++ && (n_ops + 1 + n_consts > input_ops
++ || (n_ops + 1 + n_consts == input_ops
++ && n_consts <= input_consts)))
++ return NULL_RTX;
++ ops[n_ops - 1].op = GEN_INT (value-fp_offset);
++ ops[i].op = plus_constant (ops[i].op, fp_offset);
++ }
++ }
++ /* keep the following address pattern;
++ (1) buf[BUFSIZE] is the first assigned variable.
++ (+ (+ fp -BUFSIZE) BUFSIZE)
++ (2) ((+ (+ fp 1) r) -1). */
++ else if (fp_offset != 0)
++ return NULL_RTX;
++ /* keep the (+ fp 0) pattern for the following case;
++ (1) buf[i]: i: REG, buf: (+ fp 0) in !FRAME_GROWS_DOWNWARD
++ (2) argument: the address is (+ fp 0). */
++ else if (fp_offset == 0)
++ return NULL_RTX;
++
++ break;
++ }
++ }
++
+ /* Put a non-negated operand first, if possible. */
+
+ for (i = 0; i < n_ops && ops[i].neg; i++)
+diff -uNr gcc-3.4.3.orig/gcc/testsuite/gcc.dg/ssp-warn.c gcc-3.4.3/gcc/testsuite/gcc.dg/ssp-warn.c
+--- gcc-3.4.3.orig/gcc/testsuite/gcc.dg/ssp-warn.c 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.3/gcc/testsuite/gcc.dg/ssp-warn.c 2003-11-21 09:41:19.000000000 +0100
+@@ -0,0 +1,32 @@
++/* { dg-do compile } */
++/* { dg-options "-fstack-protector" } */
++void
++test1()
++{
++ void intest1(int *a)
++ {
++ *a ++;
++ }
++
++ char buf[80];
++
++ buf[0] = 0;
++} /* { dg-bogus "not protecting function: it contains functions" } */
++
++void
++test2(int n)
++{
++ char buf[80];
++ char vbuf[n];
++
++ buf[0] = 0;
++ vbuf[0] = 0;
++} /* { dg-bogus "not protecting variables: it has a variable length buffer" } */
++
++void
++test3()
++{
++ char buf[5];
++
++ buf[0] = 0;
++} /* { dg-bogus "not protecting function: buffer is less than 8 bytes long" } */
+diff -uNr gcc-3.4.3.orig/gcc/testsuite/gcc.misc-tests/ssp-execute1.c gcc-3.4.3/gcc/testsuite/gcc.misc-tests/ssp-execute1.c
+--- gcc-3.4.3.orig/gcc/testsuite/gcc.misc-tests/ssp-execute1.c 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.3/gcc/testsuite/gcc.misc-tests/ssp-execute1.c 2004-02-16 06:15:39.000000000 +0100
+@@ -0,0 +1,54 @@
++/* Test location changes of character array. */
++
++void
++test(int i)
++{
++ int ibuf1[10];
++ char buf[50];
++ int ibuf2[10];
++ char buf2[50000];
++ int ibuf3[10];
++ char *p;
++
++ /* c1: the frame offset of buf[0]
++ c2: the frame offset of buf2[0]
++ */
++ p= &buf[0]; *p=1; /* expected rtl: (+ fp -c1) */
++ if (*p != buf[0])
++ abort();
++ p= &buf[5]; *p=2; /* expected rtl: (+ fp -c1+5) */
++ if (*p != buf[5])
++ abort();
++ p= &buf[-1]; *p=3; /* expected rtl: (+ (+ fp -c1) -1) */
++ if (*p != buf[-1])
++ abort();
++ p= &buf[49]; *p=4; /* expected rtl: (+ fp -c1+49) */
++ if (*p != buf[49])
++ abort();
++ p = &buf[i+5]; *p=5; /* expected rtl: (+ (+ fp -c1) (+ i 5)) */
++ if (*p != buf[i+5])
++ abort ();
++ p = buf - 1; *p=6; /* expected rtl: (+ (+ fp -c1) -1) */
++ if (*p != buf[-1])
++ abort ();
++ p = 1 + buf; *p=7; /* expected rtl: (+ (+ fp -c1) 1) */
++ if (*p != buf[1])
++ abort ();
++ p = &buf[1] - 1; *p=8; /* expected rtl: (+ (+ fp -c1+1) -1) */
++ if (*p != buf[0])
++ abort ();
++
++ /* test big offset which is greater than the max value of signed 16 bit integer. */
++ p = &buf2[45555]; *p=9; /* expected rtl: (+ fp -c2+45555) */
++ if (*p != buf2[45555])
++ abort ();
++}
++
++int main()
++{
++ test(10);
++ exit(0);
++}
++
++
++
+diff -uNr gcc-3.4.3.orig/gcc/testsuite/gcc.misc-tests/ssp-execute2.c gcc-3.4.3/gcc/testsuite/gcc.misc-tests/ssp-execute2.c
+--- gcc-3.4.3.orig/gcc/testsuite/gcc.misc-tests/ssp-execute2.c 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.3/gcc/testsuite/gcc.misc-tests/ssp-execute2.c 2003-11-22 09:44:33.000000000 +0100
+@@ -0,0 +1,49 @@
++void
++test(int i, char *j, int k)
++{
++ int a[10];
++ char b;
++ int c;
++ long *d;
++ char buf[50];
++ long e[10];
++ int n;
++
++ a[0] = 4;
++ b = 5;
++ c = 6;
++ d = (long*)7;
++ e[0] = 8;
++
++ /* overflow buffer */
++ for (n = 0; n < 120; n++)
++ buf[n] = 0;
++
++ if (j == 0 || *j != 2)
++ abort ();
++ if (a[0] == 0)
++ abort ();
++ if (b == 0)
++ abort ();
++ if (c == 0)
++ abort ();
++ if (d == 0)
++ abort ();
++ if (e[0] == 0)
++ abort ();
++
++ exit (0);
++}
++
++int main()
++{
++ int i, k;
++ int j[40];
++ i = 1;
++ j[39] = 2;
++ k = 3;
++ test(i, &j[39], k);
++}
++
++
++
+diff -uNr gcc-3.4.3.orig/gcc/testsuite/gcc.misc-tests/ssp-execute.exp gcc-3.4.3/gcc/testsuite/gcc.misc-tests/ssp-execute.exp
+--- gcc-3.4.3.orig/gcc/testsuite/gcc.misc-tests/ssp-execute.exp 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.3/gcc/testsuite/gcc.misc-tests/ssp-execute.exp 2004-06-02 13:23:36.000000000 +0200
+@@ -0,0 +1,35 @@
++# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++
++if $tracelevel then {
++ strace $tracelevel
++}
++
++# Load support procs.
++load_lib c-torture.exp
++
++#
++# main test loop
++#
++
++foreach src [lsort [glob -nocomplain $srcdir/$subdir/ssp-execute*.c]] {
++ # If we're only testing specific files and this isn't one of them, skip it.
++ if ![runtest_file_p $runtests $src] then {
++ continue
++ }
++
++ c-torture-execute $src -fstack-protector
++}
+diff -uNr gcc-3.4.3.orig/gcc/toplev.c gcc-3.4.3/gcc/toplev.c
+--- gcc-3.4.3.orig/gcc/toplev.c 2004-07-26 16:42:11.000000000 +0200
++++ gcc-3.4.3/gcc/toplev.c 2004-11-24 18:35:31.000000000 +0100
+@@ -79,6 +79,7 @@
+ #include "coverage.h"
+ #include "value-prof.h"
+ #include "alloc-pool.h"
++#include "protector.h"
+
+ #if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
+ #include "dwarf2out.h"
+@@ -97,6 +98,10 @@
+ declarations for e.g. AIX 4.x. */
+ #endif
+
++#ifdef STACK_PROTECTOR
++#include "protector.h"
++#endif
++
+ #ifndef HAVE_conditional_execution
+ #define HAVE_conditional_execution 0
+ #endif
+@@ -979,6 +984,15 @@
+ minimum function alignment. Zero means no alignment is forced. */
+ int force_align_functions_log;
+
++#if defined(STACK_PROTECTOR) && defined(STACK_GROWS_DOWNWARD)
++/* Nonzero means use propolice as a stack protection method */
++int flag_propolice_protection = 1;
++int flag_stack_protection = 0;
++#else
++int flag_propolice_protection = 0;
++int flag_stack_protection = 0;
++#endif
++
+ typedef struct
+ {
+ const char *const string;
+@@ -1154,7 +1168,9 @@
+ {"mem-report", &mem_report, 1 },
+ { "trapv", &flag_trapv, 1 },
+ { "wrapv", &flag_wrapv, 1 },
+- { "new-ra", &flag_new_regalloc, 1 }
++ { "new-ra", &flag_new_regalloc, 1 },
++ {"stack-protector", &flag_propolice_protection, 1 },
++ {"stack-protector-all", &flag_stack_protection, 1 }
+ };
+
+ /* Here is a table, controlled by the tm.h file, listing each -m switch
+@@ -2686,6 +2702,9 @@
+
+ insns = get_insns ();
+
++ if (flag_propolice_protection)
++ prepare_stack_protection (inlinable);
++
+ /* Dump the rtl code if we are dumping rtl. */
+
+ if (open_dump_file (DFI_rtl, decl))
+@@ -4483,6 +4502,12 @@
+ /* The presence of IEEE signaling NaNs, implies all math can trap. */
+ if (flag_signaling_nans)
+ flag_trapping_math = 1;
++
++ /* This combination makes optimized frame addressings and causes
++ a internal compilation error at prepare_stack_protection.
++ so don't allow it. */
++ if (flag_stack_protection && !flag_propolice_protection)
++ flag_propolice_protection = TRUE;
+ }
+
+ /* Initialize the compiler back end. */
+diff -uNr gcc-3.4.3.orig/gcc/tree.h gcc-3.4.3/gcc/tree.h
+--- gcc-3.4.3.orig/gcc/tree.h 2004-11-24 18:04:19.000000000 +0100
++++ gcc-3.4.3/gcc/tree.h 2004-11-24 18:35:31.000000000 +0100
+@@ -1489,6 +1489,10 @@
+ where it is called. */
+ #define DECL_INLINE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.inline_flag)
+
++/* In a VAR_DECL, nonzero if the declaration is copied for inlining.
++ The stack protector should keep its location in the stack. */
++#define DECL_COPIED(NODE) (VAR_DECL_CHECK (NODE)->decl.inline_flag)
++
+ /* Nonzero in a FUNCTION_DECL means that this function was declared inline,
+ such as via the `inline' keyword in C/C++. This flag controls the linkage
+ semantics of 'inline'; whether or not the function is inlined is
--- /dev/null
+diff -aur gcc-3.4.0orig/gcc/c-common.c gcc-3.4.0/gcc/c-common.c
+--- gcc-3.4.0orig/gcc/c-common.c 2004-03-19 01:32:59.000000000 +0000
++++ gcc-3.4.0/gcc/c-common.c 2004-05-10 21:05:33.000000000 +0100
+@@ -833,7 +833,7 @@
+ handle_deprecated_attribute },
+ { "vector_size", 1, 1, false, true, false,
+ handle_vector_size_attribute },
+- { "visibility", 1, 1, true, false, false,
++ { "visibility", 1, 1, false, false, false,
+ handle_visibility_attribute },
+ { "tls_model", 1, 1, true, false, false,
+ handle_tls_model_attribute },
+@@ -4886,7 +4886,16 @@
+
+ *no_add_attrs = true;
+
+- if (decl_function_context (decl) != 0 || ! TREE_PUBLIC (decl))
++ if (TYPE_P (*node))
++ {
++ if (TREE_CODE (*node) != RECORD_TYPE && TREE_CODE (*node) != UNION_TYPE)
++ {
++ warning ("`%s' attribute ignored on non-class types",
++ IDENTIFIER_POINTER (name));
++ return NULL_TREE;
++ }
++ }
++ else if (decl_function_context (decl) != 0 || ! TREE_PUBLIC (decl))
+ {
+ warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ return NULL_TREE;
+@@ -4897,6 +4906,14 @@
+ error ("visibility arg not a string");
+ return NULL_TREE;
+ }
++
++ /* If this is a type, set the visibility on the type decl. */
++ if (TYPE_P (decl))
++ {
++ decl = TYPE_NAME (decl);
++ if (! decl)
++ return NULL_TREE;
++ }
+
+ if (strcmp (TREE_STRING_POINTER (id), "default") == 0)
+ DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT;
+@@ -4908,6 +4925,14 @@
+ DECL_VISIBILITY (decl) = VISIBILITY_PROTECTED;
+ else
+ error ("visibility arg must be one of \"default\", \"hidden\", \"protected\" or \"internal\"");
++ DECL_VISIBILITYSPECIFIED (decl) = 1;
++
++ /* For decls only, go ahead and attach the attribute to the node as well.
++ This is needed so we can determine whether we have VISIBILITY_DEFAULT
++ because the visibility was not specified, or because it was explicitly
++ overridden from the class visibility. */
++ if (DECL_P (*node))
++ *no_add_attrs = false;
+
+ return NULL_TREE;
+ }
+
+diff -aur gcc-3.4.0orig/gcc/c-decl.c gcc-3.4.0/gcc/c-decl.c
+--- gcc-3.4.0orig/gcc/c-decl.c 2004-03-22 17:58:18.000000000 +0000
++++ gcc-3.4.0/gcc/c-decl.c 2004-05-10 15:16:27.000000000 +0100
+@@ -1164,9 +1164,8 @@
+ }
+
+ /* warnings */
+- /* All decls must agree on a non-default visibility. */
+- if (DECL_VISIBILITY (newdecl) != VISIBILITY_DEFAULT
+- && DECL_VISIBILITY (olddecl) != VISIBILITY_DEFAULT
++ /* All decls must agree on a visibility. */
++ if (DECL_VISIBILITYSPECIFIED (newdecl) && DECL_VISIBILITYSPECIFIED (olddecl)
+ && DECL_VISIBILITY (newdecl) != DECL_VISIBILITY (olddecl))
+ {
+ warning ("%Jredeclaration of '%D' with different visibility "
+@@ -1361,9 +1360,12 @@
+ Currently, it can only be defined in the prototype. */
+ COPY_DECL_ASSEMBLER_NAME (olddecl, newdecl);
+
+- /* If either declaration has a nondefault visibility, use it. */
+- if (DECL_VISIBILITY (olddecl) != VISIBILITY_DEFAULT)
+- DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl);
++ /* Use visibility of whichever declaration had it specified */
++ if (DECL_VISIBILITYSPECIFIED (olddecl))
++ {
++ DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl);
++ DECL_VISIBILITYSPECIFIED (newdecl) = 1;
++ }
+
+ if (TREE_CODE (newdecl) == FUNCTION_DECL)
+ {
+
+diff -aur gcc-3.4.0orig/gcc/common.opt gcc-3.4.0/gcc/common.opt
+--- gcc-3.4.0orig/gcc/common.opt 2004-02-18 00:09:04.000000000 +0000
++++ gcc-3.4.0/gcc/common.opt 2004-05-09 08:10:50.000000000 +0100
+@@ -718,6 +718,11 @@
+ Common
+ Add extra commentary to assembler output
+
++fvisibility=
++Common Joined RejectNegative
++-fvisibility=[default|internal|hidden|protected] Set the default symbol visibility
++
++
+ fvpt
+ Common
+ Use expression value profiles in optimizations
+
+diff -aur gcc-3.4.0orig/gcc/c.opt gcc-3.4.0/gcc/c.opt
+--- gcc-3.4.0orig/gcc/c.opt 2004-02-18 00:09:03.000000000 +0000
++++ gcc-3.4.0/gcc/c.opt 2004-05-09 08:10:50.000000000 +0100
+@@ -656,6 +656,10 @@
+ C++ ObjC++
+ Use __cxa_atexit to register destructors
+
++fvisibility-inlines-hidden
++C++
++Marks all inlined methods as having hidden visibility
++
+ fvtable-gc
+ C++ ObjC++
+ Discard unused virtual functions
+diff -aur gcc-3.4.0orig/gcc/c-opts.c gcc-3.4.0/gcc/c-opts.c
+--- gcc-3.4.0orig/gcc/c-opts.c 2004-02-18 00:09:03.000000000 +0000
++++ gcc-3.4.0/gcc/c-opts.c 2004-05-09 08:10:50.000000000 +0100
+@@ -912,6 +912,10 @@
+ case OPT_fuse_cxa_atexit:
+ flag_use_cxa_atexit = value;
+ break;
++
++ case OPT_fvisibility_inlines_hidden:
++ visibility_options.inlineshidden = value;
++ break;
+
+ case OPT_fweak:
+ flag_weak = value;
+
+diff -aur gcc-3.4.0orig/gcc/cp/class.c gcc-3.4.0/gcc/cp/class.c
+--- gcc-3.4.0orig/gcc/cp/class.c 2004-03-09 07:27:23.000000000 +0000
++++ gcc-3.4.0/gcc/cp/class.c 2004-05-10 21:06:50.000000000 +0100
+@@ -524,6 +524,10 @@
+ DECL_ALIGN (decl) = MAX (TYPE_ALIGN (double_type_node),
+ DECL_ALIGN (decl));
+
++ /* The vtable's visibility is the class visibility. There is no way
++ to override the visibility for just the vtable. */
++ DECL_VISIBILITY (decl) = CLASSTYPE_VISIBILITY (class_type);
++ DECL_VISIBILITYSPECIFIED (decl) = CLASSTYPE_VISIBILITYSPECIFIED (class_type);
+ import_export_vtable (decl, class_type, 0);
+
+ return decl;
+@@ -2971,7 +2975,25 @@
+ continue;
+
+ if (TREE_CODE (x) == CONST_DECL || TREE_CODE (x) == VAR_DECL)
+- continue;
++ {
++ /* Apply the class's visibility attribute to static members
++ which do not have a visibility attribute. */
++ if (! lookup_attribute ("visibility", DECL_ATTRIBUTES (x)))
++ {
++ if (visibility_options.inlineshidden && DECL_INLINE (x))
++ {
++ DECL_VISIBILITY (x) = VISIBILITY_HIDDEN;
++ DECL_VISIBILITYSPECIFIED (x) = 1;
++ }
++ else
++ {
++ DECL_VISIBILITY (x) = CLASSTYPE_VISIBILITY (current_class_type);
++ DECL_VISIBILITYSPECIFIED (x) = CLASSTYPE_VISIBILITYSPECIFIED (current_class_type);
++ }
++ }
++
++ continue;
++ }
+
+ /* Now it can only be a FIELD_DECL. */
+
+@@ -3708,6 +3730,22 @@
+ check_for_override (x, t);
+ if (DECL_PURE_VIRTUAL_P (x) && ! DECL_VINDEX (x))
+ cp_error_at ("initializer specified for non-virtual method `%D'", x);
++
++ /* Apply the class's visibility attribute to methods which do
++ not have a visibility attribute. */
++ if (! lookup_attribute ("visibility", DECL_ATTRIBUTES (x)))
++ {
++ if (visibility_options.inlineshidden && DECL_INLINE (x))
++ {
++ DECL_VISIBILITY (x) = VISIBILITY_HIDDEN;
++ DECL_VISIBILITYSPECIFIED (x) = 1;
++ }
++ else
++ {
++ DECL_VISIBILITY (x) = CLASSTYPE_VISIBILITY (current_class_type);
++ DECL_VISIBILITYSPECIFIED (x) = CLASSTYPE_VISIBILITYSPECIFIED (current_class_type);
++ }
++ }
+
+ /* The name of the field is the original field name
+ Save this in auxiliary field for later overloading. */
+@@ -7830,3 +7868,4 @@
+ *vid->last_init = build_tree_list (NULL_TREE, init);
+ vid->last_init = &TREE_CHAIN (*vid->last_init);
+ }
++
+
+diff -aur gcc-3.4.0orig/gcc/cp/cp-tree.h gcc-3.4.0/gcc/cp/cp-tree.h
+--- gcc-3.4.0orig/gcc/cp/cp-tree.h 2004-03-20 00:13:08.000000000 +0000
++++ gcc-3.4.0/gcc/cp/cp-tree.h 2004-05-10 20:56:56.000000000 +0100
+@@ -1008,7 +1008,12 @@
+ #define PUBLICLY_UNIQUELY_DERIVED_P(PARENT, TYPE) \
+ (lookup_base ((TYPE), (PARENT), ba_not_special | ba_quiet, NULL) \
+ != NULL_TREE)
+-\f
++
++/* Gives the visibility specification for a class type. */
++#define CLASSTYPE_VISIBILITY(TYPE) DECL_VISIBILITY (TYPE_NAME (TYPE))
++#define CLASSTYPE_VISIBILITYSPECIFIED(TYPE) DECL_VISIBILITYSPECIFIED (TYPE_NAME (TYPE))
++
++
+ /* This is a few header flags for 'struct lang_type'. Actually,
+ all but the first are used only for lang_type_class; they
+ are put in this structure to save space. */
+
+diff -aur gcc-3.4.0orig/gcc/cp/decl.c gcc-3.4.0/gcc/cp/decl.c
+--- gcc-3.4.0orig/gcc/cp/decl.c 2004-04-01 21:47:21.000000000 +0100
++++ gcc-3.4.0/gcc/cp/decl.c 2004-05-28 21:16:11.000000000 +0100
+@@ -1869,17 +1869,34 @@
+ DECL_COMMON (newdecl) = DECL_COMMON (olddecl);
+ COPY_DECL_ASSEMBLER_NAME (olddecl, newdecl);
+
+- /* If either declaration has a nondefault visibility, use it. */
+- if (DECL_VISIBILITY (olddecl) != VISIBILITY_DEFAULT)
++ /* Warn about conflicting visibility specifications. */
++ if (DECL_VISIBILITYSPECIFIED (olddecl) && DECL_VISIBILITYSPECIFIED (newdecl)
++ && DECL_VISIBILITY (newdecl) != DECL_VISIBILITY (olddecl))
++ {
++ warning ("%J'%D': visibility attribute ignored because it",
++ newdecl, newdecl);
++ warning ("%Jconflicts with previous declaration here", olddecl);
++ }
++ /* Choose the declaration which specified visibility. */
++ if (DECL_VISIBILITYSPECIFIED (olddecl))
+ {
+- if (DECL_VISIBILITY (newdecl) != VISIBILITY_DEFAULT
+- && DECL_VISIBILITY (newdecl) != DECL_VISIBILITY (olddecl))
+- {
+- warning ("%J'%D': visibility attribute ignored because it",
+- newdecl, newdecl);
+- warning ("%Jconflicts with previous declaration here", olddecl);
+- }
+ DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl);
++ DECL_VISIBILITYSPECIFIED (newdecl) = 1;
++ }
++ /* If it's a definition of a global operator new or operator
++ delete, it must be default visibility. */
++ if (NEW_DELETE_OPNAME_P (DECL_NAME (newdecl)) && DECL_INITIAL (newdecl) != NULL_TREE)
++ {
++ if (!DECL_FUNCTION_MEMBER_P (newdecl) && VISIBILITY_DEFAULT != DECL_VISIBILITY (newdecl))
++ {
++ warning ("%J`%D': ignoring non-default symbol",
++ newdecl, newdecl);
++ warning ("%Jvisibility on global operator new or delete", newdecl);
++ DECL_VISIBILITY (olddecl) = VISIBILITY_DEFAULT;
++ DECL_VISIBILITYSPECIFIED (olddecl) = 1;
++ DECL_VISIBILITY (newdecl) = VISIBILITY_DEFAULT;
++ DECL_VISIBILITYSPECIFIED (newdecl) = 1;
++ }
+ }
+
+ if (TREE_CODE (newdecl) == FUNCTION_DECL)
+
+diff -aur gcc-3.4.0orig/gcc/cp/method.c gcc-3.4.0/gcc/cp/method.c
+--- gcc-3.4.0orig/gcc/cp/method.c 2004-04-08 23:15:58.000000000 +0100
++++ gcc-3.4.0/gcc/cp/method.c 2004-05-09 08:10:52.000000000 +0100
+@@ -394,6 +394,7 @@
+ rewrite. */
+ TREE_PUBLIC (thunk_fndecl) = TREE_PUBLIC (function);
+ DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function);
++ DECL_VISIBILITYSPECIFIED (thunk_fndecl) = DECL_VISIBILITYSPECIFIED (function);
+
+ if (flag_syntax_only)
+ {
+
+diff -aur gcc-3.4.0orig/gcc/cp/optimize.c gcc-3.4.0/gcc/cp/optimize.c
+--- gcc-3.4.0orig/gcc/cp/optimize.c 2004-02-08 01:52:50.000000000 +0000
++++ gcc-3.4.0/gcc/cp/optimize.c 2004-05-09 08:10:52.000000000 +0100
+@@ -155,6 +155,7 @@
+ DECL_NOT_REALLY_EXTERN (clone) = DECL_NOT_REALLY_EXTERN (fn);
+ TREE_PUBLIC (clone) = TREE_PUBLIC (fn);
+ DECL_VISIBILITY (clone) = DECL_VISIBILITY (fn);
++ DECL_VISIBILITYSPECIFIED (clone) = DECL_VISIBILITYSPECIFIED (fn);
+
+ /* Adjust the parameter names and locations. */
+ parm = DECL_ARGUMENTS (fn);
+
+diff -aur gcc-3.4.0orig/gcc/cp/rtti.c gcc-3.4.0/gcc/cp/rtti.c
+--- gcc-3.4.0orig/gcc/cp/rtti.c 2004-03-08 23:00:26.000000000 +0000
++++ gcc-3.4.0/gcc/cp/rtti.c 2004-05-10 21:09:21.000000000 +0100
+@@ -361,7 +361,11 @@
+ pushdecl_top_level_and_finish (d, NULL_TREE);
+
+ if (CLASS_TYPE_P (type))
+- CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d;
++ {
++ CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d;
++ DECL_VISIBILITY (d) = CLASSTYPE_VISIBILITY (type);
++ DECL_VISIBILITYSPECIFIED (d) = CLASSTYPE_VISIBILITYSPECIFIED (type);
++ }
+
+ /* Remember the type it is for. */
+ TREE_TYPE (name) = type;
+@@ -759,6 +763,11 @@
+ TREE_STATIC (name_decl) = 1;
+ DECL_EXTERNAL (name_decl) = 0;
+ TREE_PUBLIC (name_decl) = 1;
++ if (CLASS_TYPE_P (target))
++ {
++ DECL_VISIBILITY (name_decl) = CLASSTYPE_VISIBILITY (target);
++ DECL_VISIBILITYSPECIFIED (name_decl) = CLASSTYPE_VISIBILITYSPECIFIED (target);
++ }
+ import_export_tinfo (name_decl, target, typeinfo_in_lib_p (target));
+ /* External name of the string containing the type's name has a
+ special name. */
+
+diff -aur gcc-3.4.0orig/gcc/c-pragma.c gcc-3.4.0/gcc/c-pragma.c
+--- gcc-3.4.0orig/gcc/c-pragma.c 2004-01-23 23:35:53.000000000 +0000
++++ gcc-3.4.0/gcc/c-pragma.c 2004-05-09 08:10:52.000000000 +0100
+@@ -480,6 +480,86 @@
+ return asmname;
+ }
+
++
++#ifdef HANDLE_PRAGMA_VISIBILITY
++static void handle_pragma_visibility (cpp_reader *);
++
++/* Sets the default visibility for symbols to something other than that
++ specified on the command line. */
++static void
++handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED)
++{ /* Form is #pragma GCC visibility push(hidden)|pop */
++ static int visstack [16], visidx;
++ tree x;
++ enum cpp_ttype token;
++ enum { bad, push, pop } action = bad;
++
++ token = c_lex (&x);
++ if (token == CPP_NAME)
++ {
++ const char *op = IDENTIFIER_POINTER (x);
++ if (!strcmp (op, "push"))
++ action = push;
++ else if (!strcmp (op, "pop"))
++ action = pop;
++ }
++ if (bad == action)
++ GCC_BAD ("#pragma GCC visibility must be followed by push or pop");
++ else
++ {
++ if (pop == action)
++ {
++ if (!visidx)
++ {
++ GCC_BAD ("No matching push for '#pragma GCC visibility pop'");
++ }
++ else
++ {
++ default_visibility = visstack[--visidx];
++ visibility_options.inpragma = (visidx>0);
++ }
++ }
++ else
++ {
++ if (c_lex (&x) != CPP_OPEN_PAREN)
++ GCC_BAD ("missing '(' after '#pragma GCC visibility push' - ignored");
++ token = c_lex (&x);
++ if (token != CPP_NAME)
++ {
++ GCC_BAD ("malformed #pragma GCC visibility push");
++ }
++ else if (visidx >= 16)
++ {
++ GCC_BAD ("No more than sixteen #pragma GCC visibility pushes allowed at once");
++ }
++ else
++ {
++ const char *str = IDENTIFIER_POINTER (x);
++ visstack[visidx++] = default_visibility;
++ if (!strcmp (str, "default"))
++ default_visibility = VISIBILITY_DEFAULT;
++ else if (!strcmp (str, "internal"))
++ default_visibility = VISIBILITY_INTERNAL;
++ else if (!strcmp (str, "hidden"))
++ default_visibility = VISIBILITY_HIDDEN;
++ else if (!strcmp (str, "protected"))
++ default_visibility = VISIBILITY_PROTECTED;
++ else
++ {
++ GCC_BAD ("#pragma GCC visibility push() must specify default, internal, hidden or protected");
++ }
++ visibility_options.inpragma = 1;
++ }
++ if (c_lex (&x) != CPP_CLOSE_PAREN)
++ GCC_BAD ("missing '(' after '#pragma GCC visibility push' - ignored");
++ }
++ }
++ if (c_lex (&x) != CPP_EOF)
++ warning ("junk at end of '#pragma GCC visibility'");
++}
++
++#endif
++
+ /* Front-end wrapper for pragma registration to avoid dragging
+ cpplib.h in almost everywhere. */
+ void
+@@ -505,6 +585,9 @@
+ #ifdef HANDLE_PRAGMA_EXTERN_PREFIX
+ c_register_pragma (0, "extern_prefix", handle_pragma_extern_prefix);
+ #endif
++#ifdef HANDLE_PRAGMA_VISIBILITY
++ c_register_pragma ("GCC", "visibility", handle_pragma_visibility);
++#endif
+
+ #ifdef REGISTER_TARGET_PRAGMAS
+ REGISTER_TARGET_PRAGMAS ();
+diff -aur gcc-3.4.0orig/gcc/c-pragma.h gcc-3.4.0/gcc/c-pragma.h
+--- gcc-3.4.0orig/gcc/c-pragma.h 2004-01-31 06:18:05.000000000 +0000
++++ gcc-3.4.0/gcc/c-pragma.h 2004-05-09 08:10:53.000000000 +0100
+@@ -44,6 +44,11 @@
+ #define HANDLE_PRAGMA_PACK 1
+ #endif /* HANDLE_PRAGMA_PACK_PUSH_POP */
+
++/* It's safe to always leave visibility pragma enabled as if
++ visibility is not supported on the host OS platform the
++ statements are ignored. */
++#define HANDLE_PRAGMA_VISIBILITY 1
++
+ extern void init_pragma (void);
+
+ /* Front-end wrapper for pragma registration to avoid dragging
+
+
+diff -aur gcc-3.4.0orig/gcc/doc/invoke.texi gcc-3.4.0/gcc/doc/invoke.texi
+--- gcc-3.4.0orig/gcc/doc/invoke.texi 2004-04-19 00:05:36.000000000 +0100
++++ gcc-3.4.0/gcc/doc/invoke.texi 2004-05-28 21:29:36.000000000 +0100
+@@ -183,7 +183,8 @@
+ -fno-optional-diags -fpermissive @gol
+ -frepo -fno-rtti -fstats -ftemplate-depth-@var{n} @gol
+ -fuse-cxa-atexit -fno-weak -nostdinc++ @gol
+--fno-default-inline -Wabi -Wctor-dtor-privacy @gol
++-fno-default-inline -fvisibility-inlines-hidden @gol
++-Wabi -Wctor-dtor-privacy @gol
+ -Wnon-virtual-dtor -Wreorder @gol
+ -Weffc++ -Wno-deprecated @gol
+ -Wno-non-template-friend -Wold-style-cast @gol
+@@ -674,7 +675,8 @@
+ -fargument-alias -fargument-noalias @gol
+ -fargument-noalias-global -fleading-underscore @gol
+ -ftls-model=@var{model} @gol
+--ftrapv -fwrapv -fbounds-check}
++-ftrapv -fwrapv -fbounds-check @gol
++-fvisibility}
+ @end table
+
+ @menu
+@@ -1433,6 +1435,20 @@
+ destructors, but will only work if your C library supports
+ @code{__cxa_atexit}.
+
++@item -fvisibility-inlines-hidden
++@opindex fvisibility-inlines-hidden
++Causes all inlined methods to be marked with
++@code{__attribute__ ((visibility ("hidden")))} so that they do not
++appear in the export table of a DSO and do not require a PLT indirection
++when used within the DSO. Enabling this option can have a dramatic effect
++on load and link times of a DSO as it massively reduces the size of the
++dynamic export table when the library makes heavy use of templates. While
++it can cause bloating through duplication of code within each DSO where
++it is used, often the wastage is less than the considerable space occupied
++by a long symbol name in the export table which is typical when using
++templates and namespaces. For even more savings, combine with the
++@code{-fvisibility=hidden} switch.
++
+ @item -fno-weak
+ @opindex fno-weak
+ Do not use weak symbol support, even if it is provided by the linker.
+@@ -11198,6 +11214,54 @@
+
+ The default without @option{-fpic} is @code{initial-exec}; with
+ @option{-fpic} the default is @code{global-dynamic}.
++
++@item -fvisibility=@var{default|internal|hidden|protected}
++@opindex fvisibility
++Set the default ELF image symbol visibility to the specified option - all
++symbols will be marked with this unless overrided within the code.
++Using this feature can very substantially improve linking and
++load times of shared object libraries, produce more optimised
++code, provide near-perfect API export and prevent symbol clashes.
++It is @strong{strongly} recommended that you use this in any shared objects
++you distribute.
++
++Despite the nomenclature, @code{default} always means public ie;
++available to be linked against from outside the shared object.
++@code{protected} and @code{internal} are pretty useless in real-world
++usage so the only other commonly used option will be @code{hidden}.
++The default if -fvisibility isn't specified is @code{default} ie; make every
++symbol public - this causes the same behaviour as previous versions of
++GCC.
++
++A good explanation of the benefits offered by ensuring ELF
++symbols have the correct visibility is given by ``How To Write
++Shared Libraries'' by Ulrich Drepper (which can be found at
++@w{@uref{http://people.redhat.com/~drepper/}}) - however a superior
++solution made possible by this option to marking things hidden when
++the default is public is to make the default hidden and mark things
++public. This is the norm with DLL's on Windows and with @option{-fvisibility=hidden}
++and @code{__attribute__ ((visibility("default")))} instead of
++@code{__declspec(dllexport)} you get almost identical semantics with
++identical syntax. This is a great boon to those working with
++cross-platform projects.
++
++For those adding visibility support to existing code, you may find
++@samp{#pragma GCC visibility} of use. This works by you enclosing
++the declarations you wish to set visibility for with (for example)
++@samp{#pragma GCC visibility push(hidden)} and
++@samp{#pragma GCC visibility pop}. These can be nested up to sixteen
++times. Bear in mind that symbol visibility should be viewed @strong{as
++part of the API interface contract} and thus all new code should
++always specify visibility when it is not the default ie; declarations
++only for use within the local DSO should @strong{always} be marked explicitly
++as hidden as so to avoid PLT indirection overheads - making this
++abundantly clear also aids readability and self-documentation of the code.
++Note that due to ISO C++ specification requirements, operator new and
++operator delete must always be of default visibility.
++
++An overview of these techniques, their benefits and how to use them
++is at @w{@uref{http://www.nedprod.com/programs/gccvisibility.html}}.
++
+ @end table
+
+ @c man end
+
+diff -aur gcc-3.4.0orig/gcc/flags.h gcc-3.4.0/gcc/flags.h
+--- gcc-3.4.0orig/gcc/flags.h 2004-02-18 00:09:04.000000000 +0000
++++ gcc-3.4.0/gcc/flags.h 2004-05-09 08:10:53.000000000 +0100
+@@ -60,6 +60,30 @@
+ /* Nonzero means emit debugging information only for symbols which are used. */
+ extern int flag_debug_only_used_symbols;
+
++/* Enumerate visibility settings. */
++#ifndef SYMBOL_VISIBILITY_DEFINED
++#define SYMBOL_VISIBILITY_DEFINED
++enum symbol_visibility
++{
++ VISIBILITY_DEFAULT,
++ VISIBILITY_INTERNAL,
++ VISIBILITY_HIDDEN,
++ VISIBILITY_PROTECTED
++};
++#endif
++
++/* The default visibility for all symbols (unless overridden). */
++extern enum symbol_visibility default_visibility;
++
++struct visibility_flags
++{
++ unsigned inpragma : 1; /* True when in #pragma GCC visibility. */
++ unsigned inlineshidden : 1; /* True when -finlineshidden in effect. */
++};
++
++/* Global visibility options. */
++extern struct visibility_flags visibility_options;
++
+ /* Nonzero means do optimizations. -opt. */
+
+ extern int optimize;
+
+diff -aur gcc-3.4.0orig/gcc/opts.c gcc-3.4.0/gcc/opts.c
+--- gcc-3.4.0orig/gcc/opts.c 2004-02-18 00:09:04.000000000 +0000
++++ gcc-3.4.0/gcc/opts.c 2004-05-09 08:10:53.000000000 +0100
+@@ -142,6 +142,12 @@
+ write_symbols is set to DBX_DEBUG, XCOFF_DEBUG, or DWARF_DEBUG. */
+ bool use_gnu_debug_info_extensions;
+
++/* The default visibility for all symbols (unless overridden) */
++enum symbol_visibility default_visibility = VISIBILITY_DEFAULT;
++
++/* Global visibility options. */
++struct visibility_flags visibility_options;
++
+ /* Columns of --help display. */
+ static unsigned int columns = 80;
+
+@@ -1440,6 +1446,21 @@
+ flag_verbose_asm = value;
+ break;
+
++ case OPT_fvisibility_:
++ {
++ if(!strcmp(arg, "default"))
++ default_visibility=VISIBILITY_DEFAULT;
++ else if(!strcmp(arg, "internal"))
++ default_visibility=VISIBILITY_INTERNAL;
++ else if(!strcmp(arg, "hidden"))
++ default_visibility=VISIBILITY_HIDDEN;
++ else if(!strcmp(arg, "protected"))
++ default_visibility=VISIBILITY_PROTECTED;
++ else
++ error("unrecognised visibility value \"%s\"", arg);
++ }
++ break;
++
+ case OPT_fweb:
+ flag_web = value;
+ break;
+
+diff -aur gcc-3.4.0orig/gcc/tree.c gcc-3.4.0/gcc/tree.c
+--- gcc-3.4.0orig/gcc/tree.c 2004-02-05 22:01:35.000000000 +0000
++++ gcc-3.4.0/gcc/tree.c 2004-05-10 15:22:52.000000000 +0100
+@@ -2563,6 +2563,11 @@
+ layout_decl (t, 0);
+ else if (code == FUNCTION_DECL)
+ DECL_MODE (t) = FUNCTION_MODE;
++
++ /* Set default visibility to whatever the user supplied with
++ visibility_specified depending on #pragma GCC visibility. */
++ DECL_VISIBILITY (t) = default_visibility;
++ DECL_VISIBILITYSPECIFIED (t) = visibility_options.inpragma;
+
+ return t;
+ }
+
+diff -aur gcc-3.4.0orig/gcc/tree.h gcc-3.4.0/gcc/tree.h
+--- gcc-3.4.0orig/gcc/tree.h 2004-02-08 01:52:43.000000000 +0000
++++ gcc-3.4.0/gcc/tree.h 2004-05-09 08:10:54.000000000 +0100
+@@ -1499,6 +1499,10 @@
+ /* Value of the decls's visibility attribute */
+ #define DECL_VISIBILITY(NODE) (DECL_CHECK (NODE)->decl.visibility)
+
++/* Nonzero means that the decl had its visibility specified rather than
++ being inferred. */
++#define DECL_VISIBILITYSPECIFIED(NODE) (DECL_CHECK (NODE)->decl.visibility_specified)
++
+ /* In a FUNCTION_DECL, nonzero if the function cannot be inlined. */
+ #define DECL_UNINLINABLE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.uninlinable)
+
+@@ -1633,7 +1637,8 @@
+ || TREE_CODE (DECL_CONTEXT (EXP)) == TRANSLATION_UNIT_DECL)
+
+ /* Enumerate visibility settings. */
+-
++#ifndef SYMBOL_VISIBILITY_DEFINED
++#define SYMBOL_VISIBILITY_DEFINED
+ enum symbol_visibility
+ {
+ VISIBILITY_DEFAULT,
+@@ -1641,6 +1646,7 @@
+ VISIBILITY_HIDDEN,
+ VISIBILITY_PROTECTED
+ };
++#endif
+
+ struct function;
+
+@@ -1684,8 +1690,7 @@
+ unsigned thread_local_flag : 1;
+ unsigned declared_inline_flag : 1;
+ ENUM_BITFIELD(symbol_visibility) visibility : 2;
+- unsigned unused : 1;
+- /* one unused bit. */
++ unsigned visibility_specified : 1;
+
+ unsigned lang_flag_0 : 1;
+ unsigned lang_flag_1 : 1;
+
+diff -aur gcc-3.4.0orig/gcc/varasm.c gcc-3.4.0/gcc/varasm.c
+--- gcc-3.4.0orig/gcc/varasm.c 2004-04-14 22:14:08.000000000 +0100
++++ gcc-3.4.0/gcc/varasm.c 2004-05-09 08:10:54.000000000 +0100
+@@ -5150,8 +5150,8 @@
+ /* Static variables are always local. */
+ else if (! TREE_PUBLIC (exp))
+ local_p = true;
+- /* A variable is local if the user tells us so. */
+- else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
++ /* A variable is local if the user explicitly tells us so. */
++ else if (DECL_VISIBILITYSPECIFIED (exp) && DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
+ local_p = true;
+ /* Otherwise, variables defined outside this object may not be local. */
+ else if (DECL_EXTERNAL (exp))
+@@ -5159,6 +5159,9 @@
+ /* Linkonce and weak data are never local. */
+ else if (DECL_ONE_ONLY (exp) || DECL_WEAK (exp))
+ local_p = false;
++ /* If none of the above and visibility is not default, make local. */
++ else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
++ local_p = true;
+ /* If PIC, then assume that any global name can be overridden by
+ symbols resolved from other modules. */
+ else if (shlib)
+
--- /dev/null
+--- gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/sinfo.h.orig 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/sinfo.h 2004-06-02 00:54:16.000000000 +0200
+@@ -0,0 +1,847 @@
++/*--------------------------------------------------------------------------*/
++/* */
++/* GNAT COMPILER COMPONENTS */
++/* */
++/* S I N F O */
++/* */
++/* C Header File */
++/* */
++/* Copyright (C) 1992-2004, Free Software Foundation, Inc. */
++/* */
++/* GNAT is free software; you can redistribute it and/or modify it under */
++/* terms of the GNU General Public License as published by the Free Soft- */
++/* ware Foundation; either version 2, or (at your option) any later ver- */
++/* sion. GNAT is distributed in the hope that it will be useful, but WITH- */
++/* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY */
++/* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License */
++/* for more details. You should have received a copy of the GNU General */
++/* Public License distributed with GNAT; see file COPYING. If not, write */
++/* to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, */
++/* MA 02111-1307, USA. */
++/* */
++/* As a special exception, if other files instantiate generics from this */
++/* unit, or you link this unit with other files to produce an executable, */
++/* this unit does not by itself cause the resulting executable to be */
++/* covered by the GNU General Public License. This exception does not */
++/* however invalidate any other reasons why the executable file might be */
++/* covered by the GNU Public License. */
++/* */
++/* GNAT was originally developed by the GNAT team at New York University. */
++/* Extensive contributions were provided by Ada Core Technologies Inc. */
++/* */
++/*--------------------------------------------------------------------------*/
++
++ #define N_Unused_At_Start 0
++ #define N_At_Clause 1
++ #define N_Component_Clause 2
++ #define N_Enumeration_Representation_Clause 3
++ #define N_Mod_Clause 4
++ #define N_Record_Representation_Clause 5
++ #define N_Attribute_Definition_Clause 6
++ #define N_Empty 7
++ #define N_Pragma 8
++ #define N_Pragma_Argument_Association 9
++ #define N_Error 10
++ #define N_Defining_Character_Literal 11
++ #define N_Defining_Identifier 12
++ #define N_Defining_Operator_Symbol 13
++ #define N_Expanded_Name 14
++ #define N_Identifier 15
++ #define N_Operator_Symbol 16
++ #define N_Character_Literal 17
++ #define N_Op_Add 18
++ #define N_Op_Concat 19
++ #define N_Op_Expon 20
++ #define N_Op_Subtract 21
++ #define N_Op_Divide 22
++ #define N_Op_Mod 23
++ #define N_Op_Multiply 24
++ #define N_Op_Rem 25
++ #define N_Op_And 26
++ #define N_Op_Eq 27
++ #define N_Op_Ge 28
++ #define N_Op_Gt 29
++ #define N_Op_Le 30
++ #define N_Op_Lt 31
++ #define N_Op_Ne 32
++ #define N_Op_Or 33
++ #define N_Op_Xor 34
++ #define N_Op_Rotate_Left 35
++ #define N_Op_Rotate_Right 36
++ #define N_Op_Shift_Left 37
++ #define N_Op_Shift_Right 38
++ #define N_Op_Shift_Right_Arithmetic 39
++ #define N_Op_Abs 40
++ #define N_Op_Minus 41
++ #define N_Op_Not 42
++ #define N_Op_Plus 43
++ #define N_Attribute_Reference 44
++ #define N_And_Then 45
++ #define N_Conditional_Expression 46
++ #define N_Explicit_Dereference 47
++ #define N_Function_Call 48
++ #define N_In 49
++ #define N_Indexed_Component 50
++ #define N_Integer_Literal 51
++ #define N_Not_In 52
++ #define N_Null 53
++ #define N_Or_Else 54
++ #define N_Procedure_Call_Statement 55
++ #define N_Qualified_Expression 56
++ #define N_Raise_Constraint_Error 57
++ #define N_Raise_Program_Error 58
++ #define N_Raise_Storage_Error 59
++ #define N_Aggregate 60
++ #define N_Allocator 61
++ #define N_Extension_Aggregate 62
++ #define N_Range 63
++ #define N_Real_Literal 64
++ #define N_Reference 65
++ #define N_Selected_Component 66
++ #define N_Slice 67
++ #define N_String_Literal 68
++ #define N_Subprogram_Info 69
++ #define N_Type_Conversion 70
++ #define N_Unchecked_Expression 71
++ #define N_Unchecked_Type_Conversion 72
++ #define N_Subtype_Indication 73
++ #define N_Component_Declaration 74
++ #define N_Entry_Declaration 75
++ #define N_Formal_Object_Declaration 76
++ #define N_Formal_Type_Declaration 77
++ #define N_Full_Type_Declaration 78
++ #define N_Incomplete_Type_Declaration 79
++ #define N_Loop_Parameter_Specification 80
++ #define N_Object_Declaration 81
++ #define N_Protected_Type_Declaration 82
++ #define N_Private_Extension_Declaration 83
++ #define N_Private_Type_Declaration 84
++ #define N_Subtype_Declaration 85
++ #define N_Function_Specification 86
++ #define N_Procedure_Specification 87
++ #define N_Entry_Index_Specification 88
++ #define N_Freeze_Entity 89
++ #define N_Access_Function_Definition 90
++ #define N_Access_Procedure_Definition 91
++ #define N_Task_Type_Declaration 92
++ #define N_Package_Body_Stub 93
++ #define N_Protected_Body_Stub 94
++ #define N_Subprogram_Body_Stub 95
++ #define N_Task_Body_Stub 96
++ #define N_Function_Instantiation 97
++ #define N_Package_Instantiation 98
++ #define N_Procedure_Instantiation 99
++ #define N_Package_Body 100
++ #define N_Subprogram_Body 101
++ #define N_Protected_Body 102
++ #define N_Task_Body 103
++ #define N_Implicit_Label_Declaration 104
++ #define N_Package_Declaration 105
++ #define N_Single_Task_Declaration 106
++ #define N_Subprogram_Declaration 107
++ #define N_Use_Package_Clause 108
++ #define N_Generic_Package_Declaration 109
++ #define N_Generic_Subprogram_Declaration 110
++ #define N_Constrained_Array_Definition 111
++ #define N_Unconstrained_Array_Definition 112
++ #define N_Exception_Renaming_Declaration 113
++ #define N_Object_Renaming_Declaration 114
++ #define N_Package_Renaming_Declaration 115
++ #define N_Subprogram_Renaming_Declaration 116
++ #define N_Generic_Function_Renaming_Declaration 117
++ #define N_Generic_Package_Renaming_Declaration 118
++ #define N_Generic_Procedure_Renaming_Declaration 119
++ #define N_Abort_Statement 120
++ #define N_Accept_Statement 121
++ #define N_Assignment_Statement 122
++ #define N_Asynchronous_Select 123
++ #define N_Block_Statement 124
++ #define N_Case_Statement 125
++ #define N_Code_Statement 126
++ #define N_Conditional_Entry_Call 127
++ #define N_Delay_Relative_Statement 128
++ #define N_Delay_Until_Statement 129
++ #define N_Entry_Call_Statement 130
++ #define N_Free_Statement 131
++ #define N_Goto_Statement 132
++ #define N_Loop_Statement 133
++ #define N_Null_Statement 134
++ #define N_Raise_Statement 135
++ #define N_Requeue_Statement 136
++ #define N_Return_Statement 137
++ #define N_Selective_Accept 138
++ #define N_Timed_Entry_Call 139
++ #define N_Exit_Statement 140
++ #define N_If_Statement 141
++ #define N_Accept_Alternative 142
++ #define N_Delay_Alternative 143
++ #define N_Elsif_Part 144
++ #define N_Entry_Body_Formal_Part 145
++ #define N_Iteration_Scheme 146
++ #define N_Terminate_Alternative 147
++ #define N_Abortable_Part 148
++ #define N_Abstract_Subprogram_Declaration 149
++ #define N_Access_Definition 150
++ #define N_Access_To_Object_Definition 151
++ #define N_Case_Statement_Alternative 152
++ #define N_Compilation_Unit 153
++ #define N_Compilation_Unit_Aux 154
++ #define N_Component_Association 155
++ #define N_Component_Definition 156
++ #define N_Component_List 157
++ #define N_Derived_Type_Definition 158
++ #define N_Decimal_Fixed_Point_Definition 159
++ #define N_Defining_Program_Unit_Name 160
++ #define N_Delta_Constraint 161
++ #define N_Designator 162
++ #define N_Digits_Constraint 163
++ #define N_Discriminant_Association 164
++ #define N_Discriminant_Specification 165
++ #define N_Enumeration_Type_Definition 166
++ #define N_Entry_Body 167
++ #define N_Entry_Call_Alternative 168
++ #define N_Exception_Declaration 169
++ #define N_Exception_Handler 170
++ #define N_Floating_Point_Definition 171
++ #define N_Formal_Decimal_Fixed_Point_Definition 172
++ #define N_Formal_Derived_Type_Definition 173
++ #define N_Formal_Discrete_Type_Definition 174
++ #define N_Formal_Floating_Point_Definition 175
++ #define N_Formal_Modular_Type_Definition 176
++ #define N_Formal_Ordinary_Fixed_Point_Definition 177
++ #define N_Formal_Package_Declaration 178
++ #define N_Formal_Private_Type_Definition 179
++ #define N_Formal_Signed_Integer_Type_Definition 180
++ #define N_Formal_Subprogram_Declaration 181
++ #define N_Generic_Association 182
++ #define N_Handled_Sequence_Of_Statements 183
++ #define N_Index_Or_Discriminant_Constraint 184
++ #define N_Itype_Reference 185
++ #define N_Label 186
++ #define N_Modular_Type_Definition 187
++ #define N_Number_Declaration 188
++ #define N_Ordinary_Fixed_Point_Definition 189
++ #define N_Others_Choice 190
++ #define N_Package_Specification 191
++ #define N_Parameter_Association 192
++ #define N_Parameter_Specification 193
++ #define N_Protected_Definition 194
++ #define N_Range_Constraint 195
++ #define N_Real_Range_Specification 196
++ #define N_Record_Definition 197
++ #define N_Signed_Integer_Type_Definition 198
++ #define N_Single_Protected_Declaration 199
++ #define N_Subunit 200
++ #define N_Task_Definition 201
++ #define N_Triggering_Alternative 202
++ #define N_Use_Type_Clause 203
++ #define N_Validate_Unchecked_Conversion 204
++ #define N_Variant 205
++ #define N_Variant_Part 206
++ #define N_With_Clause 207
++ #define N_With_Type_Clause 208
++ #define N_Unused_At_End 209
++
++ #define Number_Node_Kinds 210
++ SUBTYPE (N_Access_To_Subprogram_Definition, Node_Kind,
++ N_Access_Function_Definition,
++ N_Access_Procedure_Definition)
++ SUBTYPE (N_Array_Type_Definition, Node_Kind,
++ N_Constrained_Array_Definition,
++ N_Unconstrained_Array_Definition)
++ SUBTYPE (N_Binary_Op, Node_Kind,
++ N_Op_Add,
++ N_Op_Shift_Right_Arithmetic)
++ SUBTYPE (N_Body_Stub, Node_Kind,
++ N_Package_Body_Stub,
++ N_Task_Body_Stub)
++ SUBTYPE (N_Declaration, Node_Kind,
++ N_Component_Declaration,
++ N_Procedure_Specification)
++ SUBTYPE (N_Direct_Name, Node_Kind,
++ N_Identifier,
++ N_Character_Literal)
++ SUBTYPE (N_Entity, Node_Kind,
++ N_Defining_Character_Literal,
++ N_Defining_Operator_Symbol)
++ SUBTYPE (N_Generic_Declaration, Node_Kind,
++ N_Generic_Package_Declaration,
++ N_Generic_Subprogram_Declaration)
++ SUBTYPE (N_Generic_Instantiation, Node_Kind,
++ N_Function_Instantiation,
++ N_Procedure_Instantiation)
++ SUBTYPE (N_Generic_Renaming_Declaration, Node_Kind,
++ N_Generic_Function_Renaming_Declaration,
++ N_Generic_Procedure_Renaming_Declaration)
++ SUBTYPE (N_Has_Chars, Node_Kind,
++ N_Attribute_Definition_Clause,
++ N_Op_Plus)
++ SUBTYPE (N_Has_Entity, Node_Kind,
++ N_Expanded_Name,
++ N_Attribute_Reference)
++ SUBTYPE (N_Has_Etype, Node_Kind,
++ N_Error,
++ N_Subtype_Indication)
++ SUBTYPE (N_Has_Treat_Fixed_As_Integer, Node_Kind,
++ N_Op_Divide,
++ N_Op_Rem)
++ SUBTYPE (N_Later_Decl_Item, Node_Kind,
++ N_Task_Type_Declaration,
++ N_Generic_Subprogram_Declaration)
++ SUBTYPE (N_Op, Node_Kind,
++ N_Op_Add,
++ N_Op_Plus)
++ SUBTYPE (N_Op_Boolean, Node_Kind,
++ N_Op_And,
++ N_Op_Xor)
++ SUBTYPE (N_Op_Compare, Node_Kind,
++ N_Op_Eq,
++ N_Op_Ne)
++ SUBTYPE (N_Op_Shift, Node_Kind,
++ N_Op_Rotate_Left,
++ N_Op_Shift_Right_Arithmetic)
++ SUBTYPE (N_Proper_Body, Node_Kind,
++ N_Package_Body,
++ N_Task_Body)
++ SUBTYPE (N_Raise_xxx_Error, Node_Kind,
++ N_Raise_Constraint_Error,
++ N_Raise_Storage_Error)
++ SUBTYPE (N_Renaming_Declaration, Node_Kind,
++ N_Exception_Renaming_Declaration,
++ N_Generic_Procedure_Renaming_Declaration)
++ SUBTYPE (N_Representation_Clause, Node_Kind,
++ N_At_Clause,
++ N_Attribute_Definition_Clause)
++ SUBTYPE (N_Statement_Other_Than_Procedure_Call, Node_Kind,
++ N_Abort_Statement,
++ N_If_Statement)
++ SUBTYPE (N_Has_Condition, Node_Kind,
++ N_Exit_Statement,
++ N_Terminate_Alternative)
++ SUBTYPE (N_Subexpr, Node_Kind,
++ N_Expanded_Name,
++ N_Unchecked_Type_Conversion)
++ SUBTYPE (N_Subprogram_Specification, Node_Kind,
++ N_Function_Specification,
++ N_Procedure_Specification)
++ SUBTYPE (N_Unary_Op, Node_Kind,
++ N_Op_Abs,
++ N_Op_Plus)
++ SUBTYPE (N_Unit_Body, Node_Kind,
++ N_Package_Body,
++ N_Subprogram_Body)
++ INLINE Boolean ABE_Is_Certain (Node_Id N)
++ { return Flag18 (N); }
++ INLINE Boolean Abort_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Node_Id Abortable_Part (Node_Id N)
++ { return Node2 (N); }
++ INLINE Boolean Abstract_Present (Node_Id N)
++ { return Flag4 (N); }
++ INLINE List_Id Accept_Handler_Records (Node_Id N)
++ { return List5 (N); }
++ INLINE Node_Id Accept_Statement (Node_Id N)
++ { return Node2 (N); }
++ INLINE Elist_Id Access_Types_To_Process (Node_Id N)
++ { return Elist2 (N); }
++ INLINE List_Id Actions (Node_Id N)
++ { return List1 (N); }
++ INLINE Node_Id Activation_Chain_Entity (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Acts_As_Spec (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Node_Id Aggregate_Bounds (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Aliased_Present (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Boolean All_Others (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Boolean All_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE List_Id Alternatives (Node_Id N)
++ { return List4 (N); }
++ INLINE Node_Id Ancestor_Part (Node_Id N)
++ { return Node3 (N); }
++ INLINE Node_Id Array_Aggregate (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Assignment_OK (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Node_Id Associated_Node (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id At_End_Proc (Node_Id N)
++ { return Node1 (N); }
++ INLINE Name_Id Attribute_Name (Node_Id N)
++ { return Name2 (N); }
++ INLINE Node_Id Aux_Decls_Node (Node_Id N)
++ { return Node5 (N); }
++ INLINE Boolean Backwards_OK (Node_Id N)
++ { return Flag6 (N); }
++ INLINE Boolean Bad_Is_Detected (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Boolean By_Ref (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Boolean Body_Required (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Node_Id Body_To_Inline (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Box_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Char_Code Char_Literal_Value (Node_Id N)
++ { return Char_Code2 (N); }
++ INLINE Name_Id Chars (Node_Id N)
++ { return Name1 (N); }
++ INLINE Boolean Check_Address_Alignment (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Node_Id Choice_Parameter (Node_Id N)
++ { return Node2 (N); }
++ INLINE List_Id Choices (Node_Id N)
++ { return List1 (N); }
++ INLINE Boolean Compile_Time_Known_Aggregate (Node_Id N)
++ { return Flag18 (N); }
++ INLINE List_Id Component_Associations (Node_Id N)
++ { return List2 (N); }
++ INLINE List_Id Component_Clauses (Node_Id N)
++ { return List3 (N); }
++ INLINE Node_Id Component_Definition (Node_Id N)
++ { return Node4 (N); }
++ INLINE List_Id Component_Items (Node_Id N)
++ { return List3 (N); }
++ INLINE Node_Id Component_List (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Component_Name (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Condition (Node_Id N)
++ { return Node1 (N); }
++ INLINE List_Id Condition_Actions (Node_Id N)
++ { return List3 (N); }
++ INLINE List_Id Config_Pragmas (Node_Id N)
++ { return List4 (N); }
++ INLINE Boolean Constant_Present (Node_Id N)
++ { return Flag17 (N); }
++ INLINE Node_Id Constraint (Node_Id N)
++ { return Node3 (N); }
++ INLINE List_Id Constraints (Node_Id N)
++ { return List1 (N); }
++ INLINE Boolean Context_Installed (Node_Id N)
++ { return Flag13 (N); }
++ INLINE List_Id Context_Items (Node_Id N)
++ { return List1 (N); }
++ INLINE Node_Id Controlling_Argument (Node_Id N)
++ { return Node1 (N); }
++ INLINE Boolean Conversion_OK (Node_Id N)
++ { return Flag14 (N); }
++ INLINE Node_Id Corresponding_Body (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Corresponding_Generic_Association (Node_Id N)
++ { return Node5 (N); }
++ INLINE Uint Corresponding_Integer_Value (Node_Id N)
++ { return Uint4 (N); }
++ INLINE Node_Id Corresponding_Spec (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Corresponding_Stub (Node_Id N)
++ { return Node3 (N); }
++ INLINE Entity_Id Dcheck_Function (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Debug_Statement (Node_Id N)
++ { return Node3 (N); }
++ INLINE List_Id Declarations (Node_Id N)
++ { return List2 (N); }
++ INLINE Node_Id Default_Expression (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Default_Name (Node_Id N)
++ { return Node2 (N); }
++ INLINE Entity_Id Defining_Identifier (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Defining_Unit_Name (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Delay_Alternative (Node_Id N)
++ { return Node4 (N); }
++ INLINE Boolean Delay_Finalize_Attach (Node_Id N)
++ { return Flag14 (N); }
++ INLINE Node_Id Delay_Statement (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Delta_Expression (Node_Id N)
++ { return Node3 (N); }
++ INLINE Node_Id Digits_Expression (Node_Id N)
++ { return Node2 (N); }
++ INLINE Boolean Discr_Check_Funcs_Built (Node_Id N)
++ { return Flag11 (N); }
++ INLINE List_Id Discrete_Choices (Node_Id N)
++ { return List4 (N); }
++ INLINE Node_Id Discrete_Range (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Discrete_Subtype_Definition (Node_Id N)
++ { return Node4 (N); }
++ INLINE List_Id Discrete_Subtype_Definitions (Node_Id N)
++ { return List2 (N); }
++ INLINE List_Id Discriminant_Specifications (Node_Id N)
++ { return List4 (N); }
++ INLINE Node_Id Discriminant_Type (Node_Id N)
++ { return Node5 (N); }
++ INLINE Boolean Do_Accessibility_Check (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Do_Discriminant_Check (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Do_Division_Check (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Do_Length_Check (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Boolean Do_Overflow_Check (Node_Id N)
++ { return Flag17 (N); }
++ INLINE Boolean Do_Range_Check (Node_Id N)
++ { return Flag9 (N); }
++ INLINE Boolean Do_Storage_Check (Node_Id N)
++ { return Flag17 (N); }
++ INLINE Boolean Do_Tag_Check (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Elaborate_All_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Boolean Elaborate_Present (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Node_Id Elaboration_Boolean (Node_Id N)
++ { return Node2 (N); }
++ INLINE List_Id Else_Actions (Node_Id N)
++ { return List3 (N); }
++ INLINE List_Id Else_Statements (Node_Id N)
++ { return List4 (N); }
++ INLINE List_Id Elsif_Parts (Node_Id N)
++ { return List3 (N); }
++ INLINE Node_Id Enclosing_Variant (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id End_Label (Node_Id N)
++ { return Node4 (N); }
++ INLINE Uint End_Span (Node_Id N)
++ { return Uint5 (N); }
++ INLINE Node_Id Entity (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Entity_Or_Associated_Node (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Entry_Body_Formal_Part (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Entry_Call_Alternative (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Entry_Call_Statement (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Entry_Direct_Name (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Entry_Index (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Entry_Index_Specification (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Etype (Node_Id N)
++ { return Node5 (N); }
++ INLINE List_Id Exception_Choices (Node_Id N)
++ { return List4 (N); }
++ INLINE List_Id Exception_Handlers (Node_Id N)
++ { return List5 (N); }
++ INLINE Boolean Exception_Junk (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Node_Id Explicit_Actual_Parameter (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Expansion_Delayed (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Node_Id Explicit_Generic_Actual_Parameter (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Expression (Node_Id N)
++ { return Node3 (N); }
++ INLINE List_Id Expressions (Node_Id N)
++ { return List1 (N); }
++ INLINE Node_Id First_Bit (Node_Id N)
++ { return Node3 (N); }
++ INLINE Entity_Id First_Inlined_Subprogram (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean First_Name (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Node_Id First_Named_Actual (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id First_Real_Statement (Node_Id N)
++ { return Node2 (N); }
++ INLINE Entity_Id First_Subtype_Link (Node_Id N)
++ { return Node5 (N); }
++ INLINE Boolean Float_Truncate (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Node_Id Formal_Type_Definition (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Forwards_OK (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Boolean From_At_Mod (Node_Id N)
++ { return Flag4 (N); }
++ INLINE List_Id Generic_Associations (Node_Id N)
++ { return List3 (N); }
++ INLINE List_Id Generic_Formal_Declarations (Node_Id N)
++ { return List2 (N); }
++ INLINE Node_Id Generic_Parent (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Generic_Parent_Type (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Handled_Statement_Sequence (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Handler_List_Entry (Node_Id N)
++ { return Node2 (N); }
++ INLINE Boolean Has_Created_Identifier (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Boolean Has_Dynamic_Length_Check (Node_Id N)
++ { return Flag10 (N); }
++ INLINE Boolean Has_Dynamic_Range_Check (Node_Id N)
++ { return Flag12 (N); }
++ INLINE Boolean Has_No_Elaboration_Code (Node_Id N)
++ { return Flag17 (N); }
++ INLINE Boolean Has_Priority_Pragma (Node_Id N)
++ { return Flag6 (N); }
++ INLINE Boolean Has_Private_View (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Boolean Has_Storage_Size_Pragma (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Boolean Has_Task_Info_Pragma (Node_Id N)
++ { return Flag7 (N); }
++ INLINE Boolean Has_Task_Name_Pragma (Node_Id N)
++ { return Flag8 (N); }
++ INLINE Boolean Has_Wide_Character (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Elist_Id Hidden_By_Use_Clause (Node_Id N)
++ { return Elist4 (N); }
++ INLINE Node_Id High_Bound (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Identifier (Node_Id N)
++ { return Node1 (N); }
++ INLINE Boolean Implicit_With (Node_Id N)
++ { return Flag16 (N); }
++ INLINE Boolean In_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Boolean Includes_Infinities (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Node_Id Instance_Spec (Node_Id N)
++ { return Node5 (N); }
++ INLINE Uint Intval (Node_Id N)
++ { return Uint3 (N); }
++ INLINE Boolean Is_Asynchronous_Call_Block (Node_Id N)
++ { return Flag7 (N); }
++ INLINE Boolean Is_Component_Left_Opnd (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Is_Component_Right_Opnd (Node_Id N)
++ { return Flag14 (N); }
++ INLINE Boolean Is_Controlling_Actual (Node_Id N)
++ { return Flag16 (N); }
++ INLINE Boolean Is_In_Discriminant_Check (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Boolean Is_Machine_Number (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Boolean Is_Null_Loop (Node_Id N)
++ { return Flag16 (N); }
++ INLINE Boolean Is_Overloaded (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Boolean Is_Power_Of_2_For_Shift (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Is_Protected_Subprogram_Body (Node_Id N)
++ { return Flag7 (N); }
++ INLINE Boolean Is_Static_Expression (Node_Id N)
++ { return Flag6 (N); }
++ INLINE Boolean Is_Subprogram_Descriptor (Node_Id N)
++ { return Flag16 (N); }
++ INLINE Boolean Is_Task_Allocation_Block (Node_Id N)
++ { return Flag6 (N); }
++ INLINE Boolean Is_Task_Master (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Node_Id Iteration_Scheme (Node_Id N)
++ { return Node2 (N); }
++ INLINE Entity_Id Itype (Node_Id N)
++ { return Node1 (N); }
++ INLINE Boolean Kill_Range_Check (Node_Id N)
++ { return Flag11 (N); }
++ INLINE Node_Id Label_Construct (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Left_Opnd (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Last_Bit (Node_Id N)
++ { return Node4 (N); }
++ INLINE Boolean Last_Name (Node_Id N)
++ { return Flag6 (N); }
++ INLINE Node_Id Library_Unit (Node_Id N)
++ { return Node4 (N); }
++ INLINE Boolean Limited_View_Installed (Node_Id N)
++ { return Flag18 (N); }
++ INLINE Boolean Limited_Present (Node_Id N)
++ { return Flag17 (N); }
++ INLINE List_Id Literals (Node_Id N)
++ { return List1 (N); }
++ INLINE List_Id Loop_Actions (Node_Id N)
++ { return List2 (N); }
++ INLINE Node_Id Loop_Parameter_Specification (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Low_Bound (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Mod_Clause (Node_Id N)
++ { return Node2 (N); }
++ INLINE Boolean More_Ids (Node_Id N)
++ { return Flag5 (N); }
++ INLINE Boolean Must_Be_Byte_Aligned (Node_Id N)
++ { return Flag14 (N); }
++ INLINE Boolean Must_Not_Freeze (Node_Id N)
++ { return Flag8 (N); }
++ INLINE Node_Id Name (Node_Id N)
++ { return Node2 (N); }
++ INLINE List_Id Names (Node_Id N)
++ { return List2 (N); }
++ INLINE Node_Id Next_Entity (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Next_Named_Actual (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Next_Rep_Item (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Next_Use_Clause (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean No_Ctrl_Actions (Node_Id N)
++ { return Flag7 (N); }
++ INLINE Boolean No_Elaboration_Check (Node_Id N)
++ { return Flag14 (N); }
++ INLINE Boolean No_Entities_Ref_In_Spec (Node_Id N)
++ { return Flag8 (N); }
++ INLINE Boolean No_Initialization (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean No_Truncation (Node_Id N)
++ { return Flag17 (N); }
++ INLINE Boolean Null_Present (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Null_Record_Present (Node_Id N)
++ { return Flag17 (N); }
++ INLINE Node_Id Object_Definition (Node_Id N)
++ { return Node4 (N); }
++ INLINE Boolean OK_For_Stream (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Node_Id Original_Discriminant (Node_Id N)
++ { return Node2 (N); }
++ INLINE Entity_Id Original_Entity (Node_Id N)
++ { return Node2 (N); }
++ INLINE List_Id Others_Discrete_Choices (Node_Id N)
++ { return List1 (N); }
++ INLINE Boolean Out_Present (Node_Id N)
++ { return Flag17 (N); }
++ INLINE List_Id Parameter_Associations (Node_Id N)
++ { return List3 (N); }
++ INLINE Boolean Parameter_List_Truncated (Node_Id N)
++ { return Flag17 (N); }
++ INLINE List_Id Parameter_Specifications (Node_Id N)
++ { return List3 (N); }
++ INLINE Node_Id Parameter_Type (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Parent_Spec (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Position (Node_Id N)
++ { return Node2 (N); }
++ INLINE List_Id Pragma_Argument_Associations (Node_Id N)
++ { return List2 (N); }
++ INLINE List_Id Pragmas_After (Node_Id N)
++ { return List5 (N); }
++ INLINE List_Id Pragmas_Before (Node_Id N)
++ { return List4 (N); }
++ INLINE Node_Id Prefix (Node_Id N)
++ { return Node3 (N); }
++ INLINE Uint Present_Expr (Node_Id N)
++ { return Uint3 (N); }
++ INLINE Boolean Prev_Ids (Node_Id N)
++ { return Flag6 (N); }
++ INLINE Boolean Print_In_Hex (Node_Id N)
++ { return Flag13 (N); }
++ INLINE List_Id Private_Declarations (Node_Id N)
++ { return List3 (N); }
++ INLINE Boolean Private_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Node_Id Procedure_To_Call (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Proper_Body (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Protected_Definition (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Protected_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Boolean Raises_Constraint_Error (Node_Id N)
++ { return Flag7 (N); }
++ INLINE Node_Id Range_Constraint (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Range_Expression (Node_Id N)
++ { return Node4 (N); }
++ INLINE Node_Id Real_Range_Specification (Node_Id N)
++ { return Node4 (N); }
++ INLINE Ureal Realval (Node_Id N)
++ { return Ureal3 (N); }
++ INLINE Uint Reason (Node_Id N)
++ { return Uint3 (N); }
++ INLINE Node_Id Record_Extension_Part (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Redundant_Use (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Node_Id Return_Type (Node_Id N)
++ { return Node2 (N); }
++ INLINE Boolean Reverse_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Node_Id Right_Opnd (Node_Id N)
++ { return Node3 (N); }
++ INLINE Boolean Rounded_Result (Node_Id N)
++ { return Flag18 (N); }
++ INLINE Node_Id Scope (Node_Id N)
++ { return Node3 (N); }
++ INLINE List_Id Select_Alternatives (Node_Id N)
++ { return List1 (N); }
++ INLINE Node_Id Selector_Name (Node_Id N)
++ { return Node2 (N); }
++ INLINE List_Id Selector_Names (Node_Id N)
++ { return List1 (N); }
++ INLINE Boolean Shift_Count_OK (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Entity_Id Source_Type (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Specification (Node_Id N)
++ { return Node1 (N); }
++ INLINE List_Id Statements (Node_Id N)
++ { return List3 (N); }
++ INLINE Boolean Static_Processing_OK (Node_Id N)
++ { return Flag4 (N); }
++ INLINE Node_Id Storage_Pool (Node_Id N)
++ { return Node1 (N); }
++ INLINE String_Id Strval (Node_Id N)
++ { return Str3 (N); }
++ INLINE Node_Id Subtype_Indication (Node_Id N)
++ { return Node5 (N); }
++ INLINE Node_Id Subtype_Mark (Node_Id N)
++ { return Node4 (N); }
++ INLINE List_Id Subtype_Marks (Node_Id N)
++ { return List2 (N); }
++ INLINE Boolean Tagged_Present (Node_Id N)
++ { return Flag15 (N); }
++ INLINE Entity_Id Target_Type (Node_Id N)
++ { return Node2 (N); }
++ INLINE Entity_Id Task_Body_Procedure (Node_Id N)
++ { return Node2 (N); }
++ INLINE Node_Id Task_Definition (Node_Id N)
++ { return Node3 (N); }
++ INLINE List_Id Then_Actions (Node_Id N)
++ { return List2 (N); }
++ INLINE List_Id Then_Statements (Node_Id N)
++ { return List2 (N); }
++ INLINE Boolean Treat_Fixed_As_Integer (Node_Id N)
++ { return Flag14 (N); }
++ INLINE Node_Id Triggering_Alternative (Node_Id N)
++ { return Node1 (N); }
++ INLINE Node_Id Triggering_Statement (Node_Id N)
++ { return Node1 (N); }
++ INLINE Elist_Id TSS_Elist (Node_Id N)
++ { return Elist3 (N); }
++ INLINE Node_Id Type_Definition (Node_Id N)
++ { return Node3 (N); }
++ INLINE Node_Id Unit (Node_Id N)
++ { return Node2 (N); }
++ INLINE Boolean Unknown_Discriminants_Present (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Unreferenced_In_Spec (Node_Id N)
++ { return Flag7 (N); }
++ INLINE Node_Id Variant_Part (Node_Id N)
++ { return Node4 (N); }
++ INLINE List_Id Variants (Node_Id N)
++ { return List1 (N); }
++ INLINE List_Id Visible_Declarations (Node_Id N)
++ { return List2 (N); }
++ INLINE Boolean Was_Originally_Stub (Node_Id N)
++ { return Flag13 (N); }
++ INLINE Boolean Zero_Cost_Handling (Node_Id N)
++ { return Flag5 (N); }
++
+--- gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/einfo.h.orig 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/einfo.h 2004-06-02 00:54:19.000000000 +0200
+@@ -0,0 +1,1814 @@
++/*--------------------------------------------------------------------------*/
++/* */
++/* GNAT COMPILER COMPONENTS */
++/* */
++/* E I N F O */
++/* */
++/* C Header File */
++/* */
++/* Copyright (C) 1992-2003 Free Software Foundation, Inc. */
++/* */
++/* GNAT is free software; you can redistribute it and/or modify it under */
++/* terms of the GNU General Public License as published by the Free Soft- */
++/* ware Foundation; either version 2, or (at your option) any later ver- */
++/* sion. GNAT is distributed in the hope that it will be useful, but WITH- */
++/* OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY */
++/* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License */
++/* for more details. You should have received a copy of the GNU General */
++/* Public License distributed with GNAT; see file COPYING. If not, write */
++/* to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, */
++/* MA 02111-1307, USA. */
++/* */
++/* As a special exception, if other files instantiate generics from this */
++/* unit, or you link this unit with other files to produce an executable, */
++/* this unit does not by itself cause the resulting executable to be */
++/* covered by the GNU General Public License. This exception does not */
++/* however invalidate any other reasons why the executable file might be */
++/* covered by the GNU Public License. */
++/* */
++/* GNAT was originally developed by the GNAT team at New York University. */
++/* Extensive contributions were provided by Ada Core Technologies Inc. */
++/* */
++/*--------------------------------------------------------------------------*/
++
++ #define E_Void 0
++ #define E_Variable 1
++ #define E_Component 2
++ #define E_Constant 3
++ #define E_Discriminant 4
++ #define E_Loop_Parameter 5
++ #define E_In_Parameter 6
++ #define E_Out_Parameter 7
++ #define E_In_Out_Parameter 8
++ #define E_Generic_In_Out_Parameter 9
++ #define E_Generic_In_Parameter 10
++ #define E_Named_Integer 11
++ #define E_Named_Real 12
++ #define E_Enumeration_Type 13
++ #define E_Enumeration_Subtype 14
++ #define E_Signed_Integer_Type 15
++ #define E_Signed_Integer_Subtype 16
++ #define E_Modular_Integer_Type 17
++ #define E_Modular_Integer_Subtype 18
++ #define E_Ordinary_Fixed_Point_Type 19
++ #define E_Ordinary_Fixed_Point_Subtype 20
++ #define E_Decimal_Fixed_Point_Type 21
++ #define E_Decimal_Fixed_Point_Subtype 22
++ #define E_Floating_Point_Type 23
++ #define E_Floating_Point_Subtype 24
++ #define E_Access_Type 25
++ #define E_Access_Subtype 26
++ #define E_Access_Attribute_Type 27
++ #define E_Allocator_Type 28
++ #define E_General_Access_Type 29
++ #define E_Access_Subprogram_Type 30
++ #define E_Access_Protected_Subprogram_Type 31
++ #define E_Anonymous_Access_Type 32
++ #define E_Array_Type 33
++ #define E_Array_Subtype 34
++ #define E_String_Type 35
++ #define E_String_Subtype 36
++ #define E_String_Literal_Subtype 37
++ #define E_Class_Wide_Type 38
++ #define E_Class_Wide_Subtype 39
++ #define E_Record_Type 40
++ #define E_Record_Subtype 41
++ #define E_Record_Type_With_Private 42
++ #define E_Record_Subtype_With_Private 43
++ #define E_Private_Type 44
++ #define E_Private_Subtype 45
++ #define E_Limited_Private_Type 46
++ #define E_Limited_Private_Subtype 47
++ #define E_Incomplete_Type 48
++ #define E_Task_Type 49
++ #define E_Task_Subtype 50
++ #define E_Protected_Type 51
++ #define E_Protected_Subtype 52
++ #define E_Exception_Type 53
++ #define E_Subprogram_Type 54
++ #define E_Enumeration_Literal 55
++ #define E_Function 56
++ #define E_Operator 57
++ #define E_Procedure 58
++ #define E_Entry 59
++ #define E_Entry_Family 60
++ #define E_Block 61
++ #define E_Entry_Index_Parameter 62
++ #define E_Exception 63
++ #define E_Generic_Function 64
++ #define E_Generic_Procedure 65
++ #define E_Generic_Package 66
++ #define E_Label 67
++ #define E_Loop 68
++ #define E_Package 69
++ #define E_Package_Body 70
++ #define E_Protected_Object 71
++ #define E_Protected_Body 72
++ #define E_Task_Body 73
++ #define E_Subprogram_Body 74
++
++ SUBTYPE (Access_Kind, Entity_Kind,
++ E_Access_Type, E_Anonymous_Access_Type)
++
++ SUBTYPE (Array_Kind, Entity_Kind,
++ E_Array_Type, E_String_Literal_Subtype)
++
++ SUBTYPE (Class_Wide_Kind, Entity_Kind,
++ E_Class_Wide_Type, E_Class_Wide_Subtype)
++
++ SUBTYPE (Composite_Kind, Entity_Kind,
++ E_Array_Type, E_Protected_Subtype)
++
++ SUBTYPE (Concurrent_Kind, Entity_Kind,
++ E_Task_Type, E_Protected_Subtype)
++
++ SUBTYPE (Concurrent_Body_Kind, Entity_Kind,
++ E_Protected_Body, E_Task_Body)
++
++ SUBTYPE (Decimal_Fixed_Point_Kind, Entity_Kind,
++ E_Decimal_Fixed_Point_Type, E_Decimal_Fixed_Point_Subtype)
++
++ SUBTYPE (Digits_Kind, Entity_Kind,
++ E_Decimal_Fixed_Point_Type, E_Floating_Point_Subtype)
++
++ SUBTYPE (Discrete_Kind, Entity_Kind,
++ E_Enumeration_Type, E_Modular_Integer_Subtype)
++
++ SUBTYPE (Discrete_Or_Fixed_Point_Kind, Entity_Kind,
++ E_Enumeration_Type, E_Decimal_Fixed_Point_Subtype)
++
++ SUBTYPE (Elementary_Kind, Entity_Kind,
++ E_Enumeration_Type, E_Anonymous_Access_Type)
++
++ SUBTYPE (Enumeration_Kind, Entity_Kind,
++ E_Enumeration_Type, E_Enumeration_Subtype)
++
++ SUBTYPE (Entry_Kind, Entity_Kind,
++ E_Entry, E_Entry_Family)
++
++ SUBTYPE (Fixed_Point_Kind, Entity_Kind,
++ E_Ordinary_Fixed_Point_Type, E_Decimal_Fixed_Point_Subtype)
++
++ SUBTYPE (Float_Kind, Entity_Kind,
++ E_Floating_Point_Type, E_Floating_Point_Subtype)
++
++ SUBTYPE (Formal_Kind, Entity_Kind,
++ E_In_Parameter, E_In_Out_Parameter)
++
++ SUBTYPE (Generic_Subprogram_Kind, Entity_Kind,
++ E_Generic_Function, E_Generic_Procedure)
++
++ SUBTYPE (Generic_Unit_Kind, Entity_Kind,
++ E_Generic_Function, E_Generic_Package)
++
++ SUBTYPE (Incomplete_Or_Private_Kind, Entity_Kind,
++ E_Record_Type_With_Private, E_Incomplete_Type)
++
++ SUBTYPE (Integer_Kind, Entity_Kind,
++ E_Signed_Integer_Type, E_Modular_Integer_Subtype)
++
++ SUBTYPE (Modular_Integer_Kind, Entity_Kind,
++ E_Modular_Integer_Type, E_Modular_Integer_Subtype)
++
++ SUBTYPE (Named_Kind, Entity_Kind,
++ E_Named_Integer, E_Named_Real)
++
++ SUBTYPE (Numeric_Kind, Entity_Kind,
++ E_Signed_Integer_Type, E_Floating_Point_Subtype)
++
++ SUBTYPE (Object_Kind, Entity_Kind,
++ E_Variable, E_Generic_In_Parameter)
++
++ SUBTYPE (Ordinary_Fixed_Point_Kind, Entity_Kind,
++ E_Ordinary_Fixed_Point_Type, E_Ordinary_Fixed_Point_Subtype)
++
++ SUBTYPE (Overloadable_Kind, Entity_Kind,
++ E_Enumeration_Literal, E_Entry)
++
++ SUBTYPE (Private_Kind, Entity_Kind,
++ E_Record_Type_With_Private, E_Limited_Private_Subtype)
++
++ SUBTYPE (Protected_Kind, Entity_Kind,
++ E_Protected_Type, E_Protected_Subtype)
++
++ SUBTYPE (Real_Kind, Entity_Kind,
++ E_Ordinary_Fixed_Point_Type, E_Floating_Point_Subtype)
++
++ SUBTYPE (Record_Kind, Entity_Kind,
++ E_Class_Wide_Type, E_Record_Subtype_With_Private)
++
++ SUBTYPE (Scalar_Kind, Entity_Kind,
++ E_Enumeration_Type, E_Floating_Point_Subtype)
++
++ SUBTYPE (String_Kind, Entity_Kind,
++ E_String_Type, E_String_Literal_Subtype)
++
++ SUBTYPE (Subprogram_Kind, Entity_Kind,
++ E_Function, E_Procedure)
++
++ SUBTYPE (Signed_Integer_Kind, Entity_Kind,
++ E_Signed_Integer_Type, E_Signed_Integer_Subtype)
++
++ SUBTYPE (Task_Kind, Entity_Kind,
++ E_Task_Type, E_Task_Subtype)
++
++ SUBTYPE (Type_Kind, Entity_Kind,
++ E_Enumeration_Type, E_Subprogram_Type)
++
++ typedef char Component_Alignment_Kind;
++ #define Calign_Default 0
++ #define Calign_Component_Size 1
++ #define Calign_Component_Size_4 2
++ #define Calign_Storage_Unit 3
++
++ typedef Boolean B;
++ typedef Component_Alignment_Kind C;
++ typedef Entity_Id E;
++ typedef Mechanism_Type M;
++ typedef Node_Id N;
++ typedef Uint U;
++ typedef Ureal R;
++ typedef Elist_Id L;
++ typedef List_Id S;
++
++ INLINE L Accept_Address (E Id);
++ INLINE E Access_Disp_Table (E Id);
++ INLINE E Actual_Subtype (E Id);
++ INLINE B Address_Taken (E Id);
++ INLINE E Alias (E Id);
++ INLINE U Alignment (E Id);
++ INLINE E Associated_Final_Chain (E Id);
++ INLINE E Associated_Formal_Package (E Id);
++ INLINE N Associated_Node_For_Itype (E Id);
++ INLINE E Associated_Storage_Pool (E Id);
++ INLINE N Barrier_Function (E Id);
++ INLINE N Block_Node (E Id);
++ INLINE E Body_Entity (E Id);
++ INLINE B Body_Needed_For_SAL (E Id);
++ INLINE E CR_Discriminant (E Id);
++ INLINE B C_Pass_By_Copy (E Id);
++ INLINE B Can_Never_Be_Null (E Id);
++ INLINE B Checks_May_Be_Suppressed (E Id);
++ INLINE E Class_Wide_Type (E Id);
++ INLINE E Cloned_Subtype (E Id);
++
++ #define Component_Alignment einfo__component_alignment
++ C Component_Alignment (E Id);
++
++ INLINE N Component_Clause (E Id);
++ INLINE U Component_Bit_Offset (E Id);
++ INLINE U Component_Size (E Id);
++ INLINE E Component_Type (E Id);
++ INLINE E Corresponding_Concurrent_Type (E Id);
++ INLINE E Corresponding_Discriminant (E Id);
++ INLINE E Corresponding_Equality (E Id);
++ INLINE E Corresponding_Record_Type (E Id);
++ INLINE E Corresponding_Remote_Type (E Id);
++ INLINE N Current_Value (E Id);
++ INLINE B Debug_Info_Off (E Id);
++ INLINE E Debug_Renaming_Link (E Id);
++ INLINE E DTC_Entity (E Id);
++ INLINE U DT_Entry_Count (E Id);
++ INLINE U DT_Position (E Id);
++ INLINE E Default_Expr_Function (E Id);
++ INLINE B Default_Expressions_Processed (E Id);
++ INLINE N Default_Value (E Id);
++ INLINE B Delay_Cleanups (E Id);
++ INLINE B Delay_Subprogram_Descriptors (E Id);
++ INLINE R Delta_Value (E Id);
++ INLINE L Dependent_Instances (E Id);
++ INLINE B Depends_On_Private (E Id);
++ INLINE U Digits_Value (E Id);
++ INLINE E Directly_Designated_Type (E Id);
++ INLINE B Discard_Names (E Id);
++ INLINE E Discriminal (E Id);
++ INLINE E Discriminal_Link (E Id);
++ INLINE E Discriminant_Checking_Func (E Id);
++ INLINE L Discriminant_Constraint (E Id);
++ INLINE N Discriminant_Default_Value (E Id);
++ INLINE U Discriminant_Number (E Id);
++ INLINE B Elaborate_All_Desirable (E Id);
++ INLINE E Elaboration_Entity (E Id);
++ INLINE B Elaboration_Entity_Required (E Id);
++ INLINE E Enclosing_Scope (E Id);
++ INLINE B Entry_Accepted (E Id);
++ INLINE E Entry_Bodies_Array (E Id);
++ INLINE E Entry_Cancel_Parameter (E Id);
++ INLINE E Entry_Component (E Id);
++ INLINE E Entry_Formal (E Id);
++ INLINE E Entry_Index_Constant (E Id);
++ INLINE E Entry_Index_Type (E Id);
++ INLINE E Entry_Parameters_Type (E Id);
++ INLINE E Enum_Pos_To_Rep (E Id);
++ INLINE U Enumeration_Pos (E Id);
++ INLINE U Enumeration_Rep (E Id);
++ INLINE N Enumeration_Rep_Expr (E Id);
++ INLINE E Equivalent_Type (E Id);
++ INLINE U Esize (E Id);
++ INLINE U Exception_Code (E Id);
++ INLINE E Extra_Accessibility (E Id);
++ INLINE E Extra_Constrained (E Id);
++ INLINE E Extra_Formal (E Id);
++ INLINE E Finalization_Chain_Entity (E Id);
++
++ #define Finalize_Storage_Only einfo__finalize_storage_only
++ B Finalize_Storage_Only (E Id);
++
++ INLINE E First_Entity (E Id);
++ INLINE N First_Index (E Id);
++ INLINE E First_Literal (E Id);
++ INLINE E First_Optional_Parameter (E Id);
++ INLINE E First_Private_Entity (E Id);
++ INLINE N First_Rep_Item (E Id);
++ INLINE N Freeze_Node (E Id);
++ INLINE B From_With_Type (E Id);
++ INLINE E Full_View (E Id);
++ INLINE B Function_Returns_With_DSP (E Id);
++ INLINE E Generic_Homonym (E Id);
++ INLINE L Generic_Renamings (E Id);
++ INLINE S Handler_Records (E Id);
++ INLINE B Has_Aliased_Components (E Id);
++ INLINE B Has_Alignment_Clause (E Id);
++ INLINE B Has_All_Calls_Remote (E Id);
++ INLINE B Has_Atomic_Components (E Id);
++ INLINE B Has_Biased_Representation (E Id);
++ INLINE B Has_Completion (E Id);
++ INLINE B Has_Completion_In_Body (E Id);
++ INLINE B Has_Complex_Representation (E Id);
++ INLINE B Has_Component_Size_Clause (E Id);
++ INLINE B Has_Contiguous_Rep (E Id);
++ INLINE B Has_Controlled_Component (E Id);
++ INLINE B Has_Controlling_Result (E Id);
++ INLINE B Has_Convention_Pragma (E Id);
++ INLINE B Has_Delayed_Freeze (E Id);
++ INLINE B Has_Discriminants (E Id);
++ INLINE B Has_Enumeration_Rep_Clause (E Id);
++ INLINE B Has_Exit (E Id);
++ INLINE B Has_External_Tag_Rep_Clause (E Id);
++ INLINE B Has_Fully_Qualified_Name (E Id);
++ INLINE B Has_Gigi_Rep_Item (E Id);
++ INLINE B Has_Homonym (E Id);
++
++ #define Has_Interrupt_Handler einfo__has_interrupt_handler
++ B Has_Interrupt_Handler (E Id);
++
++ INLINE B Has_Machine_Radix_Clause (E Id);
++ INLINE B Has_Master_Entity (E Id);
++ INLINE B Has_Missing_Return (E Id);
++ INLINE B Has_Nested_Block_With_Handler (E Id);
++ INLINE B Has_Forward_Instantiation (E Id);
++ INLINE B Has_Non_Standard_Rep (E Id);
++ INLINE B Has_Object_Size_Clause (E Id);
++ INLINE B Has_Per_Object_Constraint (E Id);
++ INLINE B Has_Pragma_Controlled (E Id);
++ INLINE B Has_Pragma_Elaborate_Body (E Id);
++ INLINE B Has_Pragma_Inline (E Id);
++ INLINE B Has_Pragma_Pack (E Id);
++ INLINE B Has_Pragma_Pure_Function (E Id);
++ INLINE B Has_Pragma_Unreferenced (E Id);
++ INLINE B Has_Primitive_Operations (E Id);
++ INLINE B Has_Qualified_Name (E Id);
++ INLINE B Has_Record_Rep_Clause (E Id);
++ INLINE B Has_Recursive_Call (E Id);
++ INLINE B Has_Size_Clause (E Id);
++ INLINE B Has_Small_Clause (E Id);
++ INLINE B Has_Specified_Layout (E Id);
++ INLINE B Has_Storage_Size_Clause (E Id);
++ INLINE B Has_Subprogram_Descriptor (E Id);
++ INLINE B Has_Task (E Id);
++ INLINE B Has_Unchecked_Union (E Id);
++ INLINE B Has_Unknown_Discriminants (E Id);
++ INLINE B Has_Volatile_Components (E Id);
++ INLINE B Has_Xref_Entry (E Id);
++ INLINE E Hiding_Loop_Variable (E Id);
++ INLINE E Homonym (E Id);
++ INLINE B In_Package_Body (E Id);
++ INLINE B In_Private_Part (E Id);
++ INLINE B In_Use (E Id);
++ INLINE L Inner_Instances (E Id);
++ INLINE N Interface_Name (E Id);
++ INLINE B Is_AST_Entry (E Id);
++ INLINE B Is_Abstract (E Id);
++ INLINE B Is_Access_Constant (E Id);
++ INLINE B Is_Aliased (E Id);
++ INLINE B Is_Asynchronous (E Id);
++ INLINE B Is_Atomic (E Id);
++ INLINE B Is_Bit_Packed_Array (E Id);
++ INLINE B Is_CPP_Class (E Id);
++ INLINE B Is_Called (E Id);
++ INLINE B Is_Character_Type (E Id);
++ INLINE B Is_Child_Unit (E Id);
++ INLINE B Is_Class_Wide_Equivalent_Type (E Id);
++ INLINE B Is_Compilation_Unit (E Id);
++ INLINE B Is_Completely_Hidden (E Id);
++ INLINE B Is_Constr_Subt_For_UN_Aliased (E Id);
++ INLINE B Is_Constr_Subt_For_U_Nominal (E Id);
++ INLINE B Is_Constrained (E Id);
++ INLINE B Is_Constructor (E Id);
++ INLINE B Is_Controlled (E Id);
++ INLINE B Is_Controlling_Formal (E Id);
++ INLINE B Is_Discrim_SO_Function (E Id);
++ INLINE B Is_Dispatching_Operation (E Id);
++ INLINE B Is_Eliminated (E Id);
++ INLINE B Is_Entry_Formal (E Id);
++ INLINE B Is_Exported (E Id);
++ INLINE B Is_First_Subtype (E Id);
++ INLINE B Is_For_Access_Subtype (E Id);
++ INLINE B Is_Frozen (E Id);
++ INLINE B Is_Generic_Instance (E Id);
++ INLINE B Is_Hidden (E Id);
++ INLINE B Is_Hidden_Open_Scope (E Id);
++ INLINE B Is_Immediately_Visible (E Id);
++ INLINE B Is_Imported (E Id);
++ INLINE B Is_Inlined (E Id);
++ INLINE B Is_Instantiated (E Id);
++ INLINE B Is_Internal (E Id);
++ INLINE B Is_Interrupt_Handler (E Id);
++ INLINE B Is_Intrinsic_Subprogram (E Id);
++ INLINE B Is_Itype (E Id);
++ INLINE B Is_Known_Non_Null (E Id);
++ INLINE B Is_Known_Valid (E Id);
++ INLINE B Is_Limited_Composite (E Id);
++ INLINE B Is_Machine_Code_Subprogram (E Id);
++ INLINE B Is_Non_Static_Subtype (E Id);
++ INLINE B Is_Null_Init_Proc (E Id);
++ INLINE B Is_Optional_Parameter (E Id);
++ INLINE B Is_Package_Body_Entity (E Id);
++ INLINE B Is_Packed (E Id);
++ INLINE B Is_Packed_Array_Type (E Id);
++ INLINE B Is_Potentially_Use_Visible (E Id);
++ INLINE B Is_Preelaborated (E Id);
++ INLINE B Is_Private_Composite (E Id);
++ INLINE B Is_Private_Descendant (E Id);
++ INLINE B Is_Psected (E Id);
++ INLINE B Is_Public (E Id);
++ INLINE B Is_Pure (E Id);
++ INLINE B Is_Remote_Call_Interface (E Id);
++ INLINE B Is_Remote_Types (E Id);
++ INLINE B Is_Renaming_Of_Object (E Id);
++ INLINE B Is_Shared_Passive (E Id);
++ INLINE B Is_Statically_Allocated (E Id);
++ INLINE B Is_Tag (E Id);
++ INLINE B Is_Tagged_Type (E Id);
++ INLINE B Is_Thread_Body (E Id);
++ INLINE B Is_True_Constant (E Id);
++ INLINE B Is_Unchecked_Union (E Id);
++ INLINE B Is_Unsigned_Type (E Id);
++ INLINE B Is_VMS_Exception (E Id);
++ INLINE B Is_Valued_Procedure (E Id);
++ INLINE B Is_Visible_Child_Unit (E Id);
++
++ #define Is_Volatile einfo__is_volatile
++ B Is_Volatile (E Id);
++
++ #define Is_Wrapper_Package einfo__is_wrapper_package
++ B Is_Wrapper_Package (E Id);
++
++ INLINE B Kill_Elaboration_Checks (E Id);
++ INLINE B Kill_Range_Checks (E Id);
++ INLINE B Kill_Tag_Checks (E Id);
++ INLINE E Last_Entity (E Id);
++ INLINE L Limited_Views (E Id);
++ INLINE E Lit_Indexes (E Id);
++ INLINE E Lit_Strings (E Id);
++ INLINE B Machine_Radix_10 (E Id);
++ INLINE E Master_Id (E Id);
++ INLINE B Materialize_Entity (E Id);
++ INLINE M Mechanism (E Id);
++ INLINE U Modulus (E Id);
++ INLINE B Needs_Debug_Info (E Id);
++ INLINE B Needs_No_Actuals (E Id);
++ INLINE B Never_Set_In_Source (E Id);
++ INLINE E Next_Inlined_Subprogram (E Id);
++ INLINE B No_Pool_Assigned (E Id);
++ INLINE B No_Return (E Id);
++ INLINE B Non_Binary_Modulus (E Id);
++ INLINE E Non_Limited_View (E Id);
++ INLINE B Nonzero_Is_True (E Id);
++ INLINE U Normalized_First_Bit (E Id);
++ INLINE U Normalized_Position (E Id);
++ INLINE U Normalized_Position_Max (E Id);
++ INLINE E Object_Ref (E Id);
++ INLINE E Original_Array_Type (E Id);
++ INLINE E Original_Record_Component (E Id);
++ INLINE E Packed_Array_Type (E Id);
++ INLINE E Parent_Subtype (E Id);
++ INLINE L Primitive_Operations (E Id);
++ INLINE E Prival (E Id);
++ INLINE L Privals_Chain (E Id);
++ INLINE L Private_Dependents (E Id);
++ INLINE N Private_View (E Id);
++ INLINE E Protected_Body_Subprogram (E Id);
++ INLINE E Protected_Formal (E Id);
++ INLINE E Protected_Operation (E Id);
++ INLINE U RM_Size (E Id);
++ INLINE B Reachable (E Id);
++ INLINE B Referenced (E Id);
++ INLINE B Referenced_As_LHS (E Id);
++ INLINE N Referenced_Object (E Id);
++ INLINE N Register_Exception_Call (E Id);
++ INLINE E Related_Array_Object (E Id);
++ INLINE E Related_Instance (E Id);
++ INLINE N Renamed_Entity (E Id);
++ INLINE N Renamed_Object (E Id);
++ INLINE U Renaming_Map (E Id);
++ INLINE B Return_Present (E Id);
++ INLINE B Returns_By_Ref (E Id);
++ INLINE B Reverse_Bit_Order (E Id);
++ INLINE N Scalar_Range (E Id);
++ INLINE U Scale_Value (E Id);
++ INLINE U Scope_Depth_Value (E Id);
++ INLINE B Sec_Stack_Needed_For_Return (E Id);
++ INLINE S Shadow_Entities (E Id);
++ INLINE E Shared_Var_Assign_Proc (E Id);
++ INLINE E Shared_Var_Read_Proc (E Id);
++ INLINE N Size_Check_Code (E Id);
++ INLINE B Size_Known_At_Compile_Time (E Id);
++ INLINE B Size_Depends_On_Discriminant (E Id);
++ INLINE R Small_Value (E Id);
++ INLINE E Spec_Entity (E Id);
++ INLINE E Storage_Size_Variable (E Id);
++ INLINE L Stored_Constraint (E Id);
++ INLINE B Strict_Alignment (E Id);
++ INLINE U String_Literal_Length (E Id);
++ INLINE N String_Literal_Low_Bound (E Id);
++ INLINE B Suppress_Elaboration_Warnings (E Id);
++ INLINE B Suppress_Init_Proc (E Id);
++ INLINE B Suppress_Style_Checks (E Id);
++ INLINE B Treat_As_Volatile (E Id);
++ INLINE E Underlying_Full_View (E Id);
++ INLINE N Unset_Reference (E Id);
++ INLINE B Uses_Sec_Stack (E Id);
++ INLINE B Vax_Float (E Id);
++ INLINE B Warnings_Off (E Id);
++ INLINE B Is_Access_Type (E Id);
++ INLINE B Is_Array_Type (E Id);
++ INLINE B Is_Class_Wide_Type (E Id);
++ INLINE B Is_Composite_Type (E Id);
++ INLINE B Is_Concurrent_Body (E Id);
++ INLINE B Is_Concurrent_Record_Type (E Id);
++ INLINE B Is_Concurrent_Type (E Id);
++ INLINE B Is_Decimal_Fixed_Point_Type (E Id);
++ INLINE B Is_Digits_Type (E Id);
++ INLINE B Is_Discrete_Or_Fixed_Point_Type (E Id);
++ INLINE B Is_Discrete_Type (E Id);
++ INLINE B Is_Elementary_Type (E Id);
++ INLINE B Is_Entry (E Id);
++ INLINE B Is_Enumeration_Type (E Id);
++ INLINE B Is_Fixed_Point_Type (E Id);
++ INLINE B Is_Floating_Point_Type (E Id);
++ INLINE B Is_Formal (E Id);
++ INLINE B Is_Formal_Subprogram (E Id);
++ INLINE B Is_Generic_Actual_Type (E Id);
++ INLINE B Is_Generic_Unit (E Id);
++ INLINE B Is_Generic_Type (E Id);
++ INLINE B Is_Generic_Subprogram (E Id);
++ INLINE B Is_Incomplete_Or_Private_Type (E Id);
++ INLINE B Is_Integer_Type (E Id);
++ INLINE B Is_Limited_Record (E Id);
++ INLINE B Is_Modular_Integer_Type (E Id);
++ INLINE B Is_Named_Number (E Id);
++ INLINE B Is_Numeric_Type (E Id);
++ INLINE B Is_Object (E Id);
++ INLINE B Is_Ordinary_Fixed_Point_Type (E Id);
++ INLINE B Is_Overloadable (E Id);
++ INLINE B Is_Overriding_Operation (E Id);
++ INLINE B Is_Private_Type (E Id);
++ INLINE B Is_Protected_Type (E Id);
++ INLINE B Is_Real_Type (E Id);
++ INLINE B Is_Record_Type (E Id);
++ INLINE B Is_Scalar_Type (E Id);
++ INLINE B Is_Signed_Integer_Type (E Id);
++ INLINE B Is_Subprogram (E Id);
++ INLINE B Is_Task_Type (E Id);
++ INLINE B Is_Type (E Id);
++
++ #define Address_Clause einfo__address_clause
++ N Address_Clause (E Id);
++
++ #define Alignment_Clause einfo__alignment_clause
++ N Alignment_Clause (E Id);
++
++ #define Ancestor_Subtype einfo__ancestor_subtype
++ E Ancestor_Subtype (E Id);
++
++ #define Base_Type einfo__base_type
++ E Base_Type (E Id);
++
++ #define Constant_Value einfo__constant_value
++ N Constant_Value (E Id);
++
++ #define Declaration_Node einfo__declaration_node
++ N Declaration_Node (E Id);
++
++ #define Designated_Type einfo__designated_type
++ E Designated_Type (E Id);
++
++ #define Enclosing_Dynamic_Scope einfo__enclosing_dynamic_scope
++ E Enclosing_Dynamic_Scope (E Id);
++
++ #define First_Component einfo__first_component
++ E First_Component (E Id);
++
++ #define First_Discriminant einfo__first_discriminant
++ E First_Discriminant (E Id);
++
++ #define First_Formal einfo__first_formal
++ E First_Formal (E Id);
++
++ #define First_Stored_Discriminant einfo__first_stored_discriminant
++ E First_Stored_Discriminant (E Id);
++
++ #define First_Subtype einfo__first_subtype
++ E First_Subtype (E Id);
++
++ #define Has_Attach_Handler einfo__has_attach_handler
++ B Has_Attach_Handler (E Id);
++
++ #define Has_Entries einfo__has_entries
++ B Has_Entries (E Id);
++
++ #define Has_Foreign_Convention einfo__has_foreign_convention
++ B Has_Foreign_Convention (E Id);
++
++ #define Has_Private_Ancestor einfo__has_private_ancestor
++ B Has_Private_Ancestor (E Id);
++
++ INLINE B Has_Private_Declaration (E Id);
++
++ #define Implementation_Base_Type einfo__implementation_base_type
++ E Implementation_Base_Type (E Id);
++
++ #define Is_Always_Inlined einfo__is_always_inlined
++ B Is_Always_Inlined (E Id);
++
++ #define Is_Boolean_Type einfo__is_boolean_type
++ B Is_Boolean_Type (E Id);
++
++ #define Is_By_Copy_Type einfo__is_by_copy_type
++ B Is_By_Copy_Type (E Id);
++
++ #define Is_By_Reference_Type einfo__is_by_reference_type
++ B Is_By_Reference_Type (E Id);
++
++ #define Is_Derived_Type einfo__is_derived_type
++ B Is_Derived_Type (E Id);
++
++ #define Is_Dynamic_Scope einfo__is_dynamic_scope
++ B Is_Dynamic_Scope (E Id);
++
++ #define Is_Indefinite_Subtype einfo__is_indefinite_subtype
++ B Is_Indefinite_Subtype (E Id);
++
++ #define Is_Limited_Type einfo__is_limited_type
++ B Is_Limited_Type (E Id);
++
++ #define Is_Package einfo__is_package
++ B Is_Package (E Id);
++
++ #define Is_Protected_Private einfo__is_protected_private
++ B Is_Protected_Private (E Id);
++
++ #define Is_Protected_Record_Type einfo__is_protected_record_type
++ B Is_Protected_Record_Type (E Id);
++
++ #define Is_Return_By_Reference_Type einfo__is_return_by_reference_type
++ B Is_Return_By_Reference_Type (E Id);
++
++ #define Is_String_Type einfo__is_string_type
++ B Is_String_Type (E Id);
++
++ #define Is_Task_Record_Type einfo__is_task_record_type
++ B Is_Task_Record_Type (E Id);
++
++ #define Next_Component einfo__next_component
++ E Next_Component (E Id);
++
++ #define Next_Discriminant einfo__next_discriminant
++ E Next_Discriminant (E Id);
++
++ #define Next_Formal einfo__next_formal
++ E Next_Formal (E Id);
++
++ #define Next_Formal_With_Extras einfo__next_formal_with_extras
++ E Next_Formal_With_Extras (E Id);
++
++ INLINE E Next_Literal (E Id);
++
++ #define Next_Stored_Discriminant einfo__next_stored_discriminant
++ E Next_Stored_Discriminant (E Id);
++
++ #define Number_Dimensions einfo__number_dimensions
++ Pos Number_Dimensions (E Id);
++
++ #define Number_Discriminants einfo__number_discriminants
++ Pos Number_Discriminants (E Id);
++
++ #define Number_Entries einfo__number_entries
++ Nat Number_Entries (E Id);
++
++ #define Number_Formals einfo__number_formals
++ Pos Number_Formals (E Id);
++
++ INLINE Formal_Kind Parameter_Mode (E Id);
++
++ #define Root_Type einfo__root_type
++ E Root_Type (E Id);
++
++ #define Scope_Depth_Set einfo__scope_depth_set
++ B Scope_Depth_Set (E Id);
++
++ #define Size_Clause einfo__size_clause
++ N Size_Clause (E Id);
++
++ #define Tag_Component einfo__tag_component
++ E Tag_Component (E Id);
++
++ #define Type_High_Bound einfo__type_high_bound
++ N Type_High_Bound (E Id);
++
++ #define Type_Low_Bound einfo__type_low_bound
++ N Type_Low_Bound (E Id);
++
++ #define Underlying_Type einfo__underlying_type
++ E Underlying_Type (E Id);
++
++ #define Known_Alignment einfo__known_alignment
++ B Known_Alignment (Entity_Id E);
++
++ #define Known_Component_Bit_Offset einfo__known_component_bit_offset
++ B Known_Component_Bit_Offset (Entity_Id E);
++
++ #define Known_Component_Size einfo__known_component_size
++ B Known_Component_Size (Entity_Id E);
++
++ #define Known_Esize einfo__known_esize
++ B Known_Esize (Entity_Id E);
++
++ #define Known_Normalized_First_Bit einfo__known_normalized_first_bit
++ B Known_Normalized_First_Bit (Entity_Id E);
++
++ #define Known_Normalized_Position einfo__known_normalized_position
++ B Known_Normalized_Position (Entity_Id E);
++
++ #define Known_Normalized_Position_Max einfo__known_normalized_position_max
++ B Known_Normalized_Position_Max (Entity_Id E);
++
++ #define Known_RM_Size einfo__known_rm_size
++ B Known_RM_Size (Entity_Id E);
++
++ #define Known_Static_Component_Bit_Offset einfo__known_static_component_bit_offset
++ B Known_Static_Component_Bit_Offset (Entity_Id E);
++
++ #define Known_Static_Component_Size einfo__known_static_component_size
++ B Known_Static_Component_Size (Entity_Id E);
++
++ #define Known_Static_Esize einfo__known_static_esize
++ B Known_Static_Esize (Entity_Id E);
++
++ #define Known_Static_Normalized_First_Bit einfo__known_static_normalized_first_bit
++ B Known_Static_Normalized_First_Bit (Entity_Id E);
++
++ #define Known_Static_Normalized_Position einfo__known_static_normalized_position
++ B Known_Static_Normalized_Position (Entity_Id E);
++
++ #define Known_Static_Normalized_Position_Max einfo__known_static_normalized_position_max
++ B Known_Static_Normalized_Position_Max (Entity_Id E);
++
++ #define Known_Static_RM_Size einfo__known_static_rm_size
++ B Known_Static_RM_Size (Entity_Id E);
++
++ #define Unknown_Alignment einfo__unknown_alignment
++ B Unknown_Alignment (Entity_Id E);
++
++ #define Unknown_Component_Bit_Offset einfo__unknown_component_bit_offset
++ B Unknown_Component_Bit_Offset (Entity_Id E);
++
++ #define Unknown_Component_Size einfo__unknown_component_size
++ B Unknown_Component_Size (Entity_Id E);
++
++ #define Unknown_Esize einfo__unknown_esize
++ B Unknown_Esize (Entity_Id E);
++
++ #define Unknown_Normalized_First_Bit einfo__unknown_normalized_first_bit
++ B Unknown_Normalized_First_Bit (Entity_Id E);
++
++ #define Unknown_Normalized_Position einfo__unknown_normalized_position
++ B Unknown_Normalized_Position (Entity_Id E);
++
++ #define Unknown_Normalized_Position_Max einfo__unknown_normalized_position_max
++ B Unknown_Normalized_Position_Max (Entity_Id E);
++
++ #define Unknown_RM_Size einfo__unknown_rm_size
++ B Unknown_RM_Size (Entity_Id E);
++
++
++ INLINE L Accept_Address (E Id)
++ { return Elist21 (Id); }
++
++ INLINE E Access_Disp_Table (E Id)
++ { return Node16 (Implementation_Base_Type (Id)); }
++
++ INLINE E Actual_Subtype (E Id)
++ { return Node17 (Id); }
++
++ INLINE B Address_Taken (E Id)
++ { return Flag104 (Id); }
++
++ INLINE E Alias (E Id)
++ { return Node18 (Id); }
++
++ INLINE U Alignment (E Id)
++ { return Uint14 (Id); }
++
++ INLINE E Associated_Final_Chain (E Id)
++ { return Node23 (Id); }
++
++ INLINE E Associated_Formal_Package (E Id)
++ { return Node12 (Id); }
++
++ INLINE N Associated_Node_For_Itype (E Id)
++ { return Node8 (Id); }
++
++ INLINE E Associated_Storage_Pool (E Id)
++ { return Node22 (Root_Type (Id)); }
++
++ INLINE N Barrier_Function (E Id)
++ { return Node12 (Id); }
++
++ INLINE N Block_Node (E Id)
++ { return Node11 (Id); }
++
++ INLINE E Body_Entity (E Id)
++ { return Node19 (Id); }
++
++ INLINE B Body_Needed_For_SAL (E Id)
++ { return Flag40 (Id); }
++
++ INLINE B C_Pass_By_Copy (E Id)
++ { return Flag125 (Implementation_Base_Type (Id)); }
++
++ INLINE B Can_Never_Be_Null (E Id)
++ { return Flag38 (Id); }
++
++ INLINE B Checks_May_Be_Suppressed (E Id)
++ { return Flag31 (Id); }
++
++ INLINE E Class_Wide_Type (E Id)
++ { return Node9 (Id); }
++
++ INLINE E Cloned_Subtype (E Id)
++ { return Node16 (Id); }
++
++ INLINE U Component_Bit_Offset (E Id)
++ { return Uint11 (Id); }
++
++ INLINE N Component_Clause (E Id)
++ { return Node13 (Id); }
++
++ INLINE U Component_Size (E Id)
++ { return Uint22 (Implementation_Base_Type (Id)); }
++
++ INLINE E Component_Type (E Id)
++ { return Node20 (Implementation_Base_Type (Id)); }
++
++ INLINE E Corresponding_Concurrent_Type (E Id)
++ { return Node18 (Id); }
++
++ INLINE E Corresponding_Discriminant (E Id)
++ { return Node19 (Id); }
++
++ INLINE E Corresponding_Equality (E Id)
++ { return Node13 (Id); }
++
++ INLINE E Corresponding_Record_Type (E Id)
++ { return Node18 (Id); }
++
++ INLINE E Corresponding_Remote_Type (E Id)
++ { return Node22 (Id); }
++
++ INLINE N Current_Value (E Id)
++ { return Node9 (Id); }
++
++ INLINE E CR_Discriminant (E Id)
++ { return Node23 (Id); }
++
++ INLINE B Debug_Info_Off (E Id)
++ { return Flag166 (Id); }
++
++ INLINE E Debug_Renaming_Link (E Id)
++ { return Node13 (Id); }
++
++ INLINE E Default_Expr_Function (E Id)
++ { return Node21 (Id); }
++
++ INLINE B Default_Expressions_Processed (E Id)
++ { return Flag108 (Id); }
++
++ INLINE N Default_Value (E Id)
++ { return Node20 (Id); }
++
++ INLINE B Delay_Cleanups (E Id)
++ { return Flag114 (Id); }
++
++ INLINE B Delay_Subprogram_Descriptors (E Id)
++ { return Flag50 (Id); }
++
++ INLINE R Delta_Value (E Id)
++ { return Ureal18 (Id); }
++
++ INLINE L Dependent_Instances (E Id)
++ { return Elist8 (Id); }
++
++ INLINE B Depends_On_Private (E Id)
++ { return Flag14 (Id); }
++
++ INLINE U Digits_Value (E Id)
++ { return Uint17 (Id); }
++
++ INLINE E Directly_Designated_Type (E Id)
++ { return Node20 (Id); }
++
++ INLINE B Discard_Names (E Id)
++ { return Flag88 (Id); }
++
++ INLINE E Discriminal (E Id)
++ { return Node17 (Id); }
++
++ INLINE N Discriminal_Link (E Id)
++ { return Node10 (Id); }
++
++ INLINE E Discriminant_Checking_Func (E Id)
++ { return Node20 (Id); }
++
++ INLINE L Discriminant_Constraint (E Id)
++ { return Elist21 (Id); }
++
++ INLINE N Discriminant_Default_Value (E Id)
++ { return Node20 (Id); }
++
++ INLINE U Discriminant_Number (E Id)
++ { return Uint15 (Id); }
++
++ INLINE U DT_Entry_Count (E Id)
++ { return Uint15 (Id); }
++
++ INLINE U DT_Position (E Id)
++ { return Uint15 (Id); }
++
++ INLINE E DTC_Entity (E Id)
++ { return Node16 (Id); }
++
++ INLINE B Elaborate_All_Desirable (E Id)
++ { return Flag146 (Id); }
++
++ INLINE E Elaboration_Entity (E Id)
++ { return Node13 (Id); }
++
++ INLINE B Elaboration_Entity_Required (E Id)
++ { return Flag174 (Id); }
++
++ INLINE E Enclosing_Scope (E Id)
++ { return Node18 (Id); }
++
++ INLINE B Entry_Accepted (E Id)
++ { return Flag152 (Id); }
++
++ INLINE E Entry_Bodies_Array (E Id)
++ { return Node15 (Id); }
++
++ INLINE E Entry_Cancel_Parameter (E Id)
++ { return Node23 (Id); }
++
++ INLINE E Entry_Component (E Id)
++ { return Node11 (Id); }
++
++ INLINE E Entry_Formal (E Id)
++ { return Node16 (Id); }
++
++ INLINE N Entry_Index_Constant (E Id)
++ { return Node18 (Id); }
++
++ INLINE E Entry_Parameters_Type (E Id)
++ { return Node15 (Id); }
++
++ INLINE E Enum_Pos_To_Rep (E Id)
++ { return Node23 (Id); }
++
++ INLINE Uint Enumeration_Pos (E Id)
++ { return Uint11 (Id); }
++
++ INLINE U Enumeration_Rep (E Id)
++ { return Uint12 (Id); }
++
++ INLINE N Enumeration_Rep_Expr (E Id)
++ { return Node22 (Id); }
++
++ INLINE E Equivalent_Type (E Id)
++ { return Node18 (Id); }
++
++ INLINE Uint Esize (E Id)
++ { return Uint12 (Id); }
++
++ INLINE Uint Exception_Code (E Id)
++ { return Uint22 (Id); }
++
++ INLINE E Extra_Accessibility (E Id)
++ { return Node13 (Id); }
++
++ INLINE E Extra_Constrained (E Id)
++ { return Node23 (Id); }
++
++ INLINE E Extra_Formal (E Id)
++ { return Node15 (Id); }
++
++ INLINE E Finalization_Chain_Entity (E Id)
++ { return Node19 (Id); }
++
++ INLINE E First_Entity (E Id)
++ { return Node17 (Id); }
++
++ INLINE N First_Index (E Id)
++ { return Node17 (Id); }
++
++ INLINE E First_Literal (E Id)
++ { return Node17 (Id); }
++
++ INLINE E First_Optional_Parameter (E Id)
++ { return Node14 (Id); }
++
++ INLINE E First_Private_Entity (E Id)
++ { return Node16 (Id); }
++
++ INLINE E First_Rep_Item (E Id)
++ { return Node6 (Id); }
++
++ INLINE N Freeze_Node (E Id)
++ { return Node7 (Id); }
++
++ INLINE B From_With_Type (E Id)
++ { return Flag159 (Id); }
++
++ INLINE E Full_View (E Id)
++ { return Node11 (Id); }
++
++ INLINE B Function_Returns_With_DSP (E Id)
++ { return Flag169 (Id); }
++
++ INLINE E Generic_Homonym (E Id)
++ { return Node11 (Id); }
++
++ INLINE L Generic_Renamings (E Id)
++ { return Elist23 (Id); }
++
++ INLINE S Handler_Records (E Id)
++ { return List10 (Id); }
++
++ INLINE B Has_Aliased_Components (E Id)
++ { return Flag135 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Alignment_Clause (E Id)
++ { return Flag46 (Id); }
++
++ INLINE B Has_All_Calls_Remote (E Id)
++ { return Flag79 (Id); }
++
++ INLINE B Has_Atomic_Components (E Id)
++ { return Flag86 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Biased_Representation (E Id)
++ { return Flag139 (Id); }
++
++ INLINE B Has_Completion (E Id)
++ { return Flag26 (Id); }
++
++ INLINE B Has_Completion_In_Body (E Id)
++ { return Flag71 (Id); }
++
++ INLINE B Has_Complex_Representation (E Id)
++ { return Flag140 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Component_Size_Clause (E Id)
++ { return Flag68 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Controlled_Component (E Id)
++ { return Flag43 (Base_Type (Id)); }
++
++ INLINE B Has_Contiguous_Rep (E Id)
++ { return Flag181 (Id); }
++
++ INLINE B Has_Controlling_Result (E Id)
++ { return Flag98 (Id); }
++
++ INLINE B Has_Convention_Pragma (E Id)
++ { return Flag119 (Id); }
++
++ INLINE B Has_Delayed_Freeze (E Id)
++ { return Flag18 (Id); }
++
++ INLINE B Has_Discriminants (E Id)
++ { return Flag5 (Id); }
++
++ INLINE B Has_Enumeration_Rep_Clause (E Id)
++ { return Flag66 (Id); }
++
++ INLINE B Has_Exit (E Id)
++ { return Flag47 (Id); }
++
++ INLINE B Has_External_Tag_Rep_Clause (E Id)
++ { return Flag110 (Id); }
++
++ INLINE B Has_Forward_Instantiation (E Id)
++ { return Flag175 (Id); }
++
++ INLINE B Has_Fully_Qualified_Name (E Id)
++ { return Flag173 (Id); }
++
++ INLINE B Has_Gigi_Rep_Item (E Id)
++ { return Flag82 (Id); }
++
++ INLINE B Has_Homonym (E Id)
++ { return Flag56 (Id); }
++
++ INLINE B Has_Machine_Radix_Clause (E Id)
++ { return Flag83 (Id); }
++
++ INLINE B Has_Master_Entity (E Id)
++ { return Flag21 (Id); }
++
++ INLINE B Has_Missing_Return (E Id)
++ { return Flag142 (Id); }
++
++ INLINE B Has_Nested_Block_With_Handler (E Id)
++ { return Flag101 (Id); }
++
++ INLINE B Has_Non_Standard_Rep (E Id)
++ { return Flag75 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Object_Size_Clause (E Id)
++ { return Flag172 (Id); }
++
++ INLINE B Has_Per_Object_Constraint (E Id)
++ { return Flag154 (Id); }
++
++ INLINE B Has_Pragma_Controlled (E Id)
++ { return Flag27 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Pragma_Elaborate_Body (E Id)
++ { return Flag150 (Id); }
++
++ INLINE B Has_Pragma_Inline (E Id)
++ { return Flag157 (Id); }
++
++ INLINE B Has_Pragma_Pack (E Id)
++ { return Flag121 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Pragma_Pure_Function (E Id)
++ { return Flag179 (Id); }
++
++ INLINE B Has_Pragma_Unreferenced (E Id)
++ { return Flag180 (Id); }
++
++ INLINE B Has_Primitive_Operations (E Id)
++ { return Flag120 (Base_Type (Id)); }
++
++ INLINE B Has_Private_Declaration (E Id)
++ { return Flag155 (Id); }
++
++ INLINE B Has_Qualified_Name (E Id)
++ { return Flag161 (Id); }
++
++ INLINE B Has_Record_Rep_Clause (E Id)
++ { return Flag65 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Recursive_Call (E Id)
++ { return Flag143 (Id); }
++
++ INLINE B Has_Size_Clause (E Id)
++ { return Flag29 (Id); }
++
++ INLINE B Has_Small_Clause (E Id)
++ { return Flag67 (Id); }
++
++ INLINE B Has_Specified_Layout (E Id)
++ { return Flag100 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Storage_Size_Clause (E Id)
++ { return Flag23 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Subprogram_Descriptor (E Id)
++ { return Flag93 (Id); }
++
++ INLINE B Has_Task (E Id)
++ { return Flag30 (Base_Type (Id)); }
++
++ INLINE B Has_Unchecked_Union (E Id)
++ { return Flag123 (Base_Type (Id)); }
++
++ INLINE B Has_Unknown_Discriminants (E Id)
++ { return Flag72 (Id); }
++
++ INLINE B Has_Volatile_Components (E Id)
++ { return Flag87 (Implementation_Base_Type (Id)); }
++
++ INLINE B Has_Xref_Entry (E Id)
++ { return Flag182 (Implementation_Base_Type (Id)); }
++
++ INLINE E Hiding_Loop_Variable (E Id)
++ { return Node8 (Id); }
++
++ INLINE E Homonym (E Id)
++ { return Node4 (Id); }
++
++ INLINE B In_Package_Body (E Id)
++ { return Flag48 (Id); }
++
++ INLINE B In_Private_Part (E Id)
++ { return Flag45 (Id); }
++
++ INLINE B In_Use (E Id)
++ { return Flag8 (Id); }
++
++ INLINE L Inner_Instances (E Id)
++ { return Elist23 (Id); }
++
++ INLINE N Interface_Name (E Id)
++ { return Node21 (Id); }
++
++ INLINE B Is_Abstract (E Id)
++ { return Flag19 (Id); }
++
++ INLINE B Is_Access_Constant (E Id)
++ { return Flag69 (Id); }
++
++ INLINE B Is_Aliased (E Id)
++ { return Flag15 (Id); }
++
++ INLINE B Is_AST_Entry (E Id)
++ { return Flag132 (Id); }
++
++ INLINE B Is_Asynchronous (E Id)
++ { return Flag81 (Id); }
++
++ INLINE B Is_Atomic (E Id)
++ { return Flag85 (Id); }
++
++ INLINE B Is_Bit_Packed_Array (E Id)
++ { return Flag122 (Implementation_Base_Type (Id)); }
++
++ INLINE B Is_Called (E Id)
++ { return Flag102 (Id); }
++
++ INLINE B Is_Character_Type (E Id)
++ { return Flag63 (Id); }
++
++ INLINE B Is_Child_Unit (E Id)
++ { return Flag73 (Id); }
++
++ INLINE B Is_Class_Wide_Equivalent_Type (E Id)
++ { return Flag35 (Id); }
++
++ INLINE B Is_Compilation_Unit (E Id)
++ { return Flag149 (Id); }
++
++ INLINE B Is_Completely_Hidden (E Id)
++ { return Flag103 (Id); }
++
++ INLINE B Is_Constr_Subt_For_U_Nominal (E Id)
++ { return Flag80 (Id); }
++
++ INLINE B Is_Constr_Subt_For_UN_Aliased (E Id)
++ { return Flag141 (Id); }
++
++ INLINE B Is_Constrained (E Id)
++ { return Flag12 (Id); }
++
++ INLINE B Is_Constructor (E Id)
++ { return Flag76 (Id); }
++
++ INLINE B Is_Controlled (E Id)
++ { return Flag42 (Base_Type (Id)); }
++
++ INLINE B Is_Controlling_Formal (E Id)
++ { return Flag97 (Id); }
++
++ INLINE B Is_CPP_Class (E Id)
++ { return Flag74 (Id); }
++
++ INLINE B Is_Discrim_SO_Function (E Id)
++ { return Flag176 (Id); }
++
++ INLINE B Is_Dispatching_Operation (E Id)
++ { return Flag6 (Id); }
++
++ INLINE B Is_Eliminated (E Id)
++ { return Flag124 (Id); }
++
++ INLINE B Is_Entry_Formal (E Id)
++ { return Flag52 (Id); }
++
++ INLINE B Is_Exported (E Id)
++ { return Flag99 (Id); }
++
++ INLINE B Is_First_Subtype (E Id)
++ { return Flag70 (Id); }
++
++ INLINE B Is_For_Access_Subtype (E Id)
++ { return Flag118 (Id); }
++
++ INLINE B Is_Formal_Subprogram (E Id)
++ { return Flag111 (Id); }
++
++ INLINE B Is_Frozen (E Id)
++ { return Flag4 (Id); }
++
++ INLINE B Is_Generic_Actual_Type (E Id)
++ { return Flag94 (Id); }
++
++ INLINE B Is_Generic_Instance (E Id)
++ { return Flag130 (Id); }
++
++ INLINE B Is_Generic_Type (E Id)
++ { return Flag13 (Id); }
++
++ INLINE B Is_Hidden (E Id)
++ { return Flag57 (Id); }
++
++ INLINE B Is_Hidden_Open_Scope (E Id)
++ { return Flag171 (Id); }
++
++ INLINE B Is_Immediately_Visible (E Id)
++ { return Flag7 (Id); }
++
++ INLINE B Is_Imported (E Id)
++ { return Flag24 (Id); }
++
++ INLINE B Is_Inlined (E Id)
++ { return Flag11 (Id); }
++
++ INLINE B Is_Instantiated (E Id)
++ { return Flag126 (Id); }
++
++ INLINE B Is_Internal (E Id)
++ { return Flag17 (Id); }
++
++ INLINE B Is_Interrupt_Handler (E Id)
++ { return Flag89 (Id); }
++
++ INLINE B Is_Intrinsic_Subprogram (E Id)
++ { return Flag64 (Id); }
++
++ INLINE B Is_Itype (E Id)
++ { return Flag91 (Id); }
++
++ INLINE B Is_Known_Non_Null (E Id)
++ { return Flag37 (Id); }
++
++ INLINE B Is_Known_Valid (E Id)
++ { return Flag170 (Id); }
++
++ INLINE B Is_Limited_Composite (E Id)
++ { return Flag106 (Id); }
++
++ INLINE B Is_Limited_Record (E Id)
++ { return Flag25 (Id); }
++
++ INLINE B Is_Machine_Code_Subprogram (E Id)
++ { return Flag137 (Id); }
++
++ INLINE B Is_Non_Static_Subtype (E Id)
++ { return Flag109 (Id); }
++
++ INLINE B Is_Null_Init_Proc (E Id)
++ { return Flag178 (Id); }
++
++ INLINE B Is_Optional_Parameter (E Id)
++ { return Flag134 (Id); }
++
++ INLINE B Is_Overriding_Operation (E Id)
++ { return Flag39 (Id); }
++
++ INLINE B Is_Package_Body_Entity (E Id)
++ { return Flag160 (Id); }
++
++ INLINE B Is_Packed (E Id)
++ { return Flag51 (Implementation_Base_Type (Id)); }
++
++ INLINE B Is_Packed_Array_Type (E Id)
++ { return Flag138 (Id); }
++
++ INLINE B Is_Potentially_Use_Visible (E Id)
++ { return Flag9 (Id); }
++
++ INLINE B Is_Preelaborated (E Id)
++ { return Flag59 (Id); }
++
++ INLINE B Is_Private_Composite (E Id)
++ { return Flag107 (Id); }
++
++ INLINE B Is_Private_Descendant (E Id)
++ { return Flag53 (Id); }
++
++ INLINE B Is_Psected (E Id)
++ { return Flag153 (Id); }
++
++ INLINE B Is_Public (E Id)
++ { return Flag10 (Id); }
++
++ INLINE B Is_Pure (E Id)
++ { return Flag44 (Id); }
++
++ INLINE B Is_Remote_Call_Interface (E Id)
++ { return Flag62 (Id); }
++
++ INLINE B Is_Remote_Types (E Id)
++ { return Flag61 (Id); }
++
++ INLINE B Is_Renaming_Of_Object (E Id)
++ { return Flag112 (Id); }
++
++ INLINE B Is_Shared_Passive (E Id)
++ { return Flag60 (Id); }
++
++ INLINE B Is_Statically_Allocated (E Id)
++ { return Flag28 (Id); }
++
++ INLINE B Is_Tag (E Id)
++ { return Flag78 (Id); }
++
++ INLINE B Is_Tagged_Type (E Id)
++ { return Flag55 (Id); }
++
++ INLINE B Is_Thread_Body (E Id)
++ { return Flag77 (Id); }
++
++ INLINE B Is_True_Constant (E Id)
++ { return Flag163 (Id); }
++
++ INLINE B Is_Unchecked_Union (E Id)
++ { return Flag117 (Id); }
++
++ INLINE B Is_Unsigned_Type (E Id)
++ { return Flag144 (Id); }
++
++ INLINE B Is_Valued_Procedure (E Id)
++ { return Flag127 (Id); }
++
++ INLINE B Is_Visible_Child_Unit (E Id)
++ { return Flag116 (Id); }
++
++ INLINE B Is_VMS_Exception (E Id)
++ { return Flag133 (Id); }
++
++ INLINE B Kill_Elaboration_Checks (E Id)
++ { return Flag32 (Id); }
++
++ INLINE B Kill_Range_Checks (E Id)
++ { return Flag33 (Id); }
++
++ INLINE B Kill_Tag_Checks (E Id)
++ { return Flag34 (Id); }
++
++ INLINE E Last_Entity (E Id)
++ { return Node20 (Id); }
++
++ INLINE L Limited_Views (E Id)
++ { return Elist23 (Id); }
++
++ INLINE E Lit_Indexes (E Id)
++ { return Node15 (Id); }
++
++ INLINE E Lit_Strings (E Id)
++ { return Node16 (Id); }
++
++ INLINE B Machine_Radix_10 (E Id)
++ { return Flag84 (Id); }
++
++ INLINE E Master_Id (E Id)
++ { return Node17 (Id); }
++
++ INLINE B Materialize_Entity (E Id)
++ { return Flag168 (Id); }
++
++ INLINE M Mechanism (E Id)
++ { return UI_To_Int (Uint8 (Id)); }
++
++ INLINE Uint Modulus (E Id)
++ { return Uint17 (Base_Type (Id)); }
++
++ INLINE B Needs_Debug_Info (E Id)
++ { return Flag147 (Id); }
++
++ INLINE B Needs_No_Actuals (E Id)
++ { return Flag22 (Id); }
++
++ INLINE B Never_Set_In_Source (E Id)
++ { return Flag115 (Id); }
++
++ INLINE E Next_Inlined_Subprogram (E Id)
++ { return Node12 (Id); }
++
++ INLINE B No_Pool_Assigned (E Id)
++ { return Flag131 (Root_Type (Id)); }
++
++ INLINE B No_Return (E Id)
++ { return Flag113 (Id); }
++
++ INLINE B Non_Binary_Modulus (E Id)
++ { return Flag58 (Base_Type (Id)); }
++
++ INLINE E Non_Limited_View (E Id)
++ { return Node17 (Id); }
++
++ INLINE B Nonzero_Is_True (E Id)
++ { return Flag162 (Base_Type (Id)); }
++
++ INLINE U Normalized_First_Bit (E Id)
++ { return Uint8 (Id); }
++
++ INLINE U Normalized_Position (E Id)
++ { return Uint14 (Id); }
++
++ INLINE U Normalized_Position_Max (E Id)
++ { return Uint10 (Id); }
++
++ INLINE E Object_Ref (E Id)
++ { return Node17 (Id); }
++
++ INLINE E Original_Array_Type (E Id)
++ { return Node21 (Id); }
++
++ INLINE E Original_Record_Component (E Id)
++ { return Node22 (Id); }
++
++ INLINE E Packed_Array_Type (E Id)
++ { return Node23 (Id); }
++
++ INLINE E Parent_Subtype (E Id)
++ { return Node19 (Id); }
++
++ INLINE L Primitive_Operations (E Id)
++ { return Elist15 (Id); }
++
++ INLINE E Prival (E Id)
++ { return Node17 (Id); }
++
++ INLINE L Privals_Chain (E Id)
++ { return Elist23 (Id); }
++
++ INLINE L Private_Dependents (E Id)
++ { return Elist18 (Id); }
++
++ INLINE N Private_View (E Id)
++ { return Node22 (Id); }
++
++ INLINE E Protected_Body_Subprogram (E Id)
++ { return Node11 (Id); }
++
++ INLINE E Protected_Formal (E Id)
++ { return Node22 (Id); }
++
++ INLINE N Protected_Operation (E Id)
++ { return Node23 (Id); }
++
++ INLINE B Reachable (E Id)
++ { return Flag49 (Id); }
++
++ INLINE B Referenced (E Id)
++ { return Flag156 (Id); }
++
++ INLINE B Referenced_As_LHS (E Id)
++ { return Flag36 (Id); }
++
++ INLINE N Referenced_Object (E Id)
++ { return Node10 (Id); }
++
++ INLINE N Register_Exception_Call (E Id)
++ { return Node20 (Id); }
++
++ INLINE E Related_Array_Object (E Id)
++ { return Node19 (Id); }
++
++ INLINE E Related_Instance (E Id)
++ { return Node15 (Id); }
++
++ INLINE N Renamed_Entity (E Id)
++ { return Node18 (Id); }
++
++ INLINE N Renamed_Object (E Id)
++ { return Node18 (Id); }
++
++ INLINE U Renaming_Map (E Id)
++ { return Uint9 (Id); }
++
++ INLINE B Return_Present (E Id)
++ { return Flag54 (Id); }
++
++ INLINE B Returns_By_Ref (E Id)
++ { return Flag90 (Id); }
++
++ INLINE B Reverse_Bit_Order (E Id)
++ { return Flag164 (Base_Type (Id)); }
++
++ INLINE U RM_Size (E Id)
++ { return Uint13 (Id); }
++
++ INLINE N Scalar_Range (E Id)
++ { return Node20 (Id); }
++
++ INLINE U Scale_Value (E Id)
++ { return Uint15 (Id); }
++
++ INLINE U Scope_Depth_Value (E Id)
++ { return Uint22 (Id); }
++
++ INLINE B Sec_Stack_Needed_For_Return (E Id)
++ { return Flag167 (Id); }
++
++ INLINE S Shadow_Entities (E Id)
++ { return List14 (Id); }
++
++ INLINE E Shared_Var_Assign_Proc (E Id)
++ { return Node22 (Id); }
++
++ INLINE E Shared_Var_Read_Proc (E Id)
++ { return Node15 (Id); }
++
++ INLINE N Size_Check_Code (E Id)
++ { return Node19 (Id); }
++
++ INLINE B Size_Depends_On_Discriminant (E Id)
++ { return Flag177 (Id); }
++
++ INLINE B Size_Known_At_Compile_Time (E Id)
++ { return Flag92 (Id); }
++
++ INLINE R Small_Value (E Id)
++ { return Ureal21 (Id); }
++
++ INLINE E Spec_Entity (E Id)
++ { return Node19 (Id); }
++
++ INLINE E Storage_Size_Variable (E Id)
++ { return Node15 (Implementation_Base_Type (Id)); }
++
++ INLINE L Stored_Constraint (E Id)
++ { return Elist23 (Id); }
++
++ INLINE B Strict_Alignment (E Id)
++ { return Flag145 (Implementation_Base_Type (Id)); }
++
++ INLINE U String_Literal_Length (E Id)
++ { return Uint16 (Id); }
++
++ INLINE N String_Literal_Low_Bound (E Id)
++ { return Node15 (Id); }
++
++ INLINE B Suppress_Elaboration_Warnings (E Id)
++ { return Flag148 (Id); }
++
++ INLINE B Suppress_Init_Proc (E Id)
++ { return Flag105 (Base_Type (Id)); }
++
++ INLINE B Suppress_Style_Checks (E Id)
++ { return Flag165 (Id); }
++
++ INLINE B Treat_As_Volatile (E Id)
++ { return Flag41 (Id); }
++
++ INLINE E Underlying_Full_View (E Id)
++ { return Node19 (Id); }
++
++ INLINE N Unset_Reference (E Id)
++ { return Node16 (Id); }
++
++ INLINE B Uses_Sec_Stack (E Id)
++ { return Flag95 (Id); }
++
++ INLINE B Vax_Float (E Id)
++ { return Flag151 (Base_Type (Id)); }
++
++ INLINE B Warnings_Off (E Id)
++ { return Flag96 (Id); }
++
++ INLINE B Is_Access_Type (E Id)
++ { return IN (Ekind (Id), Access_Kind); }
++
++ INLINE B Is_Array_Type (E Id)
++ { return IN (Ekind (Id), Array_Kind); }
++
++ INLINE B Is_Class_Wide_Type (E Id)
++ { return IN (Ekind (Id), Class_Wide_Kind); }
++
++ INLINE B Is_Composite_Type (E Id)
++ { return IN (Ekind (Id), Composite_Kind); }
++
++ INLINE B Is_Concurrent_Body (E Id)
++ { return IN (Ekind (Id), Concurrent_Body_Kind); }
++
++ INLINE B Is_Concurrent_Record_Type (E Id)
++ { return Flag20 (Id); }
++
++ INLINE B Is_Concurrent_Type (E Id)
++ { return IN (Ekind (Id), Concurrent_Kind); }
++
++ INLINE B Is_Decimal_Fixed_Point_Type (E Id)
++ { return IN (Ekind (Id), Decimal_Fixed_Point_Kind); }
++
++ INLINE B Is_Digits_Type (E Id)
++ { return IN (Ekind (Id), Digits_Kind); }
++
++ INLINE B Is_Discrete_Or_Fixed_Point_Type (E Id)
++ { return IN (Ekind (Id), Discrete_Or_Fixed_Point_Kind); }
++
++ INLINE B Is_Discrete_Type (E Id)
++ { return IN (Ekind (Id), Discrete_Kind); }
++
++ INLINE B Is_Elementary_Type (E Id)
++ { return IN (Ekind (Id), Elementary_Kind); }
++
++ INLINE B Is_Entry (E Id)
++ { return IN (Ekind (Id), Entry_Kind); }
++
++ INLINE B Is_Enumeration_Type (E Id)
++ { return IN (Ekind (Id), Enumeration_Kind); }
++
++ INLINE B Is_Fixed_Point_Type (E Id)
++ { return IN (Ekind (Id), Fixed_Point_Kind); }
++
++ INLINE B Is_Floating_Point_Type (E Id)
++ { return IN (Ekind (Id), Float_Kind); }
++
++ INLINE B Is_Formal (E Id)
++ { return IN (Ekind (Id), Formal_Kind); }
++
++ INLINE B Is_Generic_Subprogram (E Id)
++ { return IN (Ekind (Id), Generic_Subprogram_Kind); }
++
++ INLINE B Is_Generic_Unit (E Id)
++ { return IN (Ekind (Id), Generic_Unit_Kind); }
++
++ INLINE B Is_Incomplete_Or_Private_Type (E Id)
++ { return IN (Ekind (Id), Incomplete_Or_Private_Kind); }
++
++ INLINE B Is_Integer_Type (E Id)
++ { return IN (Ekind (Id), Integer_Kind); }
++
++ INLINE B Is_Modular_Integer_Type (E Id)
++ { return IN (Ekind (Id), Modular_Integer_Kind); }
++
++ INLINE B Is_Named_Number (E Id)
++ { return IN (Ekind (Id), Named_Kind); }
++
++ INLINE B Is_Numeric_Type (E Id)
++ { return IN (Ekind (Id), Numeric_Kind); }
++
++ INLINE B Is_Object (E Id)
++ { return IN (Ekind (Id), Object_Kind); }
++
++ INLINE B Is_Ordinary_Fixed_Point_Type (E Id)
++ { return IN (Ekind (Id), Ordinary_Fixed_Point_Kind); }
++
++ INLINE B Is_Overloadable (E Id)
++ { return IN (Ekind (Id), Overloadable_Kind); }
++
++ INLINE B Is_Private_Type (E Id)
++ { return IN (Ekind (Id), Private_Kind); }
++
++ INLINE B Is_Protected_Type (E Id)
++ { return IN (Ekind (Id), Protected_Kind); }
++
++ INLINE B Is_Real_Type (E Id)
++ { return IN (Ekind (Id), Real_Kind); }
++
++ INLINE B Is_Record_Type (E Id)
++ { return IN (Ekind (Id), Record_Kind); }
++
++ INLINE B Is_Scalar_Type (E Id)
++ { return IN (Ekind (Id), Scalar_Kind); }
++
++ INLINE B Is_Signed_Integer_Type (E Id)
++ { return IN (Ekind (Id), Signed_Integer_Kind); }
++
++ INLINE B Is_Subprogram (E Id)
++ { return IN (Ekind (Id), Subprogram_Kind); }
++
++ INLINE B Is_Task_Type (E Id)
++ { return IN (Ekind (Id), Task_Kind); }
++
++ INLINE B Is_Type (E Id)
++ { return IN (Ekind (Id), Type_Kind); }
++
++ INLINE N Entry_Index_Type (E Id)
++ { return Etype (Discrete_Subtype_Definition (Parent (Id))); }
++
++ INLINE Node_Id Next_Index (Node_Id Id)
++ { return Next (Id); }
++
++ INLINE E Next_Literal (E Id)
++ { return Next (Id); }
++
++ INLINE Formal_Kind Parameter_Mode (E Id)
++ { return Ekind (Id); }
++
++/* End of einfo.h (C version of Einfo package specification) */
+--- gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/nmake.adb.orig 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/nmake.adb 2004-06-02 00:52:35.000000000 +0200
+@@ -0,0 +1,2867 @@
++------------------------------------------------------------------------------
++-- --
++-- GNAT COMPILER COMPONENTS --
++-- --
++-- N M A K E --
++-- --
++-- B o d y --
++-- --
++-- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
++-- --
++-- GNAT is free software; you can redistribute it and/or modify it under --
++-- terms of the GNU General Public License as published by the Free Soft- --
++-- ware Foundation; either version 2, or (at your option) any later ver- --
++-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
++-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
++-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
++-- for more details. You should have received a copy of the GNU General --
++-- Public License distributed with GNAT; see file COPYING. If not, write --
++-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
++-- MA 02111-1307, USA. --
++-- --
++-- GNAT was originally developed by the GNAT team at New York University. --
++-- Extensive contributions were provided by Ada Core Technologies Inc. --
++-- --
++------------------------------------------------------------------------------
++
++pragma Style_Checks (All_Checks);
++-- Turn off subprogram order checking, since the routines here are
++-- generated automatically in order.
++
++
++with Atree; use Atree;
++with Sinfo; use Sinfo;
++with Snames; use Snames;
++with Stand; use Stand;
++
++package body Nmake is
++
++ function Make_Unused_At_Start (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Unused_At_Start, Sloc);
++ begin
++ return N;
++ end Make_Unused_At_Start;
++
++ function Make_Unused_At_End (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Unused_At_End, Sloc);
++ begin
++ return N;
++ end Make_Unused_At_End;
++
++ function Make_Identifier (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Identifier, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ return N;
++ end Make_Identifier;
++
++ function Make_Integer_Literal (Sloc : Source_Ptr;
++ Intval : Uint)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Integer_Literal, Sloc);
++ begin
++ Set_Intval (N, Intval);
++ return N;
++ end Make_Integer_Literal;
++
++ function Make_Real_Literal (Sloc : Source_Ptr;
++ Realval : Ureal)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Real_Literal, Sloc);
++ begin
++ Set_Realval (N, Realval);
++ return N;
++ end Make_Real_Literal;
++
++ function Make_Character_Literal (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Char_Literal_Value : Char_Code)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Character_Literal, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ Set_Char_Literal_Value (N, Char_Literal_Value);
++ return N;
++ end Make_Character_Literal;
++
++ function Make_String_Literal (Sloc : Source_Ptr;
++ Strval : String_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_String_Literal, Sloc);
++ begin
++ Set_Strval (N, Strval);
++ return N;
++ end Make_String_Literal;
++
++ function Make_Pragma (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Pragma_Argument_Associations : List_Id := No_List;
++ Debug_Statement : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Pragma, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ Set_Pragma_Argument_Associations
++ (N, Pragma_Argument_Associations);
++ Set_Debug_Statement (N, Debug_Statement);
++ return N;
++ end Make_Pragma;
++
++ function Make_Pragma_Argument_Association (Sloc : Source_Ptr;
++ Chars : Name_Id := No_Name;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Pragma_Argument_Association, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Pragma_Argument_Association;
++
++ function Make_Defining_Identifier (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Entity (N_Defining_Identifier, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ return N;
++ end Make_Defining_Identifier;
++
++ function Make_Full_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Type_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Full_Type_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Type_Definition (N, Type_Definition);
++ return N;
++ end Make_Full_Type_Declaration;
++
++ function Make_Subtype_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Subtype_Indication : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subtype_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Subtype_Indication (N, Subtype_Indication);
++ return N;
++ end Make_Subtype_Declaration;
++
++ function Make_Subtype_Indication (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Constraint : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subtype_Indication, Sloc);
++ begin
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Constraint (N, Constraint);
++ return N;
++ end Make_Subtype_Indication;
++
++ function Make_Object_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Aliased_Present : Boolean := False;
++ Constant_Present : Boolean := False;
++ Object_Definition : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Object_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Aliased_Present (N, Aliased_Present);
++ Set_Constant_Present (N, Constant_Present);
++ Set_Object_Definition (N, Object_Definition);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Object_Declaration;
++
++ function Make_Number_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Number_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Number_Declaration;
++
++ function Make_Derived_Type_Definition (Sloc : Source_Ptr;
++ Abstract_Present : Boolean := False;
++ Subtype_Indication : Node_Id;
++ Record_Extension_Part : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Derived_Type_Definition, Sloc);
++ begin
++ Set_Abstract_Present (N, Abstract_Present);
++ Set_Subtype_Indication (N, Subtype_Indication);
++ Set_Record_Extension_Part (N, Record_Extension_Part);
++ return N;
++ end Make_Derived_Type_Definition;
++
++ function Make_Range_Constraint (Sloc : Source_Ptr;
++ Range_Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Range_Constraint, Sloc);
++ begin
++ Set_Range_Expression (N, Range_Expression);
++ return N;
++ end Make_Range_Constraint;
++
++ function Make_Range (Sloc : Source_Ptr;
++ Low_Bound : Node_Id;
++ High_Bound : Node_Id;
++ Includes_Infinities : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Range, Sloc);
++ begin
++ Set_Low_Bound (N, Low_Bound);
++ Set_High_Bound (N, High_Bound);
++ Set_Includes_Infinities (N, Includes_Infinities);
++ return N;
++ end Make_Range;
++
++ function Make_Enumeration_Type_Definition (Sloc : Source_Ptr;
++ Literals : List_Id;
++ End_Label : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Enumeration_Type_Definition, Sloc);
++ begin
++ Set_Literals (N, Literals);
++ Set_End_Label (N, End_Label);
++ return N;
++ end Make_Enumeration_Type_Definition;
++
++ function Make_Defining_Character_Literal (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Entity (N_Defining_Character_Literal, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ return N;
++ end Make_Defining_Character_Literal;
++
++ function Make_Signed_Integer_Type_Definition (Sloc : Source_Ptr;
++ Low_Bound : Node_Id;
++ High_Bound : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Signed_Integer_Type_Definition, Sloc);
++ begin
++ Set_Low_Bound (N, Low_Bound);
++ Set_High_Bound (N, High_Bound);
++ return N;
++ end Make_Signed_Integer_Type_Definition;
++
++ function Make_Modular_Type_Definition (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Modular_Type_Definition, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Modular_Type_Definition;
++
++ function Make_Floating_Point_Definition (Sloc : Source_Ptr;
++ Digits_Expression : Node_Id;
++ Real_Range_Specification : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Floating_Point_Definition, Sloc);
++ begin
++ Set_Digits_Expression (N, Digits_Expression);
++ Set_Real_Range_Specification (N, Real_Range_Specification);
++ return N;
++ end Make_Floating_Point_Definition;
++
++ function Make_Real_Range_Specification (Sloc : Source_Ptr;
++ Low_Bound : Node_Id;
++ High_Bound : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Real_Range_Specification, Sloc);
++ begin
++ Set_Low_Bound (N, Low_Bound);
++ Set_High_Bound (N, High_Bound);
++ return N;
++ end Make_Real_Range_Specification;
++
++ function Make_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr;
++ Delta_Expression : Node_Id;
++ Real_Range_Specification : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Ordinary_Fixed_Point_Definition, Sloc);
++ begin
++ Set_Delta_Expression (N, Delta_Expression);
++ Set_Real_Range_Specification (N, Real_Range_Specification);
++ return N;
++ end Make_Ordinary_Fixed_Point_Definition;
++
++ function Make_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr;
++ Delta_Expression : Node_Id;
++ Digits_Expression : Node_Id;
++ Real_Range_Specification : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Decimal_Fixed_Point_Definition, Sloc);
++ begin
++ Set_Delta_Expression (N, Delta_Expression);
++ Set_Digits_Expression (N, Digits_Expression);
++ Set_Real_Range_Specification (N, Real_Range_Specification);
++ return N;
++ end Make_Decimal_Fixed_Point_Definition;
++
++ function Make_Digits_Constraint (Sloc : Source_Ptr;
++ Digits_Expression : Node_Id;
++ Range_Constraint : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Digits_Constraint, Sloc);
++ begin
++ Set_Digits_Expression (N, Digits_Expression);
++ Set_Range_Constraint (N, Range_Constraint);
++ return N;
++ end Make_Digits_Constraint;
++
++ function Make_Unconstrained_Array_Definition (Sloc : Source_Ptr;
++ Subtype_Marks : List_Id;
++ Component_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Unconstrained_Array_Definition, Sloc);
++ begin
++ Set_Subtype_Marks (N, Subtype_Marks);
++ Set_Component_Definition (N, Component_Definition);
++ return N;
++ end Make_Unconstrained_Array_Definition;
++
++ function Make_Constrained_Array_Definition (Sloc : Source_Ptr;
++ Discrete_Subtype_Definitions : List_Id;
++ Component_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Constrained_Array_Definition, Sloc);
++ begin
++ Set_Discrete_Subtype_Definitions
++ (N, Discrete_Subtype_Definitions);
++ Set_Component_Definition (N, Component_Definition);
++ return N;
++ end Make_Constrained_Array_Definition;
++
++ function Make_Component_Definition (Sloc : Source_Ptr;
++ Aliased_Present : Boolean := False;
++ Subtype_Indication : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Component_Definition, Sloc);
++ begin
++ Set_Aliased_Present (N, Aliased_Present);
++ Set_Subtype_Indication (N, Subtype_Indication);
++ return N;
++ end Make_Component_Definition;
++
++ function Make_Discriminant_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Type : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Discriminant_Specification, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Type (N, Discriminant_Type);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Discriminant_Specification;
++
++ function Make_Index_Or_Discriminant_Constraint (Sloc : Source_Ptr;
++ Constraints : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Index_Or_Discriminant_Constraint, Sloc);
++ begin
++ Set_Constraints (N, Constraints);
++ return N;
++ end Make_Index_Or_Discriminant_Constraint;
++
++ function Make_Discriminant_Association (Sloc : Source_Ptr;
++ Selector_Names : List_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Discriminant_Association, Sloc);
++ begin
++ Set_Selector_Names (N, Selector_Names);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Discriminant_Association;
++
++ function Make_Record_Definition (Sloc : Source_Ptr;
++ End_Label : Node_Id := Empty;
++ Abstract_Present : Boolean := False;
++ Tagged_Present : Boolean := False;
++ Limited_Present : Boolean := False;
++ Component_List : Node_Id;
++ Null_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Record_Definition, Sloc);
++ begin
++ Set_End_Label (N, End_Label);
++ Set_Abstract_Present (N, Abstract_Present);
++ Set_Tagged_Present (N, Tagged_Present);
++ Set_Limited_Present (N, Limited_Present);
++ Set_Component_List (N, Component_List);
++ Set_Null_Present (N, Null_Present);
++ return N;
++ end Make_Record_Definition;
++
++ function Make_Component_List (Sloc : Source_Ptr;
++ Component_Items : List_Id;
++ Variant_Part : Node_Id := Empty;
++ Null_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Component_List, Sloc);
++ begin
++ Set_Component_Items (N, Component_Items);
++ Set_Variant_Part (N, Variant_Part);
++ Set_Null_Present (N, Null_Present);
++ return N;
++ end Make_Component_List;
++
++ function Make_Component_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Component_Definition : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Component_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Component_Definition (N, Component_Definition);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Component_Declaration;
++
++ function Make_Variant_Part (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Variants : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Variant_Part, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Variants (N, Variants);
++ return N;
++ end Make_Variant_Part;
++
++ function Make_Variant (Sloc : Source_Ptr;
++ Discrete_Choices : List_Id;
++ Component_List : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Variant, Sloc);
++ begin
++ Set_Discrete_Choices (N, Discrete_Choices);
++ Set_Component_List (N, Component_List);
++ return N;
++ end Make_Variant;
++
++ function Make_Others_Choice (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Others_Choice, Sloc);
++ begin
++ return N;
++ end Make_Others_Choice;
++
++ function Make_Access_To_Object_Definition (Sloc : Source_Ptr;
++ All_Present : Boolean := False;
++ Subtype_Indication : Node_Id;
++ Constant_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Access_To_Object_Definition, Sloc);
++ begin
++ Set_All_Present (N, All_Present);
++ Set_Subtype_Indication (N, Subtype_Indication);
++ Set_Constant_Present (N, Constant_Present);
++ return N;
++ end Make_Access_To_Object_Definition;
++
++ function Make_Access_Function_Definition (Sloc : Source_Ptr;
++ Protected_Present : Boolean := False;
++ Parameter_Specifications : List_Id := No_List;
++ Subtype_Mark : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Access_Function_Definition, Sloc);
++ begin
++ Set_Protected_Present (N, Protected_Present);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ Set_Subtype_Mark (N, Subtype_Mark);
++ return N;
++ end Make_Access_Function_Definition;
++
++ function Make_Access_Procedure_Definition (Sloc : Source_Ptr;
++ Protected_Present : Boolean := False;
++ Parameter_Specifications : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Access_Procedure_Definition, Sloc);
++ begin
++ Set_Protected_Present (N, Protected_Present);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ return N;
++ end Make_Access_Procedure_Definition;
++
++ function Make_Access_Definition (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Access_Definition, Sloc);
++ begin
++ Set_Subtype_Mark (N, Subtype_Mark);
++ return N;
++ end Make_Access_Definition;
++
++ function Make_Incomplete_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Incomplete_Type_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Unknown_Discriminants_Present
++ (N, Unknown_Discriminants_Present);
++ return N;
++ end Make_Incomplete_Type_Declaration;
++
++ function Make_Explicit_Dereference (Sloc : Source_Ptr;
++ Prefix : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Explicit_Dereference, Sloc);
++ begin
++ Set_Prefix (N, Prefix);
++ return N;
++ end Make_Explicit_Dereference;
++
++ function Make_Indexed_Component (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Expressions : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Indexed_Component, Sloc);
++ begin
++ Set_Prefix (N, Prefix);
++ Set_Expressions (N, Expressions);
++ return N;
++ end Make_Indexed_Component;
++
++ function Make_Slice (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Discrete_Range : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Slice, Sloc);
++ begin
++ Set_Prefix (N, Prefix);
++ Set_Discrete_Range (N, Discrete_Range);
++ return N;
++ end Make_Slice;
++
++ function Make_Selected_Component (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Selector_Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Selected_Component, Sloc);
++ begin
++ Set_Prefix (N, Prefix);
++ Set_Selector_Name (N, Selector_Name);
++ return N;
++ end Make_Selected_Component;
++
++ function Make_Attribute_Reference (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Attribute_Name : Name_Id;
++ Expressions : List_Id := No_List;
++ Must_Be_Byte_Aligned : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Attribute_Reference, Sloc);
++ begin
++ Set_Prefix (N, Prefix);
++ Set_Attribute_Name (N, Attribute_Name);
++ Set_Expressions (N, Expressions);
++ Set_Must_Be_Byte_Aligned (N, Must_Be_Byte_Aligned);
++ return N;
++ end Make_Attribute_Reference;
++
++ function Make_Aggregate (Sloc : Source_Ptr;
++ Expressions : List_Id := No_List;
++ Component_Associations : List_Id := No_List;
++ Null_Record_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Aggregate, Sloc);
++ begin
++ Set_Expressions (N, Expressions);
++ Set_Component_Associations (N, Component_Associations);
++ Set_Null_Record_Present (N, Null_Record_Present);
++ return N;
++ end Make_Aggregate;
++
++ function Make_Component_Association (Sloc : Source_Ptr;
++ Choices : List_Id;
++ Expression : Node_Id;
++ Box_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Component_Association, Sloc);
++ begin
++ Set_Choices (N, Choices);
++ Set_Expression (N, Expression);
++ Set_Box_Present (N, Box_Present);
++ return N;
++ end Make_Component_Association;
++
++ function Make_Extension_Aggregate (Sloc : Source_Ptr;
++ Ancestor_Part : Node_Id;
++ Expressions : List_Id := No_List;
++ Component_Associations : List_Id := No_List;
++ Null_Record_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Extension_Aggregate, Sloc);
++ begin
++ Set_Ancestor_Part (N, Ancestor_Part);
++ Set_Expressions (N, Expressions);
++ Set_Component_Associations (N, Component_Associations);
++ Set_Null_Record_Present (N, Null_Record_Present);
++ return N;
++ end Make_Extension_Aggregate;
++
++ function Make_Null (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Null, Sloc);
++ begin
++ return N;
++ end Make_Null;
++
++ function Make_And_Then (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_And_Then, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ return N;
++ end Make_And_Then;
++
++ function Make_Or_Else (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Or_Else, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ return N;
++ end Make_Or_Else;
++
++ function Make_In (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_In, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ return N;
++ end Make_In;
++
++ function Make_Not_In (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Not_In, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ return N;
++ end Make_Not_In;
++
++ function Make_Op_And (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_And, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_And);
++ Set_Entity (N, Standard_Op_And);
++ return N;
++ end Make_Op_And;
++
++ function Make_Op_Or (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Or, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Or);
++ Set_Entity (N, Standard_Op_Or);
++ return N;
++ end Make_Op_Or;
++
++ function Make_Op_Xor (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Xor, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Xor);
++ Set_Entity (N, Standard_Op_Xor);
++ return N;
++ end Make_Op_Xor;
++
++ function Make_Op_Eq (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Eq, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Eq);
++ Set_Entity (N, Standard_Op_Eq);
++ return N;
++ end Make_Op_Eq;
++
++ function Make_Op_Ne (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Ne, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Ne);
++ Set_Entity (N, Standard_Op_Ne);
++ return N;
++ end Make_Op_Ne;
++
++ function Make_Op_Lt (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Lt, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Lt);
++ Set_Entity (N, Standard_Op_Lt);
++ return N;
++ end Make_Op_Lt;
++
++ function Make_Op_Le (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Le, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Le);
++ Set_Entity (N, Standard_Op_Le);
++ return N;
++ end Make_Op_Le;
++
++ function Make_Op_Gt (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Gt, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Gt);
++ Set_Entity (N, Standard_Op_Gt);
++ return N;
++ end Make_Op_Gt;
++
++ function Make_Op_Ge (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Ge, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Ge);
++ Set_Entity (N, Standard_Op_Ge);
++ return N;
++ end Make_Op_Ge;
++
++ function Make_Op_Add (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Add, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Add);
++ Set_Entity (N, Standard_Op_Add);
++ return N;
++ end Make_Op_Add;
++
++ function Make_Op_Subtract (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Subtract, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Subtract);
++ Set_Entity (N, Standard_Op_Subtract);
++ return N;
++ end Make_Op_Subtract;
++
++ function Make_Op_Concat (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Concat, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Concat);
++ Set_Entity (N, Standard_Op_Concat);
++ return N;
++ end Make_Op_Concat;
++
++ function Make_Op_Multiply (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Multiply, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Multiply);
++ Set_Entity (N, Standard_Op_Multiply);
++ return N;
++ end Make_Op_Multiply;
++
++ function Make_Op_Divide (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Divide, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Divide);
++ Set_Entity (N, Standard_Op_Divide);
++ return N;
++ end Make_Op_Divide;
++
++ function Make_Op_Mod (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Mod, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Mod);
++ Set_Entity (N, Standard_Op_Mod);
++ return N;
++ end Make_Op_Mod;
++
++ function Make_Op_Rem (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Rem, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Rem);
++ Set_Entity (N, Standard_Op_Rem);
++ return N;
++ end Make_Op_Rem;
++
++ function Make_Op_Expon (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Expon, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Expon);
++ Set_Entity (N, Standard_Op_Expon);
++ return N;
++ end Make_Op_Expon;
++
++ function Make_Op_Plus (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Plus, Sloc);
++ begin
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Add);
++ Set_Entity (N, Standard_Op_Plus);
++ return N;
++ end Make_Op_Plus;
++
++ function Make_Op_Minus (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Minus, Sloc);
++ begin
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Subtract);
++ Set_Entity (N, Standard_Op_Minus);
++ return N;
++ end Make_Op_Minus;
++
++ function Make_Op_Abs (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Abs, Sloc);
++ begin
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Abs);
++ Set_Entity (N, Standard_Op_Abs);
++ return N;
++ end Make_Op_Abs;
++
++ function Make_Op_Not (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Not, Sloc);
++ begin
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Op_Not);
++ Set_Entity (N, Standard_Op_Not);
++ return N;
++ end Make_Op_Not;
++
++ function Make_Type_Conversion (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Type_Conversion, Sloc);
++ begin
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Type_Conversion;
++
++ function Make_Qualified_Expression (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Qualified_Expression, Sloc);
++ begin
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Qualified_Expression;
++
++ function Make_Allocator (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Allocator, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Allocator;
++
++ function Make_Null_Statement (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Null_Statement, Sloc);
++ begin
++ return N;
++ end Make_Null_Statement;
++
++ function Make_Label (Sloc : Source_Ptr;
++ Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Label, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ return N;
++ end Make_Label;
++
++ function Make_Assignment_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Assignment_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Assignment_Statement;
++
++ function Make_If_Statement (Sloc : Source_Ptr;
++ Condition : Node_Id;
++ Then_Statements : List_Id;
++ Elsif_Parts : List_Id := No_List;
++ Else_Statements : List_Id := No_List;
++ End_Span : Uint := No_Uint)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_If_Statement, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Then_Statements (N, Then_Statements);
++ Set_Elsif_Parts (N, Elsif_Parts);
++ Set_Else_Statements (N, Else_Statements);
++ Set_End_Span (N, End_Span);
++ return N;
++ end Make_If_Statement;
++
++ function Make_Elsif_Part (Sloc : Source_Ptr;
++ Condition : Node_Id;
++ Then_Statements : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Elsif_Part, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Then_Statements (N, Then_Statements);
++ return N;
++ end Make_Elsif_Part;
++
++ function Make_Case_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id;
++ Alternatives : List_Id;
++ End_Span : Uint := No_Uint)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Case_Statement, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ Set_Alternatives (N, Alternatives);
++ Set_End_Span (N, End_Span);
++ return N;
++ end Make_Case_Statement;
++
++ function Make_Case_Statement_Alternative (Sloc : Source_Ptr;
++ Discrete_Choices : List_Id;
++ Statements : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Case_Statement_Alternative, Sloc);
++ begin
++ Set_Discrete_Choices (N, Discrete_Choices);
++ Set_Statements (N, Statements);
++ return N;
++ end Make_Case_Statement_Alternative;
++
++ function Make_Loop_Statement (Sloc : Source_Ptr;
++ Identifier : Node_Id := Empty;
++ Iteration_Scheme : Node_Id := Empty;
++ Statements : List_Id;
++ End_Label : Node_Id;
++ Has_Created_Identifier : Boolean := False;
++ Is_Null_Loop : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Loop_Statement, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ Set_Iteration_Scheme (N, Iteration_Scheme);
++ Set_Statements (N, Statements);
++ Set_End_Label (N, End_Label);
++ Set_Has_Created_Identifier (N, Has_Created_Identifier);
++ Set_Is_Null_Loop (N, Is_Null_Loop);
++ return N;
++ end Make_Loop_Statement;
++
++ function Make_Iteration_Scheme (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Loop_Parameter_Specification : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Iteration_Scheme, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Loop_Parameter_Specification
++ (N, Loop_Parameter_Specification);
++ return N;
++ end Make_Iteration_Scheme;
++
++ function Make_Loop_Parameter_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Reverse_Present : Boolean := False;
++ Discrete_Subtype_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Loop_Parameter_Specification, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Reverse_Present (N, Reverse_Present);
++ Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
++ return N;
++ end Make_Loop_Parameter_Specification;
++
++ function Make_Block_Statement (Sloc : Source_Ptr;
++ Identifier : Node_Id := Empty;
++ Declarations : List_Id := No_List;
++ Handled_Statement_Sequence : Node_Id;
++ Has_Created_Identifier : Boolean := False;
++ Is_Task_Allocation_Block : Boolean := False;
++ Is_Asynchronous_Call_Block : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Block_Statement, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ Set_Declarations (N, Declarations);
++ Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
++ Set_Has_Created_Identifier (N, Has_Created_Identifier);
++ Set_Is_Task_Allocation_Block (N, Is_Task_Allocation_Block);
++ Set_Is_Asynchronous_Call_Block (N, Is_Asynchronous_Call_Block);
++ return N;
++ end Make_Block_Statement;
++
++ function Make_Exit_Statement (Sloc : Source_Ptr;
++ Name : Node_Id := Empty;
++ Condition : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Exit_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Condition (N, Condition);
++ return N;
++ end Make_Exit_Statement;
++
++ function Make_Goto_Statement (Sloc : Source_Ptr;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Goto_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ return N;
++ end Make_Goto_Statement;
++
++ function Make_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subprogram_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ return N;
++ end Make_Subprogram_Declaration;
++
++ function Make_Abstract_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Abstract_Subprogram_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ return N;
++ end Make_Abstract_Subprogram_Declaration;
++
++ function Make_Function_Specification (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Parameter_Specifications : List_Id := No_List;
++ Subtype_Mark : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Function_Specification, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ Set_Subtype_Mark (N, Subtype_Mark);
++ return N;
++ end Make_Function_Specification;
++
++ function Make_Procedure_Specification (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Parameter_Specifications : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Procedure_Specification, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ return N;
++ end Make_Procedure_Specification;
++
++ function Make_Designator (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Designator, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Identifier (N, Identifier);
++ return N;
++ end Make_Designator;
++
++ function Make_Defining_Program_Unit_Name (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Defining_Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Defining_Program_Unit_Name, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Defining_Identifier (N, Defining_Identifier);
++ return N;
++ end Make_Defining_Program_Unit_Name;
++
++ function Make_Operator_Symbol (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Strval : String_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Operator_Symbol, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ Set_Strval (N, Strval);
++ return N;
++ end Make_Operator_Symbol;
++
++ function Make_Defining_Operator_Symbol (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Entity (N_Defining_Operator_Symbol, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ return N;
++ end Make_Defining_Operator_Symbol;
++
++ function Make_Parameter_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ In_Present : Boolean := False;
++ Out_Present : Boolean := False;
++ Parameter_Type : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Parameter_Specification, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_In_Present (N, In_Present);
++ Set_Out_Present (N, Out_Present);
++ Set_Parameter_Type (N, Parameter_Type);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Parameter_Specification;
++
++ function Make_Subprogram_Body (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id;
++ Bad_Is_Detected : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subprogram_Body, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ Set_Declarations (N, Declarations);
++ Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
++ Set_Bad_Is_Detected (N, Bad_Is_Detected);
++ return N;
++ end Make_Subprogram_Body;
++
++ function Make_Procedure_Call_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Parameter_Associations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Procedure_Call_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Parameter_Associations (N, Parameter_Associations);
++ return N;
++ end Make_Procedure_Call_Statement;
++
++ function Make_Function_Call (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Parameter_Associations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Function_Call, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Parameter_Associations (N, Parameter_Associations);
++ return N;
++ end Make_Function_Call;
++
++ function Make_Parameter_Association (Sloc : Source_Ptr;
++ Selector_Name : Node_Id;
++ Explicit_Actual_Parameter : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Parameter_Association, Sloc);
++ begin
++ Set_Selector_Name (N, Selector_Name);
++ Set_Explicit_Actual_Parameter (N, Explicit_Actual_Parameter);
++ return N;
++ end Make_Parameter_Association;
++
++ function Make_Return_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Return_Statement, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Return_Statement;
++
++ function Make_Package_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Package_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ return N;
++ end Make_Package_Declaration;
++
++ function Make_Package_Specification (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Visible_Declarations : List_Id;
++ Private_Declarations : List_Id := No_List;
++ End_Label : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Package_Specification, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Visible_Declarations (N, Visible_Declarations);
++ Set_Private_Declarations (N, Private_Declarations);
++ Set_End_Label (N, End_Label);
++ return N;
++ end Make_Package_Specification;
++
++ function Make_Package_Body (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Package_Body, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Declarations (N, Declarations);
++ Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
++ return N;
++ end Make_Package_Body;
++
++ function Make_Private_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False;
++ Abstract_Present : Boolean := False;
++ Tagged_Present : Boolean := False;
++ Limited_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Private_Type_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Unknown_Discriminants_Present
++ (N, Unknown_Discriminants_Present);
++ Set_Abstract_Present (N, Abstract_Present);
++ Set_Tagged_Present (N, Tagged_Present);
++ Set_Limited_Present (N, Limited_Present);
++ return N;
++ end Make_Private_Type_Declaration;
++
++ function Make_Private_Extension_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False;
++ Abstract_Present : Boolean := False;
++ Subtype_Indication : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Private_Extension_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Unknown_Discriminants_Present
++ (N, Unknown_Discriminants_Present);
++ Set_Abstract_Present (N, Abstract_Present);
++ Set_Subtype_Indication (N, Subtype_Indication);
++ return N;
++ end Make_Private_Extension_Declaration;
++
++ function Make_Use_Package_Clause (Sloc : Source_Ptr;
++ Names : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Use_Package_Clause, Sloc);
++ begin
++ Set_Names (N, Names);
++ return N;
++ end Make_Use_Package_Clause;
++
++ function Make_Use_Type_Clause (Sloc : Source_Ptr;
++ Subtype_Marks : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Use_Type_Clause, Sloc);
++ begin
++ Set_Subtype_Marks (N, Subtype_Marks);
++ return N;
++ end Make_Use_Type_Clause;
++
++ function Make_Object_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Subtype_Mark : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Object_Renaming_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Name (N, Name);
++ return N;
++ end Make_Object_Renaming_Declaration;
++
++ function Make_Exception_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Exception_Renaming_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Name (N, Name);
++ return N;
++ end Make_Exception_Renaming_Declaration;
++
++ function Make_Package_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Package_Renaming_Declaration, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ return N;
++ end Make_Package_Renaming_Declaration;
++
++ function Make_Subprogram_Renaming_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subprogram_Renaming_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ Set_Name (N, Name);
++ return N;
++ end Make_Subprogram_Renaming_Declaration;
++
++ function Make_Generic_Package_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Generic_Package_Renaming_Declaration, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ return N;
++ end Make_Generic_Package_Renaming_Declaration;
++
++ function Make_Generic_Procedure_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Generic_Procedure_Renaming_Declaration, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ return N;
++ end Make_Generic_Procedure_Renaming_Declaration;
++
++ function Make_Generic_Function_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Generic_Function_Renaming_Declaration, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ return N;
++ end Make_Generic_Function_Renaming_Declaration;
++
++ function Make_Task_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Task_Definition : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Task_Type_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Task_Definition (N, Task_Definition);
++ return N;
++ end Make_Task_Type_Declaration;
++
++ function Make_Single_Task_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Task_Definition : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Single_Task_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Task_Definition (N, Task_Definition);
++ return N;
++ end Make_Single_Task_Declaration;
++
++ function Make_Task_Definition (Sloc : Source_Ptr;
++ Visible_Declarations : List_Id;
++ Private_Declarations : List_Id := No_List;
++ End_Label : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Task_Definition, Sloc);
++ begin
++ Set_Visible_Declarations (N, Visible_Declarations);
++ Set_Private_Declarations (N, Private_Declarations);
++ Set_End_Label (N, End_Label);
++ return N;
++ end Make_Task_Definition;
++
++ function Make_Task_Body (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Task_Body, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Declarations (N, Declarations);
++ Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
++ return N;
++ end Make_Task_Body;
++
++ function Make_Protected_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Protected_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Protected_Type_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Protected_Definition (N, Protected_Definition);
++ return N;
++ end Make_Protected_Type_Declaration;
++
++ function Make_Single_Protected_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Protected_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Single_Protected_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Protected_Definition (N, Protected_Definition);
++ return N;
++ end Make_Single_Protected_Declaration;
++
++ function Make_Protected_Definition (Sloc : Source_Ptr;
++ Visible_Declarations : List_Id;
++ Private_Declarations : List_Id := No_List;
++ End_Label : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Protected_Definition, Sloc);
++ begin
++ Set_Visible_Declarations (N, Visible_Declarations);
++ Set_Private_Declarations (N, Private_Declarations);
++ Set_End_Label (N, End_Label);
++ return N;
++ end Make_Protected_Definition;
++
++ function Make_Protected_Body (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Declarations : List_Id;
++ End_Label : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Protected_Body, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Declarations (N, Declarations);
++ Set_End_Label (N, End_Label);
++ return N;
++ end Make_Protected_Body;
++
++ function Make_Entry_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discrete_Subtype_Definition : Node_Id := Empty;
++ Parameter_Specifications : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Entry_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ return N;
++ end Make_Entry_Declaration;
++
++ function Make_Accept_Statement (Sloc : Source_Ptr;
++ Entry_Direct_Name : Node_Id;
++ Entry_Index : Node_Id := Empty;
++ Parameter_Specifications : List_Id := No_List;
++ Handled_Statement_Sequence : Node_Id;
++ Declarations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Accept_Statement, Sloc);
++ begin
++ Set_Entry_Direct_Name (N, Entry_Direct_Name);
++ Set_Entry_Index (N, Entry_Index);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
++ Set_Declarations (N, Declarations);
++ return N;
++ end Make_Accept_Statement;
++
++ function Make_Entry_Body (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Entry_Body_Formal_Part : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Entry_Body, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Entry_Body_Formal_Part (N, Entry_Body_Formal_Part);
++ Set_Declarations (N, Declarations);
++ Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
++ return N;
++ end Make_Entry_Body;
++
++ function Make_Entry_Body_Formal_Part (Sloc : Source_Ptr;
++ Entry_Index_Specification : Node_Id := Empty;
++ Parameter_Specifications : List_Id := No_List;
++ Condition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Entry_Body_Formal_Part, Sloc);
++ begin
++ Set_Entry_Index_Specification (N, Entry_Index_Specification);
++ Set_Parameter_Specifications (N, Parameter_Specifications);
++ Set_Condition (N, Condition);
++ return N;
++ end Make_Entry_Body_Formal_Part;
++
++ function Make_Entry_Index_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discrete_Subtype_Definition : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Entry_Index_Specification, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
++ return N;
++ end Make_Entry_Index_Specification;
++
++ function Make_Entry_Call_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Parameter_Associations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Entry_Call_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Parameter_Associations (N, Parameter_Associations);
++ return N;
++ end Make_Entry_Call_Statement;
++
++ function Make_Requeue_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Abort_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Requeue_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Abort_Present (N, Abort_Present);
++ return N;
++ end Make_Requeue_Statement;
++
++ function Make_Delay_Until_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Delay_Until_Statement, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Delay_Until_Statement;
++
++ function Make_Delay_Relative_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Delay_Relative_Statement, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Delay_Relative_Statement;
++
++ function Make_Selective_Accept (Sloc : Source_Ptr;
++ Select_Alternatives : List_Id;
++ Else_Statements : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Selective_Accept, Sloc);
++ begin
++ Set_Select_Alternatives (N, Select_Alternatives);
++ Set_Else_Statements (N, Else_Statements);
++ return N;
++ end Make_Selective_Accept;
++
++ function Make_Accept_Alternative (Sloc : Source_Ptr;
++ Accept_Statement : Node_Id;
++ Condition : Node_Id := Empty;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Accept_Alternative, Sloc);
++ begin
++ Set_Accept_Statement (N, Accept_Statement);
++ Set_Condition (N, Condition);
++ Set_Statements (N, Statements);
++ Set_Pragmas_Before (N, Pragmas_Before);
++ return N;
++ end Make_Accept_Alternative;
++
++ function Make_Delay_Alternative (Sloc : Source_Ptr;
++ Delay_Statement : Node_Id;
++ Condition : Node_Id := Empty;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Delay_Alternative, Sloc);
++ begin
++ Set_Delay_Statement (N, Delay_Statement);
++ Set_Condition (N, Condition);
++ Set_Statements (N, Statements);
++ Set_Pragmas_Before (N, Pragmas_Before);
++ return N;
++ end Make_Delay_Alternative;
++
++ function Make_Terminate_Alternative (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Pragmas_Before : List_Id := No_List;
++ Pragmas_After : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Terminate_Alternative, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Pragmas_Before (N, Pragmas_Before);
++ Set_Pragmas_After (N, Pragmas_After);
++ return N;
++ end Make_Terminate_Alternative;
++
++ function Make_Timed_Entry_Call (Sloc : Source_Ptr;
++ Entry_Call_Alternative : Node_Id;
++ Delay_Alternative : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Timed_Entry_Call, Sloc);
++ begin
++ Set_Entry_Call_Alternative (N, Entry_Call_Alternative);
++ Set_Delay_Alternative (N, Delay_Alternative);
++ return N;
++ end Make_Timed_Entry_Call;
++
++ function Make_Entry_Call_Alternative (Sloc : Source_Ptr;
++ Entry_Call_Statement : Node_Id;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Entry_Call_Alternative, Sloc);
++ begin
++ Set_Entry_Call_Statement (N, Entry_Call_Statement);
++ Set_Statements (N, Statements);
++ Set_Pragmas_Before (N, Pragmas_Before);
++ return N;
++ end Make_Entry_Call_Alternative;
++
++ function Make_Conditional_Entry_Call (Sloc : Source_Ptr;
++ Entry_Call_Alternative : Node_Id;
++ Else_Statements : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Conditional_Entry_Call, Sloc);
++ begin
++ Set_Entry_Call_Alternative (N, Entry_Call_Alternative);
++ Set_Else_Statements (N, Else_Statements);
++ return N;
++ end Make_Conditional_Entry_Call;
++
++ function Make_Asynchronous_Select (Sloc : Source_Ptr;
++ Triggering_Alternative : Node_Id;
++ Abortable_Part : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Asynchronous_Select, Sloc);
++ begin
++ Set_Triggering_Alternative (N, Triggering_Alternative);
++ Set_Abortable_Part (N, Abortable_Part);
++ return N;
++ end Make_Asynchronous_Select;
++
++ function Make_Triggering_Alternative (Sloc : Source_Ptr;
++ Triggering_Statement : Node_Id;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Triggering_Alternative, Sloc);
++ begin
++ Set_Triggering_Statement (N, Triggering_Statement);
++ Set_Statements (N, Statements);
++ Set_Pragmas_Before (N, Pragmas_Before);
++ return N;
++ end Make_Triggering_Alternative;
++
++ function Make_Abortable_Part (Sloc : Source_Ptr;
++ Statements : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Abortable_Part, Sloc);
++ begin
++ Set_Statements (N, Statements);
++ return N;
++ end Make_Abortable_Part;
++
++ function Make_Abort_Statement (Sloc : Source_Ptr;
++ Names : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Abort_Statement, Sloc);
++ begin
++ Set_Names (N, Names);
++ return N;
++ end Make_Abort_Statement;
++
++ function Make_Compilation_Unit (Sloc : Source_Ptr;
++ Context_Items : List_Id;
++ Private_Present : Boolean := False;
++ Unit : Node_Id;
++ Aux_Decls_Node : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Compilation_Unit, Sloc);
++ begin
++ Set_Context_Items (N, Context_Items);
++ Set_Private_Present (N, Private_Present);
++ Set_Unit (N, Unit);
++ Set_Aux_Decls_Node (N, Aux_Decls_Node);
++ return N;
++ end Make_Compilation_Unit;
++
++ function Make_Compilation_Unit_Aux (Sloc : Source_Ptr;
++ Declarations : List_Id := No_List;
++ Actions : List_Id := No_List;
++ Pragmas_After : List_Id := No_List;
++ Config_Pragmas : List_Id := Empty_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Compilation_Unit_Aux, Sloc);
++ begin
++ Set_Declarations (N, Declarations);
++ Set_Actions (N, Actions);
++ Set_Pragmas_After (N, Pragmas_After);
++ Set_Config_Pragmas (N, Config_Pragmas);
++ return N;
++ end Make_Compilation_Unit_Aux;
++
++ function Make_With_Clause (Sloc : Source_Ptr;
++ Name : Node_Id;
++ First_Name : Boolean := True;
++ Last_Name : Boolean := True;
++ Limited_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_With_Clause, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_First_Name (N, First_Name);
++ Set_Last_Name (N, Last_Name);
++ Set_Limited_Present (N, Limited_Present);
++ return N;
++ end Make_With_Clause;
++
++ function Make_With_Type_Clause (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Tagged_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_With_Type_Clause, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Tagged_Present (N, Tagged_Present);
++ return N;
++ end Make_With_Type_Clause;
++
++ function Make_Subprogram_Body_Stub (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subprogram_Body_Stub, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ return N;
++ end Make_Subprogram_Body_Stub;
++
++ function Make_Package_Body_Stub (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Package_Body_Stub, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ return N;
++ end Make_Package_Body_Stub;
++
++ function Make_Task_Body_Stub (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Task_Body_Stub, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ return N;
++ end Make_Task_Body_Stub;
++
++ function Make_Protected_Body_Stub (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Protected_Body_Stub, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ return N;
++ end Make_Protected_Body_Stub;
++
++ function Make_Subunit (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Proper_Body : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subunit, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Proper_Body (N, Proper_Body);
++ return N;
++ end Make_Subunit;
++
++ function Make_Exception_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Exception_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ return N;
++ end Make_Exception_Declaration;
++
++ function Make_Handled_Sequence_Of_Statements (Sloc : Source_Ptr;
++ Statements : List_Id;
++ End_Label : Node_Id := Empty;
++ Exception_Handlers : List_Id := No_List;
++ At_End_Proc : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Handled_Sequence_Of_Statements, Sloc);
++ begin
++ Set_Statements (N, Statements);
++ Set_End_Label (N, End_Label);
++ Set_Exception_Handlers (N, Exception_Handlers);
++ Set_At_End_Proc (N, At_End_Proc);
++ return N;
++ end Make_Handled_Sequence_Of_Statements;
++
++ function Make_Exception_Handler (Sloc : Source_Ptr;
++ Choice_Parameter : Node_Id := Empty;
++ Exception_Choices : List_Id;
++ Statements : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Exception_Handler, Sloc);
++ begin
++ Set_Choice_Parameter (N, Choice_Parameter);
++ Set_Exception_Choices (N, Exception_Choices);
++ Set_Statements (N, Statements);
++ return N;
++ end Make_Exception_Handler;
++
++ function Make_Raise_Statement (Sloc : Source_Ptr;
++ Name : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Raise_Statement, Sloc);
++ begin
++ Set_Name (N, Name);
++ return N;
++ end Make_Raise_Statement;
++
++ function Make_Generic_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Generic_Formal_Declarations : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Generic_Subprogram_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
++ return N;
++ end Make_Generic_Subprogram_Declaration;
++
++ function Make_Generic_Package_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Generic_Formal_Declarations : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Generic_Package_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
++ return N;
++ end Make_Generic_Package_Declaration;
++
++ function Make_Package_Instantiation (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Package_Instantiation, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ Set_Generic_Associations (N, Generic_Associations);
++ return N;
++ end Make_Package_Instantiation;
++
++ function Make_Procedure_Instantiation (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Procedure_Instantiation, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ Set_Generic_Associations (N, Generic_Associations);
++ return N;
++ end Make_Procedure_Instantiation;
++
++ function Make_Function_Instantiation (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Function_Instantiation, Sloc);
++ begin
++ Set_Defining_Unit_Name (N, Defining_Unit_Name);
++ Set_Name (N, Name);
++ Set_Generic_Associations (N, Generic_Associations);
++ return N;
++ end Make_Function_Instantiation;
++
++ function Make_Generic_Association (Sloc : Source_Ptr;
++ Selector_Name : Node_Id := Empty;
++ Explicit_Generic_Actual_Parameter : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Generic_Association, Sloc);
++ begin
++ Set_Selector_Name (N, Selector_Name);
++ Set_Explicit_Generic_Actual_Parameter
++ (N, Explicit_Generic_Actual_Parameter);
++ return N;
++ end Make_Generic_Association;
++
++ function Make_Formal_Object_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ In_Present : Boolean := False;
++ Out_Present : Boolean := False;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Object_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_In_Present (N, In_Present);
++ Set_Out_Present (N, Out_Present);
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Formal_Object_Declaration;
++
++ function Make_Formal_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Formal_Type_Definition : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Type_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Formal_Type_Definition (N, Formal_Type_Definition);
++ Set_Discriminant_Specifications (N, Discriminant_Specifications);
++ Set_Unknown_Discriminants_Present
++ (N, Unknown_Discriminants_Present);
++ return N;
++ end Make_Formal_Type_Declaration;
++
++ function Make_Formal_Private_Type_Definition (Sloc : Source_Ptr;
++ Abstract_Present : Boolean := False;
++ Tagged_Present : Boolean := False;
++ Limited_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Private_Type_Definition, Sloc);
++ begin
++ Set_Abstract_Present (N, Abstract_Present);
++ Set_Tagged_Present (N, Tagged_Present);
++ Set_Limited_Present (N, Limited_Present);
++ return N;
++ end Make_Formal_Private_Type_Definition;
++
++ function Make_Formal_Derived_Type_Definition (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Private_Present : Boolean := False;
++ Abstract_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Derived_Type_Definition, Sloc);
++ begin
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Private_Present (N, Private_Present);
++ Set_Abstract_Present (N, Abstract_Present);
++ return N;
++ end Make_Formal_Derived_Type_Definition;
++
++ function Make_Formal_Discrete_Type_Definition (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Discrete_Type_Definition, Sloc);
++ begin
++ return N;
++ end Make_Formal_Discrete_Type_Definition;
++
++ function Make_Formal_Signed_Integer_Type_Definition (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Signed_Integer_Type_Definition, Sloc);
++ begin
++ return N;
++ end Make_Formal_Signed_Integer_Type_Definition;
++
++ function Make_Formal_Modular_Type_Definition (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Modular_Type_Definition, Sloc);
++ begin
++ return N;
++ end Make_Formal_Modular_Type_Definition;
++
++ function Make_Formal_Floating_Point_Definition (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Floating_Point_Definition, Sloc);
++ begin
++ return N;
++ end Make_Formal_Floating_Point_Definition;
++
++ function Make_Formal_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Ordinary_Fixed_Point_Definition, Sloc);
++ begin
++ return N;
++ end Make_Formal_Ordinary_Fixed_Point_Definition;
++
++ function Make_Formal_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Decimal_Fixed_Point_Definition, Sloc);
++ begin
++ return N;
++ end Make_Formal_Decimal_Fixed_Point_Definition;
++
++ function Make_Formal_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Default_Name : Node_Id := Empty;
++ Box_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Subprogram_Declaration, Sloc);
++ begin
++ Set_Specification (N, Specification);
++ Set_Default_Name (N, Default_Name);
++ Set_Box_Present (N, Box_Present);
++ return N;
++ end Make_Formal_Subprogram_Declaration;
++
++ function Make_Formal_Package_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List;
++ Box_Present : Boolean := False)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Formal_Package_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ Set_Name (N, Name);
++ Set_Generic_Associations (N, Generic_Associations);
++ Set_Box_Present (N, Box_Present);
++ return N;
++ end Make_Formal_Package_Declaration;
++
++ function Make_Attribute_Definition_Clause (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Chars : Name_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Attribute_Definition_Clause, Sloc);
++ begin
++ Set_Name (N, Name);
++ Set_Chars (N, Chars);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Attribute_Definition_Clause;
++
++ function Make_Enumeration_Representation_Clause (Sloc : Source_Ptr;
++ Identifier : Node_Id;
++ Array_Aggregate : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Enumeration_Representation_Clause, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ Set_Array_Aggregate (N, Array_Aggregate);
++ return N;
++ end Make_Enumeration_Representation_Clause;
++
++ function Make_Record_Representation_Clause (Sloc : Source_Ptr;
++ Identifier : Node_Id;
++ Mod_Clause : Node_Id := Empty;
++ Component_Clauses : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Record_Representation_Clause, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ Set_Mod_Clause (N, Mod_Clause);
++ Set_Component_Clauses (N, Component_Clauses);
++ return N;
++ end Make_Record_Representation_Clause;
++
++ function Make_Component_Clause (Sloc : Source_Ptr;
++ Component_Name : Node_Id;
++ Position : Node_Id;
++ First_Bit : Node_Id;
++ Last_Bit : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Component_Clause, Sloc);
++ begin
++ Set_Component_Name (N, Component_Name);
++ Set_Position (N, Position);
++ Set_First_Bit (N, First_Bit);
++ Set_Last_Bit (N, Last_Bit);
++ return N;
++ end Make_Component_Clause;
++
++ function Make_Code_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Code_Statement, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Code_Statement;
++
++ function Make_Op_Rotate_Left (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Rotate_Left, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Rotate_Left);
++ Set_Entity (N, Standard_Op_Rotate_Left);
++ return N;
++ end Make_Op_Rotate_Left;
++
++ function Make_Op_Rotate_Right (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Rotate_Right, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Rotate_Right);
++ Set_Entity (N, Standard_Op_Rotate_Right);
++ return N;
++ end Make_Op_Rotate_Right;
++
++ function Make_Op_Shift_Left (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Shift_Left, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Shift_Left);
++ Set_Entity (N, Standard_Op_Shift_Left);
++ return N;
++ end Make_Op_Shift_Left;
++
++ function Make_Op_Shift_Right_Arithmetic (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Shift_Right_Arithmetic, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Shift_Right_Arithmetic);
++ Set_Entity (N, Standard_Op_Shift_Right_Arithmetic);
++ return N;
++ end Make_Op_Shift_Right_Arithmetic;
++
++ function Make_Op_Shift_Right (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Op_Shift_Right, Sloc);
++ begin
++ Set_Left_Opnd (N, Left_Opnd);
++ Set_Right_Opnd (N, Right_Opnd);
++ Set_Chars (N, Name_Shift_Right);
++ Set_Entity (N, Standard_Op_Shift_Right);
++ return N;
++ end Make_Op_Shift_Right;
++
++ function Make_Delta_Constraint (Sloc : Source_Ptr;
++ Delta_Expression : Node_Id;
++ Range_Constraint : Node_Id := Empty)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Delta_Constraint, Sloc);
++ begin
++ Set_Delta_Expression (N, Delta_Expression);
++ Set_Range_Constraint (N, Range_Constraint);
++ return N;
++ end Make_Delta_Constraint;
++
++ function Make_At_Clause (Sloc : Source_Ptr;
++ Identifier : Node_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_At_Clause, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_At_Clause;
++
++ function Make_Mod_Clause (Sloc : Source_Ptr;
++ Expression : Node_Id;
++ Pragmas_Before : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Mod_Clause, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ Set_Pragmas_Before (N, Pragmas_Before);
++ return N;
++ end Make_Mod_Clause;
++
++ function Make_Conditional_Expression (Sloc : Source_Ptr;
++ Expressions : List_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Conditional_Expression, Sloc);
++ begin
++ Set_Expressions (N, Expressions);
++ return N;
++ end Make_Conditional_Expression;
++
++ function Make_Expanded_Name (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Prefix : Node_Id;
++ Selector_Name : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Expanded_Name, Sloc);
++ begin
++ Set_Chars (N, Chars);
++ Set_Prefix (N, Prefix);
++ Set_Selector_Name (N, Selector_Name);
++ return N;
++ end Make_Expanded_Name;
++
++ function Make_Free_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Free_Statement, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Free_Statement;
++
++ function Make_Freeze_Entity (Sloc : Source_Ptr;
++ Actions : List_Id := No_List)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Freeze_Entity, Sloc);
++ begin
++ Set_Actions (N, Actions);
++ return N;
++ end Make_Freeze_Entity;
++
++ function Make_Implicit_Label_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Implicit_Label_Declaration, Sloc);
++ begin
++ Set_Defining_Identifier (N, Defining_Identifier);
++ return N;
++ end Make_Implicit_Label_Declaration;
++
++ function Make_Itype_Reference (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Itype_Reference, Sloc);
++ begin
++ return N;
++ end Make_Itype_Reference;
++
++ function Make_Raise_Constraint_Error (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Reason : Uint)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Raise_Constraint_Error, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Reason (N, Reason);
++ return N;
++ end Make_Raise_Constraint_Error;
++
++ function Make_Raise_Program_Error (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Reason : Uint)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Raise_Program_Error, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Reason (N, Reason);
++ return N;
++ end Make_Raise_Program_Error;
++
++ function Make_Raise_Storage_Error (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Reason : Uint)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Raise_Storage_Error, Sloc);
++ begin
++ Set_Condition (N, Condition);
++ Set_Reason (N, Reason);
++ return N;
++ end Make_Raise_Storage_Error;
++
++ function Make_Reference (Sloc : Source_Ptr;
++ Prefix : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Reference, Sloc);
++ begin
++ Set_Prefix (N, Prefix);
++ return N;
++ end Make_Reference;
++
++ function Make_Subprogram_Info (Sloc : Source_Ptr;
++ Identifier : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Subprogram_Info, Sloc);
++ begin
++ Set_Identifier (N, Identifier);
++ return N;
++ end Make_Subprogram_Info;
++
++ function Make_Unchecked_Expression (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Unchecked_Expression, Sloc);
++ begin
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Unchecked_Expression;
++
++ function Make_Unchecked_Type_Conversion (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Unchecked_Type_Conversion, Sloc);
++ begin
++ Set_Subtype_Mark (N, Subtype_Mark);
++ Set_Expression (N, Expression);
++ return N;
++ end Make_Unchecked_Type_Conversion;
++
++ function Make_Validate_Unchecked_Conversion (Sloc : Source_Ptr)
++ return Node_Id
++ is
++ N : constant Node_Id :=
++ New_Node (N_Validate_Unchecked_Conversion, Sloc);
++ begin
++ return N;
++ end Make_Validate_Unchecked_Conversion;
++
++end Nmake;
+--- gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/nmake.ads.orig 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/nmake.ads 2004-06-02 00:52:35.000000000 +0200
+@@ -0,0 +1,1351 @@
++------------------------------------------------------------------------------
++-- --
++-- GNAT COMPILER COMPONENTS --
++-- --
++-- N M A K E --
++-- --
++-- S p e c --
++-- --
++-- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
++-- --
++-- GNAT is free software; you can redistribute it and/or modify it under --
++-- terms of the GNU General Public License as published by the Free Soft- --
++-- ware Foundation; either version 2, or (at your option) any later ver- --
++-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
++-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
++-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
++-- for more details. You should have received a copy of the GNU General --
++-- Public License distributed with GNAT; see file COPYING. If not, write --
++-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
++-- MA 02111-1307, USA. --
++-- --
++-- GNAT was originally developed by the GNAT team at New York University. --
++-- Extensive contributions were provided by Ada Core Technologies Inc. --
++-- --
++------------------------------------------------------------------------------
++
++pragma Style_Checks (All_Checks);
++-- Turn off subprogram order checking, since the routines here are
++-- generated automatically in order.
++
++
++with Nlists; use Nlists;
++with Types; use Types;
++with Uintp; use Uintp;
++with Urealp; use Urealp;
++
++package Nmake is
++
++-- This package contains a set of routines used to construct tree nodes
++-- using a functional style. There is one routine for each node type defined
++-- in Sinfo with the general interface:
++
++-- function Make_xxx (Sloc : Source_Ptr,
++-- Field_Name_1 : Field_Name_1_Type [:= default]
++-- Field_Name_2 : Field_Name_2_Type [:= default]
++-- ...)
++-- return Node_Id
++
++-- Only syntactic fields are included (i.e. fields marked as "-Sem" or "-Lib"
++-- in the Sinfo spec are excluded). In addition, the following four syntactic
++-- fields are excluded:
++
++-- Prev_Ids
++-- More_Ids
++-- Comes_From_Source
++-- Paren_Count
++
++-- since they are very rarely set in expanded code. If they need to be set,
++-- to other than the default values (False, False, False, zero), then the
++-- appropriate Set_xxx procedures must be used on the returned value.
++
++-- Default values are provided only for flag fields (where the default is
++-- False), and for optional fields. An optional field is one where the
++-- comment line describing the field contains the string "(set to xxx if".
++-- For such fields, a default value of xxx is provided."
++
++-- Warning: since calls to Make_xxx routines are normal function calls, the
++-- arguments can be evaluated in any order. This means that at most one such
++-- argument can have side effects (e.g. be a call to a parse routine).
++
++ function Make_Unused_At_Start (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Unused_At_Start);
++
++ function Make_Unused_At_End (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Unused_At_End);
++
++ function Make_Identifier (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id;
++ pragma Inline (Make_Identifier);
++
++ function Make_Integer_Literal (Sloc : Source_Ptr;
++ Intval : Uint)
++ return Node_Id;
++ pragma Inline (Make_Integer_Literal);
++
++ function Make_Real_Literal (Sloc : Source_Ptr;
++ Realval : Ureal)
++ return Node_Id;
++ pragma Inline (Make_Real_Literal);
++
++ function Make_Character_Literal (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Char_Literal_Value : Char_Code)
++ return Node_Id;
++ pragma Inline (Make_Character_Literal);
++
++ function Make_String_Literal (Sloc : Source_Ptr;
++ Strval : String_Id)
++ return Node_Id;
++ pragma Inline (Make_String_Literal);
++
++ function Make_Pragma (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Pragma_Argument_Associations : List_Id := No_List;
++ Debug_Statement : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Pragma);
++
++ function Make_Pragma_Argument_Association (Sloc : Source_Ptr;
++ Chars : Name_Id := No_Name;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Pragma_Argument_Association);
++
++ function Make_Defining_Identifier (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id;
++ pragma Inline (Make_Defining_Identifier);
++
++ function Make_Full_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Type_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Full_Type_Declaration);
++
++ function Make_Subtype_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Subtype_Indication : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subtype_Declaration);
++
++ function Make_Subtype_Indication (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Constraint : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subtype_Indication);
++
++ function Make_Object_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Aliased_Present : Boolean := False;
++ Constant_Present : Boolean := False;
++ Object_Definition : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Object_Declaration);
++
++ function Make_Number_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Number_Declaration);
++
++ function Make_Derived_Type_Definition (Sloc : Source_Ptr;
++ Abstract_Present : Boolean := False;
++ Subtype_Indication : Node_Id;
++ Record_Extension_Part : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Derived_Type_Definition);
++
++ function Make_Range_Constraint (Sloc : Source_Ptr;
++ Range_Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Range_Constraint);
++
++ function Make_Range (Sloc : Source_Ptr;
++ Low_Bound : Node_Id;
++ High_Bound : Node_Id;
++ Includes_Infinities : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Range);
++
++ function Make_Enumeration_Type_Definition (Sloc : Source_Ptr;
++ Literals : List_Id;
++ End_Label : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Enumeration_Type_Definition);
++
++ function Make_Defining_Character_Literal (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id;
++ pragma Inline (Make_Defining_Character_Literal);
++
++ function Make_Signed_Integer_Type_Definition (Sloc : Source_Ptr;
++ Low_Bound : Node_Id;
++ High_Bound : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Signed_Integer_Type_Definition);
++
++ function Make_Modular_Type_Definition (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Modular_Type_Definition);
++
++ function Make_Floating_Point_Definition (Sloc : Source_Ptr;
++ Digits_Expression : Node_Id;
++ Real_Range_Specification : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Floating_Point_Definition);
++
++ function Make_Real_Range_Specification (Sloc : Source_Ptr;
++ Low_Bound : Node_Id;
++ High_Bound : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Real_Range_Specification);
++
++ function Make_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr;
++ Delta_Expression : Node_Id;
++ Real_Range_Specification : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Ordinary_Fixed_Point_Definition);
++
++ function Make_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr;
++ Delta_Expression : Node_Id;
++ Digits_Expression : Node_Id;
++ Real_Range_Specification : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Decimal_Fixed_Point_Definition);
++
++ function Make_Digits_Constraint (Sloc : Source_Ptr;
++ Digits_Expression : Node_Id;
++ Range_Constraint : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Digits_Constraint);
++
++ function Make_Unconstrained_Array_Definition (Sloc : Source_Ptr;
++ Subtype_Marks : List_Id;
++ Component_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Unconstrained_Array_Definition);
++
++ function Make_Constrained_Array_Definition (Sloc : Source_Ptr;
++ Discrete_Subtype_Definitions : List_Id;
++ Component_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Constrained_Array_Definition);
++
++ function Make_Component_Definition (Sloc : Source_Ptr;
++ Aliased_Present : Boolean := False;
++ Subtype_Indication : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Component_Definition);
++
++ function Make_Discriminant_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Type : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Discriminant_Specification);
++
++ function Make_Index_Or_Discriminant_Constraint (Sloc : Source_Ptr;
++ Constraints : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Index_Or_Discriminant_Constraint);
++
++ function Make_Discriminant_Association (Sloc : Source_Ptr;
++ Selector_Names : List_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Discriminant_Association);
++
++ function Make_Record_Definition (Sloc : Source_Ptr;
++ End_Label : Node_Id := Empty;
++ Abstract_Present : Boolean := False;
++ Tagged_Present : Boolean := False;
++ Limited_Present : Boolean := False;
++ Component_List : Node_Id;
++ Null_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Record_Definition);
++
++ function Make_Component_List (Sloc : Source_Ptr;
++ Component_Items : List_Id;
++ Variant_Part : Node_Id := Empty;
++ Null_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Component_List);
++
++ function Make_Component_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Component_Definition : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Component_Declaration);
++
++ function Make_Variant_Part (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Variants : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Variant_Part);
++
++ function Make_Variant (Sloc : Source_Ptr;
++ Discrete_Choices : List_Id;
++ Component_List : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Variant);
++
++ function Make_Others_Choice (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Others_Choice);
++
++ function Make_Access_To_Object_Definition (Sloc : Source_Ptr;
++ All_Present : Boolean := False;
++ Subtype_Indication : Node_Id;
++ Constant_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Access_To_Object_Definition);
++
++ function Make_Access_Function_Definition (Sloc : Source_Ptr;
++ Protected_Present : Boolean := False;
++ Parameter_Specifications : List_Id := No_List;
++ Subtype_Mark : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Access_Function_Definition);
++
++ function Make_Access_Procedure_Definition (Sloc : Source_Ptr;
++ Protected_Present : Boolean := False;
++ Parameter_Specifications : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Access_Procedure_Definition);
++
++ function Make_Access_Definition (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Access_Definition);
++
++ function Make_Incomplete_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Incomplete_Type_Declaration);
++
++ function Make_Explicit_Dereference (Sloc : Source_Ptr;
++ Prefix : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Explicit_Dereference);
++
++ function Make_Indexed_Component (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Expressions : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Indexed_Component);
++
++ function Make_Slice (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Discrete_Range : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Slice);
++
++ function Make_Selected_Component (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Selector_Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Selected_Component);
++
++ function Make_Attribute_Reference (Sloc : Source_Ptr;
++ Prefix : Node_Id;
++ Attribute_Name : Name_Id;
++ Expressions : List_Id := No_List;
++ Must_Be_Byte_Aligned : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Attribute_Reference);
++
++ function Make_Aggregate (Sloc : Source_Ptr;
++ Expressions : List_Id := No_List;
++ Component_Associations : List_Id := No_List;
++ Null_Record_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Aggregate);
++
++ function Make_Component_Association (Sloc : Source_Ptr;
++ Choices : List_Id;
++ Expression : Node_Id;
++ Box_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Component_Association);
++
++ function Make_Extension_Aggregate (Sloc : Source_Ptr;
++ Ancestor_Part : Node_Id;
++ Expressions : List_Id := No_List;
++ Component_Associations : List_Id := No_List;
++ Null_Record_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Extension_Aggregate);
++
++ function Make_Null (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Null);
++
++ function Make_And_Then (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_And_Then);
++
++ function Make_Or_Else (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Or_Else);
++
++ function Make_In (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_In);
++
++ function Make_Not_In (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Not_In);
++
++ function Make_Op_And (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_And);
++
++ function Make_Op_Or (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Or);
++
++ function Make_Op_Xor (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Xor);
++
++ function Make_Op_Eq (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Eq);
++
++ function Make_Op_Ne (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Ne);
++
++ function Make_Op_Lt (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Lt);
++
++ function Make_Op_Le (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Le);
++
++ function Make_Op_Gt (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Gt);
++
++ function Make_Op_Ge (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Ge);
++
++ function Make_Op_Add (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Add);
++
++ function Make_Op_Subtract (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Subtract);
++
++ function Make_Op_Concat (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Concat);
++
++ function Make_Op_Multiply (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Multiply);
++
++ function Make_Op_Divide (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Divide);
++
++ function Make_Op_Mod (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Mod);
++
++ function Make_Op_Rem (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Rem);
++
++ function Make_Op_Expon (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Expon);
++
++ function Make_Op_Plus (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Plus);
++
++ function Make_Op_Minus (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Minus);
++
++ function Make_Op_Abs (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Abs);
++
++ function Make_Op_Not (Sloc : Source_Ptr;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Not);
++
++ function Make_Type_Conversion (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Type_Conversion);
++
++ function Make_Qualified_Expression (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Qualified_Expression);
++
++ function Make_Allocator (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Allocator);
++
++ function Make_Null_Statement (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Null_Statement);
++
++ function Make_Label (Sloc : Source_Ptr;
++ Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Label);
++
++ function Make_Assignment_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Assignment_Statement);
++
++ function Make_If_Statement (Sloc : Source_Ptr;
++ Condition : Node_Id;
++ Then_Statements : List_Id;
++ Elsif_Parts : List_Id := No_List;
++ Else_Statements : List_Id := No_List;
++ End_Span : Uint := No_Uint)
++ return Node_Id;
++ pragma Inline (Make_If_Statement);
++
++ function Make_Elsif_Part (Sloc : Source_Ptr;
++ Condition : Node_Id;
++ Then_Statements : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Elsif_Part);
++
++ function Make_Case_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id;
++ Alternatives : List_Id;
++ End_Span : Uint := No_Uint)
++ return Node_Id;
++ pragma Inline (Make_Case_Statement);
++
++ function Make_Case_Statement_Alternative (Sloc : Source_Ptr;
++ Discrete_Choices : List_Id;
++ Statements : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Case_Statement_Alternative);
++
++ function Make_Loop_Statement (Sloc : Source_Ptr;
++ Identifier : Node_Id := Empty;
++ Iteration_Scheme : Node_Id := Empty;
++ Statements : List_Id;
++ End_Label : Node_Id;
++ Has_Created_Identifier : Boolean := False;
++ Is_Null_Loop : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Loop_Statement);
++
++ function Make_Iteration_Scheme (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Loop_Parameter_Specification : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Iteration_Scheme);
++
++ function Make_Loop_Parameter_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Reverse_Present : Boolean := False;
++ Discrete_Subtype_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Loop_Parameter_Specification);
++
++ function Make_Block_Statement (Sloc : Source_Ptr;
++ Identifier : Node_Id := Empty;
++ Declarations : List_Id := No_List;
++ Handled_Statement_Sequence : Node_Id;
++ Has_Created_Identifier : Boolean := False;
++ Is_Task_Allocation_Block : Boolean := False;
++ Is_Asynchronous_Call_Block : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Block_Statement);
++
++ function Make_Exit_Statement (Sloc : Source_Ptr;
++ Name : Node_Id := Empty;
++ Condition : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Exit_Statement);
++
++ function Make_Goto_Statement (Sloc : Source_Ptr;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Goto_Statement);
++
++ function Make_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subprogram_Declaration);
++
++ function Make_Abstract_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Abstract_Subprogram_Declaration);
++
++ function Make_Function_Specification (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Parameter_Specifications : List_Id := No_List;
++ Subtype_Mark : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Function_Specification);
++
++ function Make_Procedure_Specification (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Parameter_Specifications : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Procedure_Specification);
++
++ function Make_Designator (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Designator);
++
++ function Make_Defining_Program_Unit_Name (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Defining_Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Defining_Program_Unit_Name);
++
++ function Make_Operator_Symbol (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Strval : String_Id)
++ return Node_Id;
++ pragma Inline (Make_Operator_Symbol);
++
++ function Make_Defining_Operator_Symbol (Sloc : Source_Ptr;
++ Chars : Name_Id)
++ return Node_Id;
++ pragma Inline (Make_Defining_Operator_Symbol);
++
++ function Make_Parameter_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ In_Present : Boolean := False;
++ Out_Present : Boolean := False;
++ Parameter_Type : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Parameter_Specification);
++
++ function Make_Subprogram_Body (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id;
++ Bad_Is_Detected : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Subprogram_Body);
++
++ function Make_Procedure_Call_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Parameter_Associations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Procedure_Call_Statement);
++
++ function Make_Function_Call (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Parameter_Associations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Function_Call);
++
++ function Make_Parameter_Association (Sloc : Source_Ptr;
++ Selector_Name : Node_Id;
++ Explicit_Actual_Parameter : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Parameter_Association);
++
++ function Make_Return_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Return_Statement);
++
++ function Make_Package_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Package_Declaration);
++
++ function Make_Package_Specification (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Visible_Declarations : List_Id;
++ Private_Declarations : List_Id := No_List;
++ End_Label : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Package_Specification);
++
++ function Make_Package_Body (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Package_Body);
++
++ function Make_Private_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False;
++ Abstract_Present : Boolean := False;
++ Tagged_Present : Boolean := False;
++ Limited_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Private_Type_Declaration);
++
++ function Make_Private_Extension_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False;
++ Abstract_Present : Boolean := False;
++ Subtype_Indication : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Private_Extension_Declaration);
++
++ function Make_Use_Package_Clause (Sloc : Source_Ptr;
++ Names : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Use_Package_Clause);
++
++ function Make_Use_Type_Clause (Sloc : Source_Ptr;
++ Subtype_Marks : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Use_Type_Clause);
++
++ function Make_Object_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Subtype_Mark : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Object_Renaming_Declaration);
++
++ function Make_Exception_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Exception_Renaming_Declaration);
++
++ function Make_Package_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Package_Renaming_Declaration);
++
++ function Make_Subprogram_Renaming_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subprogram_Renaming_Declaration);
++
++ function Make_Generic_Package_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Generic_Package_Renaming_Declaration);
++
++ function Make_Generic_Procedure_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Generic_Procedure_Renaming_Declaration);
++
++ function Make_Generic_Function_Renaming_Declaration (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Generic_Function_Renaming_Declaration);
++
++ function Make_Task_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Task_Definition : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Task_Type_Declaration);
++
++ function Make_Single_Task_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Task_Definition : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Single_Task_Declaration);
++
++ function Make_Task_Definition (Sloc : Source_Ptr;
++ Visible_Declarations : List_Id;
++ Private_Declarations : List_Id := No_List;
++ End_Label : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Task_Definition);
++
++ function Make_Task_Body (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Task_Body);
++
++ function Make_Protected_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Protected_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Protected_Type_Declaration);
++
++ function Make_Single_Protected_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Protected_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Single_Protected_Declaration);
++
++ function Make_Protected_Definition (Sloc : Source_Ptr;
++ Visible_Declarations : List_Id;
++ Private_Declarations : List_Id := No_List;
++ End_Label : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Protected_Definition);
++
++ function Make_Protected_Body (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Declarations : List_Id;
++ End_Label : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Protected_Body);
++
++ function Make_Entry_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discrete_Subtype_Definition : Node_Id := Empty;
++ Parameter_Specifications : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Entry_Declaration);
++
++ function Make_Accept_Statement (Sloc : Source_Ptr;
++ Entry_Direct_Name : Node_Id;
++ Entry_Index : Node_Id := Empty;
++ Parameter_Specifications : List_Id := No_List;
++ Handled_Statement_Sequence : Node_Id;
++ Declarations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Accept_Statement);
++
++ function Make_Entry_Body (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Entry_Body_Formal_Part : Node_Id;
++ Declarations : List_Id;
++ Handled_Statement_Sequence : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Entry_Body);
++
++ function Make_Entry_Body_Formal_Part (Sloc : Source_Ptr;
++ Entry_Index_Specification : Node_Id := Empty;
++ Parameter_Specifications : List_Id := No_List;
++ Condition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Entry_Body_Formal_Part);
++
++ function Make_Entry_Index_Specification (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Discrete_Subtype_Definition : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Entry_Index_Specification);
++
++ function Make_Entry_Call_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Parameter_Associations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Entry_Call_Statement);
++
++ function Make_Requeue_Statement (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Abort_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Requeue_Statement);
++
++ function Make_Delay_Until_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Delay_Until_Statement);
++
++ function Make_Delay_Relative_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Delay_Relative_Statement);
++
++ function Make_Selective_Accept (Sloc : Source_Ptr;
++ Select_Alternatives : List_Id;
++ Else_Statements : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Selective_Accept);
++
++ function Make_Accept_Alternative (Sloc : Source_Ptr;
++ Accept_Statement : Node_Id;
++ Condition : Node_Id := Empty;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Accept_Alternative);
++
++ function Make_Delay_Alternative (Sloc : Source_Ptr;
++ Delay_Statement : Node_Id;
++ Condition : Node_Id := Empty;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Delay_Alternative);
++
++ function Make_Terminate_Alternative (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Pragmas_Before : List_Id := No_List;
++ Pragmas_After : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Terminate_Alternative);
++
++ function Make_Timed_Entry_Call (Sloc : Source_Ptr;
++ Entry_Call_Alternative : Node_Id;
++ Delay_Alternative : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Timed_Entry_Call);
++
++ function Make_Entry_Call_Alternative (Sloc : Source_Ptr;
++ Entry_Call_Statement : Node_Id;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Entry_Call_Alternative);
++
++ function Make_Conditional_Entry_Call (Sloc : Source_Ptr;
++ Entry_Call_Alternative : Node_Id;
++ Else_Statements : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Conditional_Entry_Call);
++
++ function Make_Asynchronous_Select (Sloc : Source_Ptr;
++ Triggering_Alternative : Node_Id;
++ Abortable_Part : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Asynchronous_Select);
++
++ function Make_Triggering_Alternative (Sloc : Source_Ptr;
++ Triggering_Statement : Node_Id;
++ Statements : List_Id := Empty_List;
++ Pragmas_Before : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Triggering_Alternative);
++
++ function Make_Abortable_Part (Sloc : Source_Ptr;
++ Statements : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Abortable_Part);
++
++ function Make_Abort_Statement (Sloc : Source_Ptr;
++ Names : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Abort_Statement);
++
++ function Make_Compilation_Unit (Sloc : Source_Ptr;
++ Context_Items : List_Id;
++ Private_Present : Boolean := False;
++ Unit : Node_Id;
++ Aux_Decls_Node : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Compilation_Unit);
++
++ function Make_Compilation_Unit_Aux (Sloc : Source_Ptr;
++ Declarations : List_Id := No_List;
++ Actions : List_Id := No_List;
++ Pragmas_After : List_Id := No_List;
++ Config_Pragmas : List_Id := Empty_List)
++ return Node_Id;
++ pragma Inline (Make_Compilation_Unit_Aux);
++
++ function Make_With_Clause (Sloc : Source_Ptr;
++ Name : Node_Id;
++ First_Name : Boolean := True;
++ Last_Name : Boolean := True;
++ Limited_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_With_Clause);
++
++ function Make_With_Type_Clause (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Tagged_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_With_Type_Clause);
++
++ function Make_Subprogram_Body_Stub (Sloc : Source_Ptr;
++ Specification : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subprogram_Body_Stub);
++
++ function Make_Package_Body_Stub (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Package_Body_Stub);
++
++ function Make_Task_Body_Stub (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Task_Body_Stub);
++
++ function Make_Protected_Body_Stub (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Protected_Body_Stub);
++
++ function Make_Subunit (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Proper_Body : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subunit);
++
++ function Make_Exception_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Exception_Declaration);
++
++ function Make_Handled_Sequence_Of_Statements (Sloc : Source_Ptr;
++ Statements : List_Id;
++ End_Label : Node_Id := Empty;
++ Exception_Handlers : List_Id := No_List;
++ At_End_Proc : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Handled_Sequence_Of_Statements);
++
++ function Make_Exception_Handler (Sloc : Source_Ptr;
++ Choice_Parameter : Node_Id := Empty;
++ Exception_Choices : List_Id;
++ Statements : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Exception_Handler);
++
++ function Make_Raise_Statement (Sloc : Source_Ptr;
++ Name : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Raise_Statement);
++
++ function Make_Generic_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Generic_Formal_Declarations : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Generic_Subprogram_Declaration);
++
++ function Make_Generic_Package_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Generic_Formal_Declarations : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Generic_Package_Declaration);
++
++ function Make_Package_Instantiation (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Package_Instantiation);
++
++ function Make_Procedure_Instantiation (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Procedure_Instantiation);
++
++ function Make_Function_Instantiation (Sloc : Source_Ptr;
++ Defining_Unit_Name : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Function_Instantiation);
++
++ function Make_Generic_Association (Sloc : Source_Ptr;
++ Selector_Name : Node_Id := Empty;
++ Explicit_Generic_Actual_Parameter : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Generic_Association);
++
++ function Make_Formal_Object_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ In_Present : Boolean := False;
++ Out_Present : Boolean := False;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Formal_Object_Declaration);
++
++ function Make_Formal_Type_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Formal_Type_Definition : Node_Id;
++ Discriminant_Specifications : List_Id := No_List;
++ Unknown_Discriminants_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Formal_Type_Declaration);
++
++ function Make_Formal_Private_Type_Definition (Sloc : Source_Ptr;
++ Abstract_Present : Boolean := False;
++ Tagged_Present : Boolean := False;
++ Limited_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Formal_Private_Type_Definition);
++
++ function Make_Formal_Derived_Type_Definition (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Private_Present : Boolean := False;
++ Abstract_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Formal_Derived_Type_Definition);
++
++ function Make_Formal_Discrete_Type_Definition (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Formal_Discrete_Type_Definition);
++
++ function Make_Formal_Signed_Integer_Type_Definition (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Formal_Signed_Integer_Type_Definition);
++
++ function Make_Formal_Modular_Type_Definition (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Formal_Modular_Type_Definition);
++
++ function Make_Formal_Floating_Point_Definition (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Formal_Floating_Point_Definition);
++
++ function Make_Formal_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Formal_Ordinary_Fixed_Point_Definition);
++
++ function Make_Formal_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Formal_Decimal_Fixed_Point_Definition);
++
++ function Make_Formal_Subprogram_Declaration (Sloc : Source_Ptr;
++ Specification : Node_Id;
++ Default_Name : Node_Id := Empty;
++ Box_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Formal_Subprogram_Declaration);
++
++ function Make_Formal_Package_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id;
++ Name : Node_Id;
++ Generic_Associations : List_Id := No_List;
++ Box_Present : Boolean := False)
++ return Node_Id;
++ pragma Inline (Make_Formal_Package_Declaration);
++
++ function Make_Attribute_Definition_Clause (Sloc : Source_Ptr;
++ Name : Node_Id;
++ Chars : Name_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Attribute_Definition_Clause);
++
++ function Make_Enumeration_Representation_Clause (Sloc : Source_Ptr;
++ Identifier : Node_Id;
++ Array_Aggregate : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Enumeration_Representation_Clause);
++
++ function Make_Record_Representation_Clause (Sloc : Source_Ptr;
++ Identifier : Node_Id;
++ Mod_Clause : Node_Id := Empty;
++ Component_Clauses : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Record_Representation_Clause);
++
++ function Make_Component_Clause (Sloc : Source_Ptr;
++ Component_Name : Node_Id;
++ Position : Node_Id;
++ First_Bit : Node_Id;
++ Last_Bit : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Component_Clause);
++
++ function Make_Code_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Code_Statement);
++
++ function Make_Op_Rotate_Left (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Rotate_Left);
++
++ function Make_Op_Rotate_Right (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Rotate_Right);
++
++ function Make_Op_Shift_Left (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Shift_Left);
++
++ function Make_Op_Shift_Right_Arithmetic (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Shift_Right_Arithmetic);
++
++ function Make_Op_Shift_Right (Sloc : Source_Ptr;
++ Left_Opnd : Node_Id;
++ Right_Opnd : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Op_Shift_Right);
++
++ function Make_Delta_Constraint (Sloc : Source_Ptr;
++ Delta_Expression : Node_Id;
++ Range_Constraint : Node_Id := Empty)
++ return Node_Id;
++ pragma Inline (Make_Delta_Constraint);
++
++ function Make_At_Clause (Sloc : Source_Ptr;
++ Identifier : Node_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_At_Clause);
++
++ function Make_Mod_Clause (Sloc : Source_Ptr;
++ Expression : Node_Id;
++ Pragmas_Before : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Mod_Clause);
++
++ function Make_Conditional_Expression (Sloc : Source_Ptr;
++ Expressions : List_Id)
++ return Node_Id;
++ pragma Inline (Make_Conditional_Expression);
++
++ function Make_Expanded_Name (Sloc : Source_Ptr;
++ Chars : Name_Id;
++ Prefix : Node_Id;
++ Selector_Name : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Expanded_Name);
++
++ function Make_Free_Statement (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Free_Statement);
++
++ function Make_Freeze_Entity (Sloc : Source_Ptr;
++ Actions : List_Id := No_List)
++ return Node_Id;
++ pragma Inline (Make_Freeze_Entity);
++
++ function Make_Implicit_Label_Declaration (Sloc : Source_Ptr;
++ Defining_Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Implicit_Label_Declaration);
++
++ function Make_Itype_Reference (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Itype_Reference);
++
++ function Make_Raise_Constraint_Error (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Reason : Uint)
++ return Node_Id;
++ pragma Inline (Make_Raise_Constraint_Error);
++
++ function Make_Raise_Program_Error (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Reason : Uint)
++ return Node_Id;
++ pragma Inline (Make_Raise_Program_Error);
++
++ function Make_Raise_Storage_Error (Sloc : Source_Ptr;
++ Condition : Node_Id := Empty;
++ Reason : Uint)
++ return Node_Id;
++ pragma Inline (Make_Raise_Storage_Error);
++
++ function Make_Reference (Sloc : Source_Ptr;
++ Prefix : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Reference);
++
++ function Make_Subprogram_Info (Sloc : Source_Ptr;
++ Identifier : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Subprogram_Info);
++
++ function Make_Unchecked_Expression (Sloc : Source_Ptr;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Unchecked_Expression);
++
++ function Make_Unchecked_Type_Conversion (Sloc : Source_Ptr;
++ Subtype_Mark : Node_Id;
++ Expression : Node_Id)
++ return Node_Id;
++ pragma Inline (Make_Unchecked_Type_Conversion);
++
++ function Make_Validate_Unchecked_Conversion (Sloc : Source_Ptr)
++ return Node_Id;
++ pragma Inline (Make_Validate_Unchecked_Conversion);
++
++end Nmake;
+--- gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/treeprs.ads.orig 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.0/obj-amd64-pld-linux/gcc/ada/treeprs.ads 2004-06-02 00:54:11.000000000 +0200
+@@ -0,0 +1,801 @@
++------------------------------------------------------------------------------
++-- --
++-- GNAT COMPILER COMPONENTS --
++-- --
++-- T R E E P R S --
++-- --
++-- S p e c --
++-- --
++-- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
++-- --
++-- GNAT is free software; you can redistribute it and/or modify it under --
++-- terms of the GNU General Public License as published by the Free Soft- --
++-- ware Foundation; either version 2, or (at your option) any later ver- --
++-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
++-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
++-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
++-- for more details. You should have received a copy of the GNU General --
++-- Public License distributed with GNAT; see file COPYING. If not, write --
++-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
++-- MA 02111-1307, USA. --
++-- --
++-- GNAT was originally developed by the GNAT team at New York University. --
++-- Extensive contributions were provided by Ada Core Technologies Inc. --
++-- --
++------------------------------------------------------------------------------
++
++
++-- This package contains the declaration of the string used by the Tree_Print
++-- package. It must be updated whenever the arrangements of the field names
++-- in package Sinfo is changed. The utility program XTREEPRS is used to
++-- do this update correctly using the template treeprs.adt as input.
++
++with Sinfo; use Sinfo;
++
++package Treeprs is
++
++ --------------------------------
++ -- String Data for Node Print --
++ --------------------------------
++
++ -- String data for print out. The Pchars array is a long string with the
++ -- the entry for each node type consisting of a single blank, followed by
++ -- a series of entries, one for each Op or Flag field used for the node.
++ -- Each entry has a single character which identifies the field, followed
++ -- by the synonym name. The starting location for a given node type is
++ -- found from the corresponding entry in the Pchars_Pos_Array.
++
++ -- The following characters identify the field. These are characters
++ -- which could never occur in a field name, so they also mark the
++ -- end of the previous name.
++
++ subtype Fchar is Character range '#' .. '9';
++
++ F_Field1 : constant Fchar := '#'; -- Character'Val (16#23#)
++ F_Field2 : constant Fchar := '$'; -- Character'Val (16#24#)
++ F_Field3 : constant Fchar := '%'; -- Character'Val (16#25#)
++ F_Field4 : constant Fchar := '&'; -- Character'Val (16#26#)
++ F_Field5 : constant Fchar := '''; -- Character'Val (16#27#)
++ F_Flag1 : constant Fchar := '('; -- Character'Val (16#28#)
++ F_Flag2 : constant Fchar := ')'; -- Character'Val (16#29#)
++ F_Flag3 : constant Fchar := '*'; -- Character'Val (16#2A#)
++ F_Flag4 : constant Fchar := '+'; -- Character'Val (16#2B#)
++ F_Flag5 : constant Fchar := ','; -- Character'Val (16#2C#)
++ F_Flag6 : constant Fchar := '-'; -- Character'Val (16#2D#)
++ F_Flag7 : constant Fchar := '.'; -- Character'Val (16#2E#)
++ F_Flag8 : constant Fchar := '/'; -- Character'Val (16#2F#)
++ F_Flag9 : constant Fchar := '0'; -- Character'Val (16#30#)
++ F_Flag10 : constant Fchar := '1'; -- Character'Val (16#31#)
++ F_Flag11 : constant Fchar := '2'; -- Character'Val (16#32#)
++ F_Flag12 : constant Fchar := '3'; -- Character'Val (16#33#)
++ F_Flag13 : constant Fchar := '4'; -- Character'Val (16#34#)
++ F_Flag14 : constant Fchar := '5'; -- Character'Val (16#35#)
++ F_Flag15 : constant Fchar := '6'; -- Character'Val (16#36#)
++ F_Flag16 : constant Fchar := '7'; -- Character'Val (16#37#)
++ F_Flag17 : constant Fchar := '8'; -- Character'Val (16#38#)
++ F_Flag18 : constant Fchar := '9'; -- Character'Val (16#39#)
++
++ -- Note this table does not include entity field and flags whose access
++ -- functions are in Einfo (these are handled by the Print_Entity_Info
++ -- procedure in Treepr, which uses the routines in Einfo to get the
++ -- proper symbolic information). In addition, the following fields are
++ -- handled by Treepr, and do not appear in the Pchars array:
++
++ -- Analyzed
++ -- Cannot_Be_Constant
++ -- Chars
++ -- Comes_From_Source
++ -- Error_Posted
++ -- Etype
++ -- Is_Controlling_Actual
++ -- Is_Overloaded
++ -- Is_Static_Expression
++ -- Left_Opnd
++ -- Must_Check_Expr
++ -- Must_Not_Freeze
++ -- No_Overflow_Expr
++ -- Paren_Count
++ -- Raises_Constraint_Error
++ -- Right_Opnd
++
++ Pchars : constant String :=
++ -- Unused_At_Start
++ "" &
++ -- At_Clause
++ "#Identifier%Expression" &
++ -- Component_Clause
++ "#Component_Name$Position%First_Bit&Last_Bit" &
++ -- Enumeration_Representation_Clause
++ "#Identifier%Array_Aggregate&Next_Rep_Item" &
++ -- Mod_Clause
++ "%Expression&Pragmas_Before" &
++ -- Record_Representation_Clause
++ "#Identifier$Mod_Clause%Component_Clauses&Next_Rep_Item" &
++ -- Attribute_Definition_Clause
++ "$Name%Expression&Next_Rep_Item+From_At_Mod2Check_Address_Alignment" &
++ -- Empty
++ "" &
++ -- Pragma
++ "$Pragma_Argument_Associations%Debug_Statement&Next_Rep_Item" &
++ -- Pragma_Argument_Association
++ "%Expression" &
++ -- Error
++ "" &
++ -- Defining_Character_Literal
++ "$Next_Entity%Scope" &
++ -- Defining_Identifier
++ "$Next_Entity%Scope" &
++ -- Defining_Operator_Symbol
++ "$Next_Entity%Scope" &
++ -- Expanded_Name
++ "%Prefix$Selector_Name&Entity&Associated_Node4Redundant_Use2Has_Privat" &
++ "e_View" &
++ -- Identifier
++ "&Entity&Associated_Node$Original_Discriminant4Redundant_Use2Has_Priva" &
++ "te_View" &
++ -- Operator_Symbol
++ "%Strval&Entity&Associated_Node2Has_Private_View" &
++ -- Character_Literal
++ "$Char_Literal_Value&Entity&Associated_Node2Has_Private_View" &
++ -- Op_Add
++ "" &
++ -- Op_Concat
++ "4Is_Component_Left_Opnd5Is_Component_Right_Opnd" &
++ -- Op_Expon
++ "4Is_Power_Of_2_For_Shift" &
++ -- Op_Subtract
++ "" &
++ -- Op_Divide
++ "5Treat_Fixed_As_Integer4Do_Division_Check9Rounded_Result" &
++ -- Op_Mod
++ "5Treat_Fixed_As_Integer4Do_Division_Check" &
++ -- Op_Multiply
++ "5Treat_Fixed_As_Integer9Rounded_Result" &
++ -- Op_Rem
++ "5Treat_Fixed_As_Integer4Do_Division_Check" &
++ -- Op_And
++ "+Do_Length_Check" &
++ -- Op_Eq
++ "" &
++ -- Op_Ge
++ "" &
++ -- Op_Gt
++ "" &
++ -- Op_Le
++ "" &
++ -- Op_Lt
++ "" &
++ -- Op_Ne
++ "" &
++ -- Op_Or
++ "+Do_Length_Check" &
++ -- Op_Xor
++ "+Do_Length_Check" &
++ -- Op_Rotate_Left
++ "+Shift_Count_OK" &
++ -- Op_Rotate_Right
++ "+Shift_Count_OK" &
++ -- Op_Shift_Left
++ "+Shift_Count_OK" &
++ -- Op_Shift_Right
++ "+Shift_Count_OK" &
++ -- Op_Shift_Right_Arithmetic
++ "+Shift_Count_OK" &
++ -- Op_Abs
++ "" &
++ -- Op_Minus
++ "" &
++ -- Op_Not
++ "" &
++ -- Op_Plus
++ "" &
++ -- Attribute_Reference
++ "%Prefix$Attribute_Name#Expressions&Entity&Associated_Node8Do_Overflow" &
++ "_Check4Redundant_Use+OK_For_Stream5Must_Be_Byte_Aligned" &
++ -- And_Then
++ "#Actions" &
++ -- Conditional_Expression
++ "#Expressions$Then_Actions%Else_Actions" &
++ -- Explicit_Dereference
++ "%Prefix" &
++ -- Function_Call
++ "$Name%Parameter_Associations&First_Named_Actual#Controlling_Argument4" &
++ "Do_Tag_Check5No_Elaboration_Check8Parameter_List_Truncated9ABE_Is_" &
++ "Certain" &
++ -- In
++ "" &
++ -- Indexed_Component
++ "%Prefix#Expressions" &
++ -- Integer_Literal
++ "$Original_Entity%Intval4Print_In_Hex" &
++ -- Not_In
++ "" &
++ -- Null
++ "" &
++ -- Or_Else
++ "#Actions" &
++ -- Procedure_Call_Statement
++ "$Name%Parameter_Associations&First_Named_Actual#Controlling_Argument4" &
++ "Do_Tag_Check5No_Elaboration_Check8Parameter_List_Truncated9ABE_Is_" &
++ "Certain" &
++ -- Qualified_Expression
++ "&Subtype_Mark%Expression" &
++ -- Raise_Constraint_Error
++ "#Condition%Reason" &
++ -- Raise_Program_Error
++ "#Condition%Reason" &
++ -- Raise_Storage_Error
++ "#Condition%Reason" &
++ -- Aggregate
++ "#Expressions$Component_Associations8Null_Record_Present%Aggregate_Bou" &
++ "nds&Associated_Node+Static_Processing_OK9Compile_Time_Known_Aggreg" &
++ "ate2Expansion_Delayed" &
++ -- Allocator
++ "%Expression#Storage_Pool&Procedure_To_Call4No_Initialization8Do_Stora" &
++ "ge_Check" &
++ -- Extension_Aggregate
++ "%Ancestor_Part&Associated_Node#Expressions$Component_Associations8Nul" &
++ "l_Record_Present2Expansion_Delayed" &
++ -- Range
++ "#Low_Bound$High_Bound2Includes_Infinities" &
++ -- Real_Literal
++ "$Original_Entity%Realval&Corresponding_Integer_Value2Is_Machine_Numbe" &
++ "r" &
++ -- Reference
++ "%Prefix" &
++ -- Selected_Component
++ "%Prefix$Selector_Name&Associated_Node4Do_Discriminant_Check2Is_In_Dis" &
++ "criminant_Check" &
++ -- Slice
++ "%Prefix&Discrete_Range" &
++ -- String_Literal
++ "%Strval2Has_Wide_Character" &
++ -- Subprogram_Info
++ "#Identifier" &
++ -- Type_Conversion
++ "&Subtype_Mark%Expression4Do_Tag_Check+Do_Length_Check8Do_Overflow_Che" &
++ "ck2Float_Truncate9Rounded_Result5Conversion_OK" &
++ -- Unchecked_Expression
++ "%Expression" &
++ -- Unchecked_Type_Conversion
++ "&Subtype_Mark%Expression2Kill_Range_Check8No_Truncation" &
++ -- Subtype_Indication
++ "&Subtype_Mark%Constraint/Must_Not_Freeze" &
++ -- Component_Declaration
++ "#Defining_Identifier&Component_Definition%Expression,More_Ids-Prev_Id" &
++ "s" &
++ -- Entry_Declaration
++ "#Defining_Identifier&Discrete_Subtype_Definition%Parameter_Specificat" &
++ "ions'Corresponding_Body" &
++ -- Formal_Object_Declaration
++ "#Defining_Identifier6In_Present8Out_Present&Subtype_Mark%Expression,M" &
++ "ore_Ids-Prev_Ids" &
++ -- Formal_Type_Declaration
++ "#Defining_Identifier%Formal_Type_Definition&Discriminant_Specificatio" &
++ "ns4Unknown_Discriminants_Present" &
++ -- Full_Type_Declaration
++ "#Defining_Identifier&Discriminant_Specifications%Type_Definition2Disc" &
++ "r_Check_Funcs_Built" &
++ -- Incomplete_Type_Declaration
++ "#Defining_Identifier&Discriminant_Specifications4Unknown_Discriminant" &
++ "s_Present" &
++ -- Loop_Parameter_Specification
++ "#Defining_Identifier6Reverse_Present&Discrete_Subtype_Definition" &
++ -- Object_Declaration
++ "#Defining_Identifier+Aliased_Present8Constant_Present&Object_Definiti" &
++ "on%Expression$Handler_List_Entry'Corresponding_Generic_Association" &
++ ",More_Ids-Prev_Ids4No_Initialization6Assignment_OK2Exception_Junk5" &
++ "Delay_Finalize_Attach7Is_Subprogram_Descriptor" &
++ -- Protected_Type_Declaration
++ "#Defining_Identifier&Discriminant_Specifications%Protected_Definition" &
++ "'Corresponding_Body" &
++ -- Private_Extension_Declaration
++ "#Defining_Identifier&Discriminant_Specifications4Unknown_Discriminant" &
++ "s_Present+Abstract_Present'Subtype_Indication" &
++ -- Private_Type_Declaration
++ "#Defining_Identifier&Discriminant_Specifications4Unknown_Discriminant" &
++ "s_Present+Abstract_Present6Tagged_Present8Limited_Present" &
++ -- Subtype_Declaration
++ "#Defining_Identifier'Subtype_Indication&Generic_Parent_Type2Exception" &
++ "_Junk" &
++ -- Function_Specification
++ "#Defining_Unit_Name$Elaboration_Boolean%Parameter_Specifications&Subt" &
++ "ype_Mark'Generic_Parent" &
++ -- Procedure_Specification
++ "#Defining_Unit_Name$Elaboration_Boolean%Parameter_Specifications'Gene" &
++ "ric_Parent" &
++ -- Entry_Index_Specification
++ "#Defining_Identifier&Discrete_Subtype_Definition" &
++ -- Freeze_Entity
++ "&Entity$Access_Types_To_Process%TSS_Elist#Actions'First_Subtype_Link" &
++ -- Access_Function_Definition
++ "6Protected_Present%Parameter_Specifications&Subtype_Mark" &
++ -- Access_Procedure_Definition
++ "6Protected_Present%Parameter_Specifications" &
++ -- Task_Type_Declaration
++ "#Defining_Identifier$Task_Body_Procedure&Discriminant_Specifications%" &
++ "Task_Definition'Corresponding_Body" &
++ -- Package_Body_Stub
++ "#Defining_Identifier&Library_Unit'Corresponding_Body" &
++ -- Protected_Body_Stub
++ "#Defining_Identifier&Library_Unit'Corresponding_Body" &
++ -- Subprogram_Body_Stub
++ "#Specification&Library_Unit'Corresponding_Body" &
++ -- Task_Body_Stub
++ "#Defining_Identifier&Library_Unit'Corresponding_Body" &
++ -- Function_Instantiation
++ "#Defining_Unit_Name$Name%Generic_Associations&Parent_Spec'Instance_Sp" &
++ "ec9ABE_Is_Certain" &
++ -- Package_Instantiation
++ "#Defining_Unit_Name$Name%Generic_Associations&Parent_Spec'Instance_Sp" &
++ "ec9ABE_Is_Certain" &
++ -- Procedure_Instantiation
++ "#Defining_Unit_Name$Name&Parent_Spec%Generic_Associations'Instance_Sp" &
++ "ec9ABE_Is_Certain" &
++ -- Package_Body
++ "#Defining_Unit_Name$Declarations&Handled_Statement_Sequence'Correspon" &
++ "ding_Spec4Was_Originally_Stub" &
++ -- Subprogram_Body
++ "#Specification$Declarations&Handled_Statement_Sequence%Activation_Cha" &
++ "in_Entity'Corresponding_Spec+Acts_As_Spec6Bad_Is_Detected8Do_Stora" &
++ "ge_Check-Has_Priority_Pragma.Is_Protected_Subprogram_Body,Is_Task_" &
++ "Master4Was_Originally_Stub" &
++ -- Protected_Body
++ "#Defining_Identifier$Declarations&End_Label'Corresponding_Spec4Was_Or" &
++ "iginally_Stub" &
++ -- Task_Body
++ "#Defining_Identifier$Declarations&Handled_Statement_Sequence,Is_Task_" &
++ "Master%Activation_Chain_Entity'Corresponding_Spec4Was_Originally_S" &
++ "tub" &
++ -- Implicit_Label_Declaration
++ "#Defining_Identifier$Label_Construct" &
++ -- Package_Declaration
++ "#Specification'Corresponding_Body&Parent_Spec%Activation_Chain_Entity" &
++ -- Single_Task_Declaration
++ "#Defining_Identifier%Task_Definition" &
++ -- Subprogram_Declaration
++ "#Specification%Body_To_Inline'Corresponding_Body&Parent_Spec" &
++ -- Use_Package_Clause
++ "$Names%Next_Use_Clause&Hidden_By_Use_Clause" &
++ -- Generic_Package_Declaration
++ "#Specification'Corresponding_Body$Generic_Formal_Declarations&Parent_" &
++ "Spec%Activation_Chain_Entity" &
++ -- Generic_Subprogram_Declaration
++ "#Specification'Corresponding_Body$Generic_Formal_Declarations&Parent_" &
++ "Spec" &
++ -- Constrained_Array_Definition
++ "$Discrete_Subtype_Definitions&Component_Definition" &
++ -- Unconstrained_Array_Definition
++ "$Subtype_Marks&Component_Definition" &
++ -- Exception_Renaming_Declaration
++ "#Defining_Identifier$Name" &
++ -- Object_Renaming_Declaration
++ "#Defining_Identifier&Subtype_Mark$Name'Corresponding_Generic_Associat" &
++ "ion" &
++ -- Package_Renaming_Declaration
++ "#Defining_Unit_Name$Name&Parent_Spec" &
++ -- Subprogram_Renaming_Declaration
++ "#Specification$Name&Parent_Spec'Corresponding_Spec" &
++ -- Generic_Function_Renaming_Declaration
++ "#Defining_Unit_Name$Name&Parent_Spec" &
++ -- Generic_Package_Renaming_Declaration
++ "#Defining_Unit_Name$Name&Parent_Spec" &
++ -- Generic_Procedure_Renaming_Declaration
++ "#Defining_Unit_Name$Name&Parent_Spec" &
++ -- Abort_Statement
++ "$Names" &
++ -- Accept_Statement
++ "#Entry_Direct_Name'Entry_Index%Parameter_Specifications&Handled_State" &
++ "ment_Sequence$Declarations" &
++ -- Assignment_Statement
++ "$Name%Expression4Do_Tag_Check+Do_Length_Check,Forwards_OK-Backwards_O" &
++ "K.No_Ctrl_Actions" &
++ -- Asynchronous_Select
++ "#Triggering_Alternative$Abortable_Part" &
++ -- Block_Statement
++ "#Identifier$Declarations&Handled_Statement_Sequence,Is_Task_Master%Ac" &
++ "tivation_Chain_Entity6Has_Created_Identifier-Is_Task_Allocation_Bl" &
++ "ock.Is_Asynchronous_Call_Block" &
++ -- Case_Statement
++ "%Expression&Alternatives'End_Span" &
++ -- Code_Statement
++ "%Expression" &
++ -- Conditional_Entry_Call
++ "#Entry_Call_Alternative&Else_Statements" &
++ -- Delay_Relative_Statement
++ "%Expression" &
++ -- Delay_Until_Statement
++ "%Expression" &
++ -- Entry_Call_Statement
++ "$Name%Parameter_Associations&First_Named_Actual" &
++ -- Free_Statement
++ "%Expression#Storage_Pool&Procedure_To_Call" &
++ -- Goto_Statement
++ "$Name2Exception_Junk" &
++ -- Loop_Statement
++ "#Identifier$Iteration_Scheme%Statements&End_Label6Has_Created_Identif" &
++ "ier7Is_Null_Loop" &
++ -- Null_Statement
++ "" &
++ -- Raise_Statement
++ "$Name" &
++ -- Requeue_Statement
++ "$Name6Abort_Present" &
++ -- Return_Statement
++ "%Expression#Storage_Pool&Procedure_To_Call4Do_Tag_Check$Return_Type,B" &
++ "y_Ref" &
++ -- Selective_Accept
++ "#Select_Alternatives&Else_Statements" &
++ -- Timed_Entry_Call
++ "#Entry_Call_Alternative&Delay_Alternative" &
++ -- Exit_Statement
++ "$Name#Condition" &
++ -- If_Statement
++ "#Condition$Then_Statements%Elsif_Parts&Else_Statements'End_Span" &
++ -- Accept_Alternative
++ "$Accept_Statement#Condition%Statements&Pragmas_Before'Accept_Handler_" &
++ "Records" &
++ -- Delay_Alternative
++ "$Delay_Statement#Condition%Statements&Pragmas_Before" &
++ -- Elsif_Part
++ "#Condition$Then_Statements%Condition_Actions" &
++ -- Entry_Body_Formal_Part
++ "&Entry_Index_Specification%Parameter_Specifications#Condition" &
++ -- Iteration_Scheme
++ "#Condition%Condition_Actions&Loop_Parameter_Specification" &
++ -- Terminate_Alternative
++ "#Condition&Pragmas_Before'Pragmas_After" &
++ -- Abortable_Part
++ "%Statements" &
++ -- Abstract_Subprogram_Declaration
++ "#Specification" &
++ -- Access_Definition
++ "&Subtype_Mark" &
++ -- Access_To_Object_Definition
++ "6All_Present'Subtype_Indication8Constant_Present" &
++ -- Case_Statement_Alternative
++ "&Discrete_Choices%Statements" &
++ -- Compilation_Unit
++ "&Library_Unit#Context_Items6Private_Present$Unit'Aux_Decls_Node8Has_N" &
++ "o_Elaboration_Code4Body_Required+Acts_As_Spec%First_Inlined_Subpro" &
++ "gram" &
++ -- Compilation_Unit_Aux
++ "$Declarations#Actions'Pragmas_After&Config_Pragmas" &
++ -- Component_Association
++ "#Choices$Loop_Actions%Expression6Box_Present" &
++ -- Component_Definition
++ "+Aliased_Present'Subtype_Indication" &
++ -- Component_List
++ "%Component_Items&Variant_Part4Null_Present" &
++ -- Derived_Type_Definition
++ "+Abstract_Present'Subtype_Indication%Record_Extension_Part" &
++ -- Decimal_Fixed_Point_Definition
++ "%Delta_Expression$Digits_Expression&Real_Range_Specification" &
++ -- Defining_Program_Unit_Name
++ "$Name#Defining_Identifier" &
++ -- Delta_Constraint
++ "%Delta_Expression&Range_Constraint" &
++ -- Designator
++ "$Name#Identifier" &
++ -- Digits_Constraint
++ "$Digits_Expression&Range_Constraint" &
++ -- Discriminant_Association
++ "#Selector_Names%Expression" &
++ -- Discriminant_Specification
++ "#Defining_Identifier'Discriminant_Type%Expression,More_Ids-Prev_Ids" &
++ -- Enumeration_Type_Definition
++ "#Literals&End_Label" &
++ -- Entry_Body
++ "#Defining_Identifier'Entry_Body_Formal_Part$Declarations&Handled_Stat" &
++ "ement_Sequence%Activation_Chain_Entity" &
++ -- Entry_Call_Alternative
++ "#Entry_Call_Statement%Statements&Pragmas_Before" &
++ -- Exception_Declaration
++ "#Defining_Identifier%Expression,More_Ids-Prev_Ids" &
++ -- Exception_Handler
++ "$Choice_Parameter&Exception_Choices%Statements,Zero_Cost_Handling" &
++ -- Floating_Point_Definition
++ "$Digits_Expression&Real_Range_Specification" &
++ -- Formal_Decimal_Fixed_Point_Definition
++ "" &
++ -- Formal_Derived_Type_Definition
++ "&Subtype_Mark6Private_Present+Abstract_Present" &
++ -- Formal_Discrete_Type_Definition
++ "" &
++ -- Formal_Floating_Point_Definition
++ "" &
++ -- Formal_Modular_Type_Definition
++ "" &
++ -- Formal_Ordinary_Fixed_Point_Definition
++ "" &
++ -- Formal_Package_Declaration
++ "#Defining_Identifier$Name%Generic_Associations6Box_Present'Instance_S" &
++ "pec9ABE_Is_Certain" &
++ -- Formal_Private_Type_Definition
++ "+Abstract_Present6Tagged_Present8Limited_Present" &
++ -- Formal_Signed_Integer_Type_Definition
++ "" &
++ -- Formal_Subprogram_Declaration
++ "#Specification$Default_Name6Box_Present" &
++ -- Generic_Association
++ "$Selector_Name#Explicit_Generic_Actual_Parameter" &
++ -- Handled_Sequence_Of_Statements
++ "%Statements&End_Label'Exception_Handlers#At_End_Proc$First_Real_State" &
++ "ment,Zero_Cost_Handling" &
++ -- Index_Or_Discriminant_Constraint
++ "#Constraints" &
++ -- Itype_Reference
++ "#Itype" &
++ -- Label
++ "#Identifier2Exception_Junk" &
++ -- Modular_Type_Definition
++ "%Expression" &
++ -- Number_Declaration
++ "#Defining_Identifier%Expression,More_Ids-Prev_Ids" &
++ -- Ordinary_Fixed_Point_Definition
++ "%Delta_Expression&Real_Range_Specification" &
++ -- Others_Choice
++ "#Others_Discrete_Choices2All_Others" &
++ -- Package_Specification
++ "#Defining_Unit_Name$Visible_Declarations%Private_Declarations&End_Lab" &
++ "el'Generic_Parent9Limited_View_Installed" &
++ -- Parameter_Association
++ "$Selector_Name%Explicit_Actual_Parameter&Next_Named_Actual" &
++ -- Parameter_Specification
++ "#Defining_Identifier6In_Present8Out_Present$Parameter_Type%Expression" &
++ "4Do_Accessibility_Check,More_Ids-Prev_Ids'Default_Expression" &
++ -- Protected_Definition
++ "$Visible_Declarations%Private_Declarations&End_Label-Has_Priority_Pra" &
++ "gma" &
++ -- Range_Constraint
++ "&Range_Expression" &
++ -- Real_Range_Specification
++ "#Low_Bound$High_Bound" &
++ -- Record_Definition
++ "&End_Label+Abstract_Present6Tagged_Present8Limited_Present#Component_" &
++ "List4Null_Present" &
++ -- Signed_Integer_Type_Definition
++ "#Low_Bound$High_Bound" &
++ -- Single_Protected_Declaration
++ "#Defining_Identifier%Protected_Definition" &
++ -- Subunit
++ "$Name#Proper_Body%Corresponding_Stub" &
++ -- Task_Definition
++ "$Visible_Declarations%Private_Declarations&End_Label-Has_Priority_Pra" &
++ "gma,Has_Storage_Size_Pragma.Has_Task_Info_Pragma/Has_Task_Name_Pra" &
++ "gma" &
++ -- Triggering_Alternative
++ "#Triggering_Statement%Statements&Pragmas_Before" &
++ -- Use_Type_Clause
++ "$Subtype_Marks%Next_Use_Clause&Hidden_By_Use_Clause" &
++ -- Validate_Unchecked_Conversion
++ "#Source_Type$Target_Type" &
++ -- Variant
++ "&Discrete_Choices#Component_List$Enclosing_Variant%Present_Expr'Dchec" &
++ "k_Function" &
++ -- Variant_Part
++ "$Name#Variants" &
++ -- With_Clause
++ "$Name&Library_Unit'Corresponding_Spec,First_Name-Last_Name4Context_In" &
++ "stalled+Elaborate_Present6Elaborate_All_Present7Implicit_With8Limi" &
++ "ted_Present9Limited_View_Installed.Unreferenced_In_Spec/No_Entitie" &
++ "s_Ref_In_Spec" &
++ -- With_Type_Clause
++ "$Name6Tagged_Present" &
++ -- Unused_At_End
++ "";
++
++ type Pchar_Pos_Array is array (Node_Kind) of Positive;
++ Pchar_Pos : constant Pchar_Pos_Array := Pchar_Pos_Array'(
++ N_Unused_At_Start => 1,
++ N_At_Clause => 1,
++ N_Component_Clause => 23,
++ N_Enumeration_Representation_Clause => 66,
++ N_Mod_Clause => 107,
++ N_Record_Representation_Clause => 133,
++ N_Attribute_Definition_Clause => 187,
++ N_Empty => 253,
++ N_Pragma => 253,
++ N_Pragma_Argument_Association => 312,
++ N_Error => 323,
++ N_Defining_Character_Literal => 323,
++ N_Defining_Identifier => 341,
++ N_Defining_Operator_Symbol => 359,
++ N_Expanded_Name => 377,
++ N_Identifier => 452,
++ N_Operator_Symbol => 528,
++ N_Character_Literal => 575,
++ N_Op_Add => 634,
++ N_Op_Concat => 634,
++ N_Op_Expon => 681,
++ N_Op_Subtract => 705,
++ N_Op_Divide => 705,
++ N_Op_Mod => 761,
++ N_Op_Multiply => 802,
++ N_Op_Rem => 840,
++ N_Op_And => 881,
++ N_Op_Eq => 897,
++ N_Op_Ge => 897,
++ N_Op_Gt => 897,
++ N_Op_Le => 897,
++ N_Op_Lt => 897,
++ N_Op_Ne => 897,
++ N_Op_Or => 897,
++ N_Op_Xor => 913,
++ N_Op_Rotate_Left => 929,
++ N_Op_Rotate_Right => 944,
++ N_Op_Shift_Left => 959,
++ N_Op_Shift_Right => 974,
++ N_Op_Shift_Right_Arithmetic => 989,
++ N_Op_Abs => 1004,
++ N_Op_Minus => 1004,
++ N_Op_Not => 1004,
++ N_Op_Plus => 1004,
++ N_Attribute_Reference => 1004,
++ N_And_Then => 1128,
++ N_Conditional_Expression => 1136,
++ N_Explicit_Dereference => 1174,
++ N_Function_Call => 1181,
++ N_In => 1323,
++ N_Indexed_Component => 1323,
++ N_Integer_Literal => 1342,
++ N_Not_In => 1378,
++ N_Null => 1378,
++ N_Or_Else => 1378,
++ N_Procedure_Call_Statement => 1386,
++ N_Qualified_Expression => 1528,
++ N_Raise_Constraint_Error => 1552,
++ N_Raise_Program_Error => 1569,
++ N_Raise_Storage_Error => 1586,
++ N_Aggregate => 1603,
++ N_Allocator => 1759,
++ N_Extension_Aggregate => 1836,
++ N_Range => 1939,
++ N_Real_Literal => 1980,
++ N_Reference => 2050,
++ N_Selected_Component => 2057,
++ N_Slice => 2141,
++ N_String_Literal => 2163,
++ N_Subprogram_Info => 2189,
++ N_Type_Conversion => 2200,
++ N_Unchecked_Expression => 2315,
++ N_Unchecked_Type_Conversion => 2326,
++ N_Subtype_Indication => 2381,
++ N_Component_Declaration => 2421,
++ N_Entry_Declaration => 2491,
++ N_Formal_Object_Declaration => 2583,
++ N_Formal_Type_Declaration => 2668,
++ N_Full_Type_Declaration => 2769,
++ N_Incomplete_Type_Declaration => 2857,
++ N_Loop_Parameter_Specification => 2935,
++ N_Object_Declaration => 2999,
++ N_Protected_Type_Declaration => 3246,
++ N_Private_Extension_Declaration => 3334,
++ N_Private_Type_Declaration => 3448,
++ N_Subtype_Declaration => 3574,
++ N_Function_Specification => 3648,
++ N_Procedure_Specification => 3740,
++ N_Entry_Index_Specification => 3819,
++ N_Freeze_Entity => 3867,
++ N_Access_Function_Definition => 3935,
++ N_Access_Procedure_Definition => 3991,
++ N_Task_Type_Declaration => 4034,
++ N_Package_Body_Stub => 4137,
++ N_Protected_Body_Stub => 4189,
++ N_Subprogram_Body_Stub => 4241,
++ N_Task_Body_Stub => 4287,
++ N_Function_Instantiation => 4339,
++ N_Package_Instantiation => 4425,
++ N_Procedure_Instantiation => 4511,
++ N_Package_Body => 4597,
++ N_Subprogram_Body => 4695,
++ N_Protected_Body => 4922,
++ N_Task_Body => 5004,
++ N_Implicit_Label_Declaration => 5142,
++ N_Package_Declaration => 5178,
++ N_Single_Task_Declaration => 5247,
++ N_Subprogram_Declaration => 5283,
++ N_Use_Package_Clause => 5343,
++ N_Generic_Package_Declaration => 5386,
++ N_Generic_Subprogram_Declaration => 5483,
++ N_Constrained_Array_Definition => 5556,
++ N_Unconstrained_Array_Definition => 5606,
++ N_Exception_Renaming_Declaration => 5641,
++ N_Object_Renaming_Declaration => 5666,
++ N_Package_Renaming_Declaration => 5738,
++ N_Subprogram_Renaming_Declaration => 5774,
++ N_Generic_Function_Renaming_Declaration => 5824,
++ N_Generic_Package_Renaming_Declaration => 5860,
++ N_Generic_Procedure_Renaming_Declaration => 5896,
++ N_Abort_Statement => 5932,
++ N_Accept_Statement => 5938,
++ N_Assignment_Statement => 6033,
++ N_Asynchronous_Select => 6119,
++ N_Block_Statement => 6157,
++ N_Case_Statement => 6322,
++ N_Code_Statement => 6355,
++ N_Conditional_Entry_Call => 6366,
++ N_Delay_Relative_Statement => 6405,
++ N_Delay_Until_Statement => 6416,
++ N_Entry_Call_Statement => 6427,
++ N_Free_Statement => 6474,
++ N_Goto_Statement => 6516,
++ N_Loop_Statement => 6536,
++ N_Null_Statement => 6621,
++ N_Raise_Statement => 6621,
++ N_Requeue_Statement => 6626,
++ N_Return_Statement => 6645,
++ N_Selective_Accept => 6719,
++ N_Timed_Entry_Call => 6755,
++ N_Exit_Statement => 6796,
++ N_If_Statement => 6811,
++ N_Accept_Alternative => 6874,
++ N_Delay_Alternative => 6950,
++ N_Elsif_Part => 7002,
++ N_Entry_Body_Formal_Part => 7046,
++ N_Iteration_Scheme => 7107,
++ N_Terminate_Alternative => 7164,
++ N_Abortable_Part => 7203,
++ N_Abstract_Subprogram_Declaration => 7214,
++ N_Access_Definition => 7228,
++ N_Access_To_Object_Definition => 7241,
++ N_Case_Statement_Alternative => 7289,
++ N_Compilation_Unit => 7317,
++ N_Compilation_Unit_Aux => 7456,
++ N_Component_Association => 7506,
++ N_Component_Definition => 7550,
++ N_Component_List => 7585,
++ N_Derived_Type_Definition => 7627,
++ N_Decimal_Fixed_Point_Definition => 7685,
++ N_Defining_Program_Unit_Name => 7745,
++ N_Delta_Constraint => 7770,
++ N_Designator => 7804,
++ N_Digits_Constraint => 7820,
++ N_Discriminant_Association => 7855,
++ N_Discriminant_Specification => 7881,
++ N_Enumeration_Type_Definition => 7948,
++ N_Entry_Body => 7967,
++ N_Entry_Call_Alternative => 8074,
++ N_Exception_Declaration => 8121,
++ N_Exception_Handler => 8170,
++ N_Floating_Point_Definition => 8235,
++ N_Formal_Decimal_Fixed_Point_Definition => 8278,
++ N_Formal_Derived_Type_Definition => 8278,
++ N_Formal_Discrete_Type_Definition => 8324,
++ N_Formal_Floating_Point_Definition => 8324,
++ N_Formal_Modular_Type_Definition => 8324,
++ N_Formal_Ordinary_Fixed_Point_Definition => 8324,
++ N_Formal_Package_Declaration => 8324,
++ N_Formal_Private_Type_Definition => 8411,
++ N_Formal_Signed_Integer_Type_Definition => 8459,
++ N_Formal_Subprogram_Declaration => 8459,
++ N_Generic_Association => 8498,
++ N_Handled_Sequence_Of_Statements => 8546,
++ N_Index_Or_Discriminant_Constraint => 8638,
++ N_Itype_Reference => 8650,
++ N_Label => 8656,
++ N_Modular_Type_Definition => 8682,
++ N_Number_Declaration => 8693,
++ N_Ordinary_Fixed_Point_Definition => 8742,
++ N_Others_Choice => 8784,
++ N_Package_Specification => 8819,
++ N_Parameter_Association => 8928,
++ N_Parameter_Specification => 8986,
++ N_Protected_Definition => 9115,
++ N_Range_Constraint => 9187,
++ N_Real_Range_Specification => 9204,
++ N_Record_Definition => 9225,
++ N_Signed_Integer_Type_Definition => 9311,
++ N_Single_Protected_Declaration => 9332,
++ N_Subunit => 9373,
++ N_Task_Definition => 9409,
++ N_Triggering_Alternative => 9547,
++ N_Use_Type_Clause => 9594,
++ N_Validate_Unchecked_Conversion => 9645,
++ N_Variant => 9669,
++ N_Variant_Part => 9748,
++ N_With_Clause => 9762,
++ N_With_Type_Clause => 9976,
++ N_Unused_At_End => 9996);
++
++end Treeprs;
--- /dev/null
+--- gcc-3.4-20040611/gcc/ada/Make-lang.in.orig 2004-06-09 11:20:41.000000000 +0200
++++ gcc-3.4-20040611/gcc/ada/Make-lang.in 2004-06-12 03:38:09.373698608 +0200
+@@ -446,7 +446,7 @@
+ ada/doctools/xgnatugn$(build_exeext): ada/xgnatugn.adb
+ -$(MKDIR) ada/doctools
+ $(CP) $^ ada/doctools
+- cd ada/doctools && gnatmake -q xgnatugn
++ cd ada/doctools && gnatmake -q xgnatugn -a0../rts
+
+ doc/gnat_ugn_unw.texi : ada/doctools/xgnatugn$(build_exeext) \
+ $(srcdir)/ada/gnat_ugn.texi $(srcdir)/ada/ug_words
--- /dev/null
+--- gcc-3.4.0/gcc/ada/link.c.orig Mon Jan 12 12:45:24 2004
++++ gcc-3.4.0/gcc/ada/link.c Tue Jun 1 15:57:42 2004
+@@ -165,9 +165,9 @@
+
+ #elif defined (linux)
+ const char *object_file_option = "";
+-const char *run_path_option = "-Wl,-rpath,";
+-char shared_libgnat_default = STATIC;
+-int link_max = 8192;
++const char *run_path_option = "";
++char shared_libgnat_default = SHARED;
++int link_max = 131072;
+ unsigned char objlist_file_supported = 1;
+ unsigned char using_gnu_linker = 1;
+ const char *object_library_extension = ".a";
+--- gcc-3.4.0/gcc/ada/Makefile.in.orig Mon Apr 26 11:19:09 2004
++++ gcc-3.4.0/gcc/ada/Makefile.in Tue Jun 1 15:58:33 2004
+@@ -142,7 +142,7 @@
+ objext = .o
+ exeext =
+ arext = .a
+-soext = .so
++soext = .so.1
+ shext =
+
+ # Define this as & to perform parallel make on a Sequent.
+@@ -1269,6 +1269,90 @@
+ LIBRARY_VERSION := $(LIB_VERSION)
+ endif
+
++ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
++ LIBGNAT_TARGET_PAIRS = \
++ a-intnam.ads<4lintnam.ads \
++ s-inmaop.adb<7sinmaop.adb \
++ s-intman.adb<7sintman.adb \
++ s-osinte.ads<5iosinte.ads \
++ s-osinte.adb<5iosinte.adb \
++ s-osprim.adb<7sosprim.adb \
++ s-taprop.adb<5itaprop.adb \
++ s-tpopsp.adb<5atpopsp.adb \
++ s-taspri.ads<5itaspri.ads \
++ system.ads<5nsystem.ads
++ TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
++ THREADSLIB=-lpthread
++ GNATLIB_SHARED=gnatlib-shared-dual
++ PREFIX_OBJS=$(PREFIX_REAL_OBJS)
++ LIBRARY_VERSION := $(LIB_VERSION)
++endif
++
++ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
++ LIBGNAT_TARGET_PAIRS = \
++ a-intnam.ads<4lintnam.ads \
++ s-inmaop.adb<7sinmaop.adb \
++ s-intman.adb<7sintman.adb \
++ s-osinte.ads<5iosinte.ads \
++ s-osinte.adb<5iosinte.adb \
++ s-osprim.adb<7sosprim.adb \
++ s-taprop.adb<5itaprop.adb \
++ s-tpopsp.adb<5atpopsp.adb \
++ s-taspri.ads<5itaspri.ads
++# system.ads<5ssystem.ads (Tick and Stack_Check_Probes differ)
++ TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
++ THREADSLIB=-lpthread
++ GNATLIB_SHARED=gnatlib-shared-dual
++ PREFIX_OBJS=$(PREFIX_REAL_OBJS)
++ LIBRARY_VERSION := $(LIB_VERSION)
++endif
++
++ifeq ($(strip $(filter-out ppc% linux%,$(arch) $(osys))),)
++ LIBGNAT_TARGET_PAIRS = \
++ a-intnam.ads<4lintnam.ads \
++ s-inmaop.adb<7sinmaop.adb \
++ s-intman.adb<7sintman.adb \
++ s-osinte.ads<5iosinte.ads \
++ s-osinte.adb<5iosinte.adb \
++ s-osprim.adb<7sosprim.adb \
++ s-taprop.adb<5itaprop.adb \
++ s-tpopsp.adb<5atpopsp.adb \
++ s-taspri.ads<5itaspri.ads
++# system.ads<59system.ads (???)
++ TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
++ THREADSLIB=-lpthread
++ GNATLIB_SHARED=gnatlib-shared-dual
++ PREFIX_OBJS=$(PREFIX_REAL_OBJS)
++ LIBRARY_VERSION := $(LIB_VERSION)
++endif
++
++ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
++ LIBGNAT_TARGET_PAIRS = \
++ a-intnam.ads<4lintnam.ads \
++ s-inmaop.adb<7sinmaop.adb \
++ s-intman.adb<7sintman.adb \
++ s-osinte.ads<5iosinte.ads \
++ s-osinte.adb<5iosinte.adb \
++ s-osprim.adb<7sosprim.adb \
++ s-taprop.adb<5itaprop.adb \
++ s-tpopsp.adb<5atpopsp.adb \
++ s-taspri.ads<5itaspri.ads
++# system.ads<59system.ads (???)
++ TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
++ THREADSLIB=-lpthread
++ GNATLIB_SHARED=gnatlib-shared-dual
++ PREFIX_OBJS=$(PREFIX_REAL_OBJS)
++ LIBRARY_VERSION := $(LIB_VERSION)
++endif
++
++ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
++ TOOLS_TARGET_PAIRS=mlib-tgt.adb<5lml-tgt.adb
++ THREADSLIB=-lpthread
++ GNATLIB_SHARED=gnatlib-shared-dual
++ PREFIX_OBJS=$(PREFIX_REAL_OBJS)
++ LIBRARY_VERSION := $(LIB_VERSION)
++endif
++
+ ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<4lintnam.ads \
+@@ -1767,6 +1840,9 @@
+ # is guaranteed to overflow the buffer.
+
+ gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
++ $(RMDIR) save
++ $(MKDIR) save
++ $(MV) *.o save/
+ $(MAKE) -C rts CC="../../xgcc -B../../" \
+ INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
+ CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \
+@@ -1779,6 +1855,8 @@
+ srcdir=$(fsrcdir) \
+ -f ../Makefile \
+ $(GNATRTL_OBJS)
++ $(MV) save/*.o .
++ $(RMDIR) save
+ $(RM) rts/libgnat$(arext) rts/libgnarl$(arext)
+ $(AR) $(AR_FLAGS) rts/libgnat$(arext) \
+ $(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
+@@ -1891,14 +1969,15 @@
+ THREAD_KIND="$(THREAD_KIND)" \
+ gnatlib
+ $(RM) rts/libgnat$(soext) rts/libgnarl$(soext)
+- cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
++ cd rts; ../../xgcc -B../../ -shared -shared-libgcc $(TARGET_LIBGCC2_CFLAGS) \
+ -o libgnat-$(LIBRARY_VERSION)$(soext) \
+ $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
+ $(SO_OPTS)libgnat-$(LIBRARY_VERSION)$(soext) $(MISCLIB) -lm
+ cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
+ -o libgnarl-$(LIBRARY_VERSION)$(soext) \
+ $(GNATRTL_TASKING_OBJS) \
+- $(SO_OPTS)libgnarl-$(LIBRARY_VERSION)$(soext) $(THREADSLIB)
++ $(SO_OPTS)libgnarl-$(LIBRARY_VERSION)$(soext) $(THREADSLIB) \
++ ./libgnat-$(LIBRARY_VERSION)$(soext)
+ cd rts; $(LN_S) libgnat-$(LIBRARY_VERSION)$(soext) libgnat$(soext)
+ cd rts; $(LN_S) libgnarl-$(LIBRARY_VERSION)$(soext) libgnarl$(soext)
+
--- /dev/null
+2005-02-18 Richard Henderson <rth@redhat.com>
+
+ PR libstdc++/10606
+ * config/linker-map.gnu (CXXABI_1.3.1): Add __cxa_get_exception_ptr.
+ * libsupc++/eh_catch.cc (__cxa_get_exception_ptr): New.
+ * libsupc++/unwind-cxx.h (__cxa_get_exception_ptr): Declare.
+
+--- libstdc++-v3/config/linker-map.gnu (revision 94498)
++++ libstdc++-v3/config/linker-map.gnu (revision 95705)
+@@ -406,3 +410,9 @@ CXXABI_1.3 {
+ local:
+ *;
+ };
++
++CXXABI_1.3.1 {
++
++ __cxa_get_exception_ptr;
++
++} CXXABI_1.3;
+--- libstdc++-v3/libsupc++/unwind-cxx.h (revision 94498)
++++ libstdc++-v3/libsupc++/unwind-cxx.h (revision 95705)
+@@ -107,6 +107,7 @@ extern "C" void __cxa_throw (void *throw
+ __attribute__((noreturn));
+
+ // Used to implement exception handlers.
++extern "C" void *__cxa_get_exception_ptr (void *) throw();
+ extern "C" void *__cxa_begin_catch (void *) throw();
+ extern "C" void __cxa_end_catch ();
+ extern "C" void __cxa_rethrow () __attribute__((noreturn));
+--- libstdc++-v3/libsupc++/eh_catch.cc (revision 94498)
++++ libstdc++-v3/libsupc++/eh_catch.cc (revision 95705)
+@@ -33,6 +33,15 @@
+
+ using namespace __cxxabiv1;
+
++extern "C" void *
++__cxxabiv1::__cxa_get_exception_ptr(void *exc_obj_in) throw()
++{
++ _Unwind_Exception *exceptionObject
++ = reinterpret_cast <_Unwind_Exception *>(exc_obj_in);
++ __cxa_exception *header = __get_exception_header_from_ue (exceptionObject);
++
++ return header->adjustedPtr;
++}
+
+ extern "C" void *
+ __cxxabiv1::__cxa_begin_catch (void *exc_obj_in) throw()
--- /dev/null
+AC_DEFUN([HIDE_INLINES], [
+ visibility_inlines_hidden=yes
+ if test "X$CXX" != "X"; then
+ AC_MSG_CHECKING([whether ${CXX} accepts -fvisbility-inlines-hidden])
+ visbility_old_cxxflags="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+ AC_TRY_COMPILE(, , , visibility_inlines_hidden=no)
+ echo $visibility_inlines_hidden
+ if test "X$visibility_inlines_hidden" = "Xno"; then
+ CXXFLAGS="$visibility_old_cxxflags"
+ fi
+ fi
+])
+
+AC_DEFUN([HIDDEN_ATTRIBUTE], [
+ if test "X$CC" != "X"; then
+ AC_MSG_CHECKING([GCC visibility attribute])
+ AC_TRY_COMPILE(
+ [int __attribute__((visibility("hidden"))) test();],
+ [],
+ AC_DEFINE(HAVE_HIDDEN_ATTRIBUTE, 1, [])
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no)
+ )
+ fi
+])
--- /dev/null
+--- gcc-3.4-20040611/gcc/doc/cpp.texi.orig 2004-01-18 12:59:03.000000000 +0100
++++ gcc-3.4-20040611/gcc/doc/cpp.texi 2004-06-12 03:49:21.959450032 +0200
+@@ -52,9 +52,9 @@
+ @set cppmanual
+
+ @ifinfo
+-@dircategory Programming
++@dircategory Programming Languages
+ @direntry
+-* Cpp: (cpp). The GNU C preprocessor.
++* Cpp: (cpp). The GNU C preprocessor.
+ @end direntry
+ @end ifinfo
+
+--- gcc-3.4-20040611/gcc/doc/cppinternals.texi.orig 2002-01-07 20:03:36.000000000 +0100
++++ gcc-3.4-20040611/gcc/doc/cppinternals.texi 2004-06-12 03:50:08.394390848 +0200
+@@ -3,9 +3,9 @@
+ @settitle The GNU C Preprocessor Internals
+
+ @ifinfo
+-@dircategory Programming
++@dircategory Programming Languages
+ @direntry
+-* Cpplib: (cppinternals). Cpplib internals.
++* Cpplib: (cppinternals). Cpplib internals.
+ @end direntry
+ @end ifinfo
+
+--- gcc-3.2/gcc/doc/gcc.texi.orig Fri Nov 1 22:58:48 2002
++++ gcc-3.2/gcc/doc/gcc.texi Fri Nov 1 23:06:12 2002
+@@ -65,9 +65,9 @@
+ 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ @end macro
+ @ifnottex
+-@dircategory Programming
++@dircategory Programming Languages:
+ @direntry
+-* gcc: (gcc). The GNU Compiler Collection.
++* gcc: (gcc). The GNU Compiler Collection
+ @end direntry
+ This file documents the use of the GNU compilers.
+ @sp 1
+--- gcc-3.2/gcc/doc/gccint.texi.orig Wed Jan 23 18:30:28 2002
++++ gcc-3.2/gcc/doc/gccint.texi Fri Nov 1 23:06:57 2002
+@@ -51,9 +51,9 @@
+ 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ @end macro
+ @ifnottex
+-@dircategory Programming
++@dircategory Programming Languages:
+ @direntry
+-* gccint: (gccint). Internals of the GNU Compiler Collection.
++* gccint: (gccint). Internals of the GNU Compiler Collection
+ @end direntry
+ This file documents the internals of the GNU compilers.
+ @sp 1
+--- gcc-3.4-20040611/gcc/ada/gnat-style.texi.orig 2004-06-09 11:20:43.000000000 +0200
++++ gcc-3.4-20040611/gcc/ada/gnat-style.texi 2004-06-12 03:22:07.287957872 +0200
+@@ -28,9 +28,9 @@
+ @setchapternewpage odd
+
+
+-@dircategory Programming
++@dircategory Programming Languages
+ @direntry
+-* gnat-style: (gnat-style). GNAT Coding Style
++* gnat-style: (gnat-style). GNAT Coding Style
+ @end direntry
+
+ @macro syntax{element}
+--- gcc-3.4-20040611/gcc/ada/gnat_ugn.texi.orig Fri Nov 1 22:58:52 2002
++++ gcc-3.4-20040611/gcc/ada/gnat_ugn.texi Fri Nov 1 23:10:20 2002
+@@ -75,6 +75,11 @@
+ @syncodeindex fn cp
+ @c %**end of header
+
++@dircategory Programming Languages:
++@direntry
++* gnat_ug: (gnat_ug). GNAT User's Guide
++@end direntry
++
+ @titlepage
+
+ @ifset vms
+--- gcc-3.2/gcc/f/g77.texi.orig Mon Apr 29 09:58:32 2002
++++ gcc-3.2/gcc/f/g77.texi Fri Nov 1 23:11:56 2002
+@@ -90,9 +90,9 @@
+ @c @end tex
+
+ @ifinfo
+-@dircategory Programming
++@dircategory Programming Languages:
+ @direntry
+-* g77: (g77). The GNU Fortran compiler.
++* g77: (g77). The GNU Fortran compiler
+ @end direntry
+ @ifset INTERNALS
+ @ifset USING
+--- gcc-3.2/gcc/java/gcj.texi.orig Sun Aug 4 18:55:55 2002
++++ gcc-3.2/gcc/java/gcj.texi Fri Nov 1 23:16:39 2002
+@@ -20,26 +20,20 @@
+
+ @ifinfo
+ @format
+-@dircategory Programming
++@dircategory Programming Languages:
+ @direntry
+-* Gcj: (gcj). Ahead-of-time compiler for the Java language
++* Gcj: (gcj). Ahead-of-time compiler for the Java language
+ @end direntry
+
+-@dircategory Individual utilities
++@dircategory Programming tools:
+ @direntry
+-* gcjh: (gcj)Invoking gcjh.
+- Generate header files from Java class files
+-* jv-scan: (gcj)Invoking jv-scan.
+- Print information about Java source files
+-* jcf-dump: (gcj)Invoking jcf-dump.
+- Print information about Java class files
+-* gij: (gcj)Invoking gij. GNU interpreter for Java bytecode
+-* jv-convert: (gcj)Invoking jv-convert.
+- Convert file from one encoding to another
+-* rmic: (gcj)Invoking rmic.
+- Generate stubs for Remote Method Invocation.
+-* rmiregistry: (gcj)Invoking rmiregistry.
+- The remote object registry.
++* gcjh: (gcj)gcjh. Generate header files from Java class files
++* jv-scan: (gcj)jv-scan. Print information about Java source files
++* jcf-dump: (gcj)jcf-dump. Print information about Java class files
++* gij: (gcj)gij. GNU interpreter for Java bytecode
++* jv-convert: (gcj)jv-convert. Convert file from one encoding to another
++* rmic: (gcj)rmic. Generate stubs for Remote Method Invocation.
++* rmiregistry: (gcj)rmiregistry. The remote object registry
+ @end direntry
+ @end format
+
+@@ -120,15 +114,15 @@
+ * Copying:: The GNU General Public License
+ * GNU Free Documentation License::
+ How you can share and copy this manual
+-* Invoking gcj:: Compiler options supported by @command{gcj}
++* gcj:: Compiler options supported by @command{gcj}
+ * Compatibility:: Compatibility between gcj and other tools for Java
+-* Invoking gcjh:: Generate header files from class files
+-* Invoking jv-scan:: Print information about source files
+-* Invoking jcf-dump:: Print information about class files
+-* Invoking gij:: Interpreting Java bytecodes
+-* Invoking jv-convert:: Converting from one encoding to another
+-* Invoking rmic:: Generate stubs for Remote Method Invocation.
+-* Invoking rmiregistry:: The remote object registry.
++* gcjh:: Generate header files from class files
++* jv-scan:: Print information about source files
++* jcf-dump:: Print information about class files
++* gij:: Interpreting Java bytecodes
++* jv-convert:: Converting from one encoding to another
++* rmic:: Generate stubs for Remote Method Invocation.
++* rmiregistry:: The remote object registry.
+ * About CNI:: Description of the Compiled Native Interface
+ * System properties:: Modifying runtime behavior of the libgcj library
+ * Resources:: Where to look for more information
+@@ -139,7 +133,7 @@
+ @include fdl.texi
+
+
+-@node Invoking gcj
++@node gcj
+ @chapter Invoking gcj
+
+ @c man title gcj Ahead-of-time compiler for the Java language
+@@ -506,7 +500,7 @@
+ @end itemize
+
+
+-@node Invoking gcjh
++@node gcjh
+ @chapter Invoking gcjh
+
+ @c man title gcjh generate header files from Java class files
+@@ -607,7 +601,7 @@
+
+ @c man end
+
+-@node Invoking jv-scan
++@node jv-scan
+ @chapter Invoking jv-scan
+
+ @c man title jv-scan print information about Java source file
+@@ -665,7 +659,7 @@
+
+ @c man end
+
+-@node Invoking jcf-dump
++@node jcf-dump
+ @chapter Invoking jcf-dump
+
+ @c man title jcf-dump print information about Java class files
+@@ -720,7 +714,7 @@
+
+ @c man end
+
+-@node Invoking gij
++@node gij
+ @chapter Invoking gij
+
+ @c man title gij GNU interpreter for Java bytecode
+@@ -798,7 +792,7 @@
+
+ @c man end
+
+-@node Invoking jv-convert
++@node jv-convert
+ @chapter Invoking jv-convert
+
+ @c man title jv-convert Convert file from one encoding to another
+@@ -857,7 +851,7 @@
+
+ @c man end
+
+-@node Invoking rmic
++@node rmic
+ @chapter Invoking rmic
+
+ @c man title rmic Generate stubs for Remote Method Invocation
+@@ -936,7 +930,7 @@
+ @c man end
+
+
+-@node Invoking rmiregistry
++@node rmiregistry
+ @chapter Invoking rmiregistry
+
+ @c man title rmiregistry Remote object registry
--- /dev/null
+--- gcc-3.3.3/gcc/Makefile.in.orig 2004-02-16 18:57:42.824016056 +0100
++++ gcc-3.3.3/gcc/Makefile.in 2004-02-16 18:59:52.167352880 +0100
+@@ -65,9 +65,9 @@
+ # TCFLAGS is used for compilations with the GCC just built.
+ XCFLAGS =
+ TCFLAGS =
+-CFLAGS = -g
+-STAGE1_CFLAGS = -g @stage1_cflags@
+-BOOT_CFLAGS = -g -O2
++CFLAGS =
++STAGE1_CFLAGS = @stage1_cflags@
++BOOT_CFLAGS = -O2
+
+ # Flags to determine code coverage. When coverage is disabled, this will
+ # contain the optimization flags, as you normally want code coverage
+@@ -390,7 +390,7 @@
+
+ # Options to use when compiling libgcc2.a.
+ #
+-LIBGCC2_DEBUG_CFLAGS = -g
++LIBGCC2_DEBUG_CFLAGS =
+ LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@
+
+ # Additional options to use when compiling libgcc2.a.
+--- gcc-3.3.3/gcc/ada/Makefile.in.orig 2004-02-16 08:29:33.000000000 +0100
++++ gcc-3.3.3/gcc/ada/Makefile.in 2004-02-16 19:04:55.708207656 +0100
+@@ -73,7 +73,7 @@
+ # to the stage2 and stage3 compilations
+ # XCFLAGS is used for most compilations but not when using the GCC just built.
+ XCFLAGS =
+-CFLAGS = -g
++CFLAGS =
+ BOOT_CFLAGS = -O $(CFLAGS)
+ # These exists to be overridden by the x-* and t-* files, respectively.
+ X_CFLAGS =
+@@ -127,7 +127,7 @@
+ SOME_ADAFLAGS =-gnata
+ FORCE_DEBUG_ADAFLAGS = -g
+ GNATLIBFLAGS = -gnatpg
+-GNATLIBCFLAGS = -g -O2
++GNATLIBCFLAGS = -O2
+ GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
+ -DIN_RTS
+ ALL_ADA_CFLAGS = $(X_ADA_CFLAGS) $(T_ADA_CFLAGS) $(ADA_CFLAGS)
+--- gcc-3.3.3/libjava/Makefile.am.orig 2004-02-16 08:29:34.000000000 +0100
++++ gcc-3.3.3/libjava/Makefile.am 2004-02-16 19:02:25.582030304 +0100
+@@ -95,7 +95,7 @@
+ AM_CFLAGS = @LIBGCJ_CFLAGS@
+ endif
+
+-JCFLAGS = -g
++JCFLAGS =
+ JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
+
+ LIBFFIINCS = @LIBFFIINCS@
+--- gcc-3.3.3/libjava/Makefile.in.orig 2004-02-16 08:29:34.000000000 +0100
++++ gcc-3.3.3/libjava/Makefile.in 2004-02-16 19:02:31.196176824 +0100
+@@ -180,7 +180,7 @@
+ @USING_GCC_TRUE@AM_CFLAGS = @USING_GCC_TRUE@@LIBGCJ_CFLAGS@ $(WARNINGS)
+ @USING_GCC_FALSE@AM_CFLAGS = @USING_GCC_FALSE@@LIBGCJ_CFLAGS@
+
+-JCFLAGS = -g
++JCFLAGS =
+ JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
+
+ LIBFFIINCS = @LIBFFIINCS@
--- /dev/null
+--- gcc-3.2/libstdc++-v3/configure.orig Sat Jul 27 01:23:04 2002
++++ gcc-3.2/libstdc++-v3/configure Thu Aug 22 08:03:18 2002
+@@ -2957,7 +2957,7 @@
+ int j;
+ __locale_t loc;
+ __locale_t loc_dup;
+- loc = __newlocale(1 << LC_ALL, "de_DE", 0);
++ loc = __newlocale(1 << LC_ALL, "C", 0);
+ loc_dup = __duplocale(loc);
+ i = __strcoll_l(__one, __two, loc);
+ j = __strcoll_l(__one, __two, loc_dup);
--- /dev/null
+2006-02-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR libstdc++/11953
+ * gthr-posix.h (_REENTRANT): Only define if __osf__ is defined.
+
+ * config/ia64/linux.h (CPP_SPEC): Define.
+ * config/s390/linux.h (CPP_SPEC): Define.
+
+--- gcc/gthr-posix.h (revision 111211)
++++ gcc/gthr-posix.h (revision 111212)
+@@ -36,7 +36,7 @@ Software Foundation, 51 Franklin Street,
+ #define __GTHREADS 1
+
+ /* Some implementations of <pthread.h> require this to be defined. */
+-#ifndef _REENTRANT
++#if !defined(_REENTRANT) && defined(__osf__)
+ #define _REENTRANT 1
+ #endif
+
+--- gcc/config/s390/linux.h (revision 111211)
++++ gcc/config/s390/linux.h (revision 111212)
+@@ -89,6 +89,7 @@ Software Foundation, 51 Franklin Street,
+ %{m31:-dynamic-linker /lib/ld.so.1} \
+ %{m64:-dynamic-linker /lib64/ld64.so.1}}}}"
+
++#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+
+ #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+
+--- gcc/config/ia64/linux.h (revision 111211)
++++ gcc/config/ia64/linux.h (revision 111212)
+@@ -48,6 +48,7 @@ do { \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
+ %{static:-static}}"
+
++#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+
+ #define JMP_BUF_SIZE 76
+
+2004-05-27 Josef Zlomek <zlomekj@suse.cz>
+
+ PR middle-end/14084
+ * emit-rtl.c (gen_rtx_REG_offset): Adjust the offset according
+ to size of decl.
+
+--- gcc/emit-rtl.c 25 May 2004 12:04:15 -0000 1.391
++++ gcc/emit-rtl.c 27 May 2004 04:28:12 -0000 1.392
+@@ -746,13 +746,96 @@ gen_reg_rtx (enum machine_mode mode)
+ return val;
+ }
+
+-/* Generate a register with same attributes as REG,
+- but offsetted by OFFSET. */
++/* Generate a register with same attributes as REG, but offsetted by OFFSET.
++ Do the big endian correction if needed. */
+
+ rtx
+ gen_rtx_REG_offset (rtx reg, enum machine_mode mode, unsigned int regno, int offset)
+ {
+ rtx new = gen_rtx_REG (mode, regno);
++ tree decl;
++ HOST_WIDE_INT var_size;
++
++ /* PR middle-end/14084
++ The problem appears when a variable is stored in a larger register
++ and later it is used in the original mode or some mode in between
++ or some part of variable is accessed.
++
++ On little endian machines there is no problem because
++ the REG_OFFSET of the start of the variable is the same when
++ accessed in any mode (it is 0).
++
++ However, this is not true on big endian machines.
++ The offset of the start of the variable is different when accessed
++ in different modes.
++ When we are taking a part of the REG we have to change the OFFSET
++ from offset WRT size of mode of REG to offset WRT size of variable.
++
++ If we would not do the big endian correction the resulting REG_OFFSET
++ would be larger than the size of the DECL.
++
++ Examples of correction, for BYTES_BIG_ENDIAN WORDS_BIG_ENDIAN machine:
++
++ REG.mode MODE DECL size old offset new offset description
++ DI SI 4 4 0 int32 in SImode
++ DI SI 1 4 0 char in SImode
++ DI QI 1 7 0 char in QImode
++ DI QI 4 5 1 1st element in QImode
++ of char[4]
++ DI HI 4 6 2 1st element in HImode
++ of int16[2]
++
++ If the size of DECL is equal or greater than the size of REG
++ we can't do this correction because the register holds the
++ whole variable or a part of the variable and thus the REG_OFFSET
++ is already correct. */
++
++ decl = REG_EXPR (reg);
++ if ((BYTES_BIG_ENDIAN || WORDS_BIG_ENDIAN)
++ && decl != NULL
++ && offset > 0
++ && GET_MODE_SIZE (GET_MODE (reg)) > GET_MODE_SIZE (mode)
++ && ((var_size = int_size_in_bytes (TREE_TYPE (decl))) > 0
++ && var_size < GET_MODE_SIZE (GET_MODE (reg))))
++ {
++ int offset_le;
++
++ /* Convert machine endian to little endian WRT size of mode of REG. */
++ if (WORDS_BIG_ENDIAN)
++ offset_le = ((GET_MODE_SIZE (GET_MODE (reg)) - 1 - offset)
++ / UNITS_PER_WORD) * UNITS_PER_WORD;
++ else
++ offset_le = (offset / UNITS_PER_WORD) * UNITS_PER_WORD;
++
++ if (BYTES_BIG_ENDIAN)
++ offset_le += ((GET_MODE_SIZE (GET_MODE (reg)) - 1 - offset)
++ % UNITS_PER_WORD);
++ else
++ offset_le += offset % UNITS_PER_WORD;
++
++ if (offset_le >= var_size)
++ {
++ /* MODE is wider than the variable so the new reg will cover
++ the whole variable so the resulting OFFSET should be 0. */
++ offset = 0;
++ }
++ else
++ {
++ /* Convert little endian to machine endian WRT size of variable. */
++ if (WORDS_BIG_ENDIAN)
++ offset = ((var_size - 1 - offset_le)
++ / UNITS_PER_WORD) * UNITS_PER_WORD;
++ else
++ offset = (offset_le / UNITS_PER_WORD) * UNITS_PER_WORD;
++
++ if (BYTES_BIG_ENDIAN)
++ offset += ((var_size - 1 - offset_le)
++ % UNITS_PER_WORD);
++ else
++ offset += offset_le % UNITS_PER_WORD;
++ }
++ }
++
+ REG_ATTRS (new) = get_reg_attrs (REG_EXPR (reg),
+ REG_OFFSET (reg) + offset);
+ return new;
+2005-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/16104
+ * expr.c (convert_move): Handle vector from resp. to if mode
+ sizes differ.
+
+ * gcc.c-torture/execute/20050113-1.c: New test.
+
+--- gcc/expr.c.jj 2004-12-27 21:31:08.000000000 +0100
++++ gcc/expr.c 2005-01-13 15:56:31.229253647 +0100
+@@ -590,7 +590,26 @@ convert_move (rtx to, rtx from, int unsi
+ if (VECTOR_MODE_P (to_mode) || VECTOR_MODE_P (from_mode))
+ {
+ if (GET_MODE_BITSIZE (from_mode) != GET_MODE_BITSIZE (to_mode))
+- abort ();
++ {
++ if (VECTOR_MODE_P (from_mode))
++ {
++ enum machine_mode new_mode;
++
++ new_mode = mode_for_size (GET_MODE_BITSIZE (from_mode),
++ MODE_INT, 0);
++ from = simplify_gen_subreg (new_mode, from, from_mode, 0);
++ }
++ if (VECTOR_MODE_P (to_mode))
++ {
++ enum machine_mode new_mode;
++
++ new_mode = mode_for_size (GET_MODE_BITSIZE (to_mode),
++ MODE_INT, 0);
++ to = simplify_gen_subreg (new_mode, to, to_mode, 0);
++ }
++ convert_move (to, from, unsignedp);
++ return;
++ }
+
+ if (VECTOR_MODE_P (to_mode))
+ from = simplify_gen_subreg (to_mode, from, GET_MODE (from), 0);
+--- gcc/testsuite/gcc.c-torture/execute/20050113-1.c.jj 2005-01-13 15:51:09.194383356 +0100
++++ gcc/testsuite/gcc.c-torture/execute/20050113-1.c 2005-01-13 15:37:22.000000000 +0100
+@@ -0,0 +1,56 @@
++/* PR rtl-optimization/16104 */
++
++extern void abort (void);
++
++typedef int V2SI __attribute__ ((vector_size (8)));
++typedef short V2HI __attribute__ ((vector_size (4)));
++
++int
++test1 (void)
++{
++ return (long long) (V2SI) 0LL;
++}
++
++int
++test2 (V2SI x)
++{
++ return (long long) x;
++}
++
++V2SI
++test3 (void)
++{
++ return (V2SI) (long long) (int) (V2HI) 0;
++}
++
++V2SI
++test4 (V2HI x)
++{
++ return (V2SI) (long long) (int) x;
++}
++
++int
++main (void)
++{
++ if (sizeof (short) != 2 || sizeof (int) != 4 || sizeof (long long) != 8)
++ return 0;
++
++ if (test1 () != 0)
++ abort ();
++
++ V2SI x = { 2, 2 };
++ if (test2 (x) != 2)
++ abort ();
++
++ union { V2SI x; int y[2]; } u;
++ u.x = test3 ();
++ if (u.y[0] != 0 || u.y[1] != 0)
++ abort ();
++
++ V2HI y = { 4, 4 };
++ union { V2SI x; long long y; } v;
++ v.x = test4 (y);
++ if (v.y != 0x40004)
++ abort ();
++ return 0;
++}
+2005-09-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/18300
+ * config/i386/i386.c (classify_argument): Only use different
+ iterators for nested loops if nested loops sharing the same
+ iterator would hang.
+
+2004-11-13 Zak Kipling <zak@transversal.com>
+
+ PR target/18300
+ * config/i386/i386.c (classify_argument): Fix infinite loop when
+ passing object with 3 or more base classes by value.
+
+--- gcc/config/i386/i386.c.jj 2005-07-21 11:01:36.000000000 +0200
++++ gcc/config/i386/i386.c 2005-09-07 14:22:19.000000000 +0200
+@@ -2028,8 +2028,17 @@ classify_argument (enum machine_mode mod
+ {
+ tree bases = TYPE_BINFO_BASETYPES (type);
+ int n_bases = TREE_VEC_LENGTH (bases);
+- int i;
+-
++ int i, basenum;
++ enum x86_64_reg_class saveclasses[MAX_CLASSES];
++ bool seen[MAX_CLASSES];
++
++ /* PR target/18300: The following code mistakenly uses the same
++ iterator variable in both nested for loops. But to preserve
++ binary compatibility, do whatever this code used to do before
++ unless old GCC would hang in an infinite loop. In that case
++ use whatever GCC 4.0+ does. */
++ memset (seen, 0, sizeof (seen));
++ memcpy (saveclasses, classes, sizeof (saveclasses));
+ for (i = 0; i < n_bases; ++i)
+ {
+ tree binfo = TREE_VEC_ELT (bases, i);
+@@ -2037,6 +2046,12 @@ classify_argument (enum machine_mode mod
+ int offset = tree_low_cst (BINFO_OFFSET (binfo), 0) * 8;
+ tree type = BINFO_TYPE (binfo);
+
++ if (i < MAX_CLASSES)
++ {
++ if (seen[i])
++ break;
++ seen[i] = true;
++ }
+ num = classify_argument (TYPE_MODE (type),
+ type, subclasses,
+ (offset + bit_offset) % 256);
+@@ -2049,6 +2064,32 @@ classify_argument (enum machine_mode mod
+ merge_classes (subclasses[i], classes[i + pos]);
+ }
+ }
++ if (i < n_bases)
++ {
++ /* Older GCC 3.[0-4].x would hang in the above loop, so
++ don't worry about backwards compatibility and
++ just DTRT. */
++ memcpy (classes, saveclasses, sizeof (saveclasses));
++ for (basenum = 0; basenum < n_bases; ++basenum)
++ {
++ tree binfo = TREE_VEC_ELT (bases, basenum);
++ int num;
++ int offset = tree_low_cst (BINFO_OFFSET (binfo), 0) * 8;
++ tree type = BINFO_TYPE (binfo);
++
++ num = classify_argument (TYPE_MODE (type),
++ type, subclasses,
++ (offset + bit_offset) % 256);
++ if (!num)
++ return 0;
++ for (i = 0; i < num; i++)
++ {
++ int pos = (offset + (bit_offset % 64)) / 8 / 8;
++ classes[i + pos] =
++ merge_classes (subclasses[i], classes[i + pos]);
++ }
++ }
++ }
+ }
+ /* And now merge the fields of structure. */
+ for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
+@@ -2116,8 +2157,17 @@ classify_argument (enum machine_mode mod
+ {
+ tree bases = TYPE_BINFO_BASETYPES (type);
+ int n_bases = TREE_VEC_LENGTH (bases);
+- int i;
+-
++ int i, basenum;
++ enum x86_64_reg_class saveclasses[MAX_CLASSES];
++ bool seen[MAX_CLASSES];
++
++ /* PR target/18300: The following code mistakenly uses the same
++ iterator variable in both nested for loops. But to preserve
++ binary compatibility, do whatever this code used to do before
++ unless old GCC would hang in an infinite loop. In that case
++ use whatever GCC 4.0+ does. */
++ memset (seen, 0, sizeof (seen));
++ memcpy (saveclasses, classes, sizeof (saveclasses));
+ for (i = 0; i < n_bases; ++i)
+ {
+ tree binfo = TREE_VEC_ELT (bases, i);
+@@ -2125,6 +2175,12 @@ classify_argument (enum machine_mode mod
+ int offset = tree_low_cst (BINFO_OFFSET (binfo), 0) * 8;
+ tree type = BINFO_TYPE (binfo);
+
++ if (i < MAX_CLASSES)
++ {
++ if (seen[i])
++ break;
++ seen[i] = true;
++ }
+ num = classify_argument (TYPE_MODE (type),
+ type, subclasses,
+ (offset + (bit_offset % 64)) % 256);
+@@ -2137,6 +2193,32 @@ classify_argument (enum machine_mode mod
+ merge_classes (subclasses[i], classes[i + pos]);
+ }
+ }
++ if (i < n_bases)
++ {
++ /* Older GCC 3.[0-4].x would hang in the above loop, so
++ don't worry about backwards compatibility and
++ just DTRT. */
++ memcpy (classes, saveclasses, sizeof (saveclasses));
++ for (basenum = 0; basenum < n_bases; ++basenum)
++ {
++ tree binfo = TREE_VEC_ELT (bases, basenum);
++ int num;
++ int offset = tree_low_cst (BINFO_OFFSET (binfo), 0) * 8;
++ tree type = BINFO_TYPE (binfo);
++
++ num = classify_argument (TYPE_MODE (type),
++ type, subclasses,
++ (offset + (bit_offset % 64)) % 256);
++ if (!num)
++ return 0;
++ for (i = 0; i < num; i++)
++ {
++ int pos = (offset + (bit_offset % 64)) / 8 / 8;
++ classes[i + pos] =
++ merge_classes (subclasses[i], classes[i + pos]);
++ }
++ }
++ }
+ }
+ for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
+ {
+--- gcc/testsuite/g++.dg/other/infloop-1.C 1 Jan 1970 00:00:00 -0000
++++ gcc/testsuite/g++.dg/other/infloop-1.C 13 Nov 2004 23:09:08 -0000 1.1
+@@ -0,0 +1,16 @@
++// PR 18300: This sends old compilers into an infinite loop on x86_64
++// Testcase and patch contributed by Zak Kipling <zak@transversal.com>
++
++struct base1 { };
++struct base2 { };
++struct base3 { };
++
++struct derived : base1, base2, base3 { };
++
++void foo(derived);
++
++int main()
++{
++ foo(derived());
++}
++
+--- gcc/testsuite/g++.dg/ext/visibility/staticdatamem.C 1 Jan 1970 00:00:00 -0000
++++ gcc/testsuite/g++.dg/ext/visibility/staticdatamem.C 14 Dec 2004 02:15:55 -0000 1.1
+@@ -0,0 +1,20 @@
++// PR c++/18925
++// { dg-do compile { target ia64-*-linux* } }
++// { dg-options "-fPIC -fvisibility=hidden" }
++// { dg-final { scan-assembler-not "gprel" } }
++
++class __attribute__ ((visibility("default"))) Type
++{
++ private:
++ static long _staticTypeCount;
++ public:
++ Type() { _staticTypeCount++; }
++ ~Type();
++};
++
++long Type::_staticTypeCount = 0;
++
++Type::~Type()
++{
++ _staticTypeCount--;
++}
+2005-05-07 Richard Henderson <rth@redhat.com>
+
+ PR target/21412
+ * config/rs6000/rs6000.c (rs6000_emit_move): Look for tls addresses
+ with constant offsets.
+
+2004-07-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config/s390/s390.c (legitimize_tls_address): Handle constant offsets
+ added to TLS symbol addresses.
+
+2004-07-06 Richard Henderson <rth@redhat.com>
+
+ * config/i386/i386.c (legitimize_address): Handle CONST with TLS
+ operand.
+ (ix86_expand_move): Don't call legitimize_pic_address directly.
+
+2006-05-05 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/tls/opt-12.c: New test.
+
+--- gcc/config/s390/s390.c (revision 84404)
++++ gcc/config/s390/s390.c (revision 84535)
+@@ -2913,6 +2913,18 @@ legitimize_tls_address (rtx addr, rtx re
+ }
+ }
+
++ else if (GET_CODE (addr) == CONST && GET_CODE (XEXP (addr, 0)) == PLUS
++ && GET_CODE (XEXP (XEXP (addr, 0), 1)) == CONST_INT)
++ {
++ new = XEXP (XEXP (addr, 0), 0);
++ if (GET_CODE (new) != SYMBOL_REF)
++ new = gen_rtx_CONST (Pmode, new);
++
++ new = legitimize_tls_address (new, reg);
++ new = plus_constant (new, INTVAL (XEXP (XEXP (addr, 0), 1)));
++ new = force_operand (new, 0);
++ }
++
+ else
+ abort (); /* for now ... */
+
+--- gcc/config/i386/i386.c 2005-11-21 14:56:49.000000000 +0100
++++ gcc/config/i386/i386.c 2006-05-05 11:21:54.000000000 +0200
+@@ -6604,6 +6604,13 @@ legitimize_address (rtx x, rtx oldx ATTR
+ log = tls_symbolic_operand (x, mode);
+ if (log)
+ return legitimize_tls_address (x, log, false);
++ if (GET_CODE (x) == CONST
++ && GET_CODE (XEXP (x, 0)) == PLUS
++ && (log = tls_symbolic_operand (XEXP (XEXP (x, 0), 0), Pmode)))
++ {
++ rtx t = legitimize_tls_address (XEXP (XEXP (x, 0), 0), log, false);
++ return gen_rtx_PLUS (Pmode, t, XEXP (XEXP (x, 0), 1));
++ }
+
+ if (flag_pic && SYMBOLIC_CONST (x))
+ return legitimize_pic_address (x, 0);
+@@ -8395,6 +8402,10 @@ ix86_expand_move (enum machine_mode mode
+ #else
+ if (GET_CODE (op0) == MEM)
+ op1 = force_reg (Pmode, op1);
++ else if (GET_CODE (op1) == CONST
++ && GET_CODE (XEXP (op1, 0)) == PLUS
++ && tls_symbolic_operand (XEXP (XEXP (op1, 0), 0), Pmode))
++ op1 = legitimize_address (op1, op1, Pmode);
+ else
+ {
+ rtx temp = op0;
+--- gcc/config/rs6000/rs6000.c (revision 99334)
++++ gcc/config/rs6000/rs6000.c (revision 99367)
+@@ -4436,11 +4436,31 @@ rs6000_emit_move (rtx dest, rtx source,
+
+ /* Recognize the case where operand[1] is a reference to thread-local
+ data and load its address to a register. */
+- if (GET_CODE (operands[1]) == SYMBOL_REF)
++ if (rs6000_tls_referenced_p (operands[1]))
+ {
+- enum tls_model model = SYMBOL_REF_TLS_MODEL (operands[1]);
+- if (model != 0)
+- operands[1] = rs6000_legitimize_tls_address (operands[1], model);
++ enum tls_model model;
++ rtx tmp = operands[1];
++ rtx addend = NULL;
++
++ if (GET_CODE (tmp) == CONST && GET_CODE (XEXP (tmp, 0)) == PLUS)
++ {
++ addend = XEXP (XEXP (tmp, 0), 1);
++ tmp = XEXP (XEXP (tmp, 0), 0);
++ }
++
++ if (GET_CODE (tmp) != SYMBOL_REF)
++ abort ();
++ model = SYMBOL_REF_TLS_MODEL (tmp);
++ if (model == 0)
++ abort ();
++
++ tmp = rs6000_legitimize_tls_address (tmp, model);
++ if (addend)
++ {
++ tmp = gen_rtx_PLUS (mode, tmp, addend);
++ tmp = force_operand (tmp, operands[0]);
++ }
++ operands[1] = tmp;
+ }
+
+ /* Handle the case where reload calls us with an invalid address. */
+--- gcc/testsuite/gcc.dg/tls/opt-9.c (revision 0)
++++ gcc/testsuite/gcc.dg/tls/opt-9.c (revision 99367)
+@@ -0,0 +1,7 @@
++/* PR 21412 */
++/* { dg-do compile */
++/* { dg-options "-O2 -fPIC" } */
++
++struct S { int x[10]; };
++extern __thread struct S s;
++int *foo() { return &s.x[2]; }
+--- gcc/testsuite/gcc.dg/tls/opt-12.c 2006-04-19 19:21:31.748476000 +0200
++++ gcc/testsuite/gcc.dg/tls/opt-12.c 2006-05-05 11:01:33.000000000 +0200
+@@ -0,0 +1,16 @@
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++/* { XXdgXX-require-effective-target tls } */
++
++__thread struct
++{
++ int a;
++ char b[32];
++} thr;
++
++int
++main ()
++{
++ __builtin_strcpy (thr.b, "abcd");
++ return 0;
++}
+2005-07-22 Jakub Jelinek <jakub@redhat.com>
+
+ * src/sstream-inst.cc: Add .hidden directive for
+ streamsize basic_stringbuf<{char,wchar_t}>::showmanyc().
+ * src/sstream-inst-showmanyc.cc: New file.
+ * src/Makefile.am (libstdc++_nonshared.la): Add new library.
+ * src/Makefile.in: Rebuilt.
+ * testsuite/lib/libstdc++.exp: Append -lstdc++_nonshared for
+ testsuite executable linking.
+
+2005-06-08 Benjamin Kosnik <bkoz@redhat.com>
+
+ PR libstdc++/21955
+ * include/std/std_sstream.h (basic_stringbuf::showmanyc): Add.
+ * testsuite/27_io/basic_streambuf/in_avail/char/1.cc: New, test
+ base class behavior.
+ * testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc: Same.
+ * testsuite/27_io/basic_stringbuf/in_avail/char/21955.cc: New.
+ * testsuite/27_io/basic_stringbuf/in_avail/char/1.cc: Match
+ filebuf behavior.
+ * testsuite/27_io/basic_stringbuf/str/char/1.cc: Same.
+
+--- libstdc++-v3/src/sstream-inst.cc.jj 2003-07-11 10:28:13.000000000 +0200
++++ libstdc++-v3/src/sstream-inst.cc 2005-07-21 17:46:08.000000000 +0200
+@@ -60,3 +60,8 @@ namespace std
+ template class basic_stringstream<wchar_t>;
+ #endif
+ } // namespace std
++
++#ifdef PIC
++__asm (".hidden _ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE9showmanycEv");
++__asm (".hidden _ZNSt15basic_stringbufIwSt11char_traitsIwESaIwEE9showmanycEv");
++#endif
+--- libstdc++-v3/src/sstream-inst-showmanyc.cc.jj 2005-07-21 21:27:40.000000000 +0200
++++ libstdc++-v3/src/sstream-inst-showmanyc.cc 2005-07-22 09:16:58.000000000 +0200
+@@ -0,0 +1,39 @@
++// Explicit instantiation file.
++
++// Copyright (C) 2005
++// Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++#include <sstream>
++
++namespace std
++{
++ // These symbols are hidden in libstdc++.so, as it is undesirable to export
++ // @@GLIBCXX_3.4.6
++ template streamsize basic_stringbuf<char, char_traits<char>, allocator<char> >::showmanyc();
++ template streamsize basic_stringbuf<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >::showmanyc();
++} // namespace std
+--- libstdc++-v3/src/Makefile.am.jj 2004-04-20 15:55:47.000000000 +0200
++++ libstdc++-v3/src/Makefile.am 2005-07-22 09:00:32.000000000 +0200
+@@ -25,7 +25,7 @@
+ include $(top_srcdir)/fragment.am
+
+ # Cross compiler support.
+-toolexeclib_LTLIBRARIES = libstdc++.la
++toolexeclib_LTLIBRARIES = libstdc++.la libstdc++_nonshared.la
+
+ # Symbol versioning for shared libraries.
+ if GLIBCXX_BUILD_VERSIONED_SHLIB
+@@ -150,6 +150,11 @@ libstdc___la_DEPENDENCIES = ${version_de
+ libstdc___la_LDFLAGS = \
+ -version-info $(libtool_VERSION) ${version_arg} -lm
+
++libstdc___nonshared_la_SOURCES = \
++ sstream-inst-showmanyc.cc
++libstdc___nonshared_la_LIBADD =
++libstdc___nonshared_la_DEPENDENCIES = $(libstdc___nonshared_la_LIBADD)
++libstdc___nonshared_la_LDFLAGS = -static
+
+ # Use special rules for the deprecated source files so that they find
+ # deprecated include files.
+@@ -159,6 +164,14 @@ strstream.lo: strstream.cc
+ strstream.o: strstream.cc
+ $(CXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
+
++# Use special rules for libstdc++_nonshared.la files, as -prefer-pic
++# doesn't seem to work for some reason.
++sstream-inst-showmanyc.lo: sstream-inst-showmanyc.cc
++ $(LTCXXCOMPILE) -c $< \
++ && cp -f .libs/sstream-inst-showmanyc.o sstream-inst-showmanyc.o
++sstream-inst-showmanyc.o: sstream-inst-showmanyc.cc
++ $(CXXCOMPILE) -fPIC -DPIC -c $<
++
+ # Use special rules for the concept-checking instantiations so that all
+ # the generated template functions are also instantiated. Force the checks
+ # to be on so that the instantiations are actually seen.
+--- libstdc++-v3/src/Makefile.in.jj 2004-04-20 15:55:47.000000000 +0200
++++ libstdc++-v3/src/Makefile.in 2005-07-22 09:06:15.000000000 +0200
+@@ -221,7 +221,7 @@ WARN_CXXFLAGS = \
+ AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
+
+ # Cross compiler support.
+-toolexeclib_LTLIBRARIES = libstdc++.la
++toolexeclib_LTLIBRARIES = libstdc++.la libstdc++_nonshared.la
+
+ # Symbol versioning for shared libraries.
+ @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@version_arg = -Wl,--version-script=libstdc++-symbol.ver
+@@ -308,6 +308,13 @@ libstdc___la_LDFLAGS = \
+ -version-info $(libtool_VERSION) ${version_arg} -lm
+
+
++libstdc___nonshared_la_SOURCES = \
++ sstream-inst-showmanyc.cc
++
++libstdc___nonshared_la_LIBADD =
++libstdc___nonshared_la_DEPENDENCIES = $(libstdc___nonshared_la_LIBADD)
++libstdc___nonshared_la_LDFLAGS = -static
++
+ # Use special rules for the deprecated source files so that they find
+ # deprecated include files.
+ GLIBCXX_INCLUDE_DIR = $(glibcxx_builddir)/include
+@@ -379,6 +386,8 @@ am__objects_3 = allocator.lo codecvt.lo
+ $(am__objects_1) $(am__objects_2)
+ am_libstdc___la_OBJECTS = $(am__objects_3)
+ libstdc___la_OBJECTS = $(am_libstdc___la_OBJECTS)
++am_libstdc___nonshared_la_OBJECTS = sstream-inst-showmanyc.lo
++libstdc___nonshared_la_OBJECTS = $(am_libstdc___nonshared_la_OBJECTS)
+
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+ depcomp =
+@@ -386,10 +395,10 @@ am__depfiles_maybe =
+ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+ CXXLD = $(CXX)
+-DIST_SOURCES = $(libstdc___la_SOURCES)
++DIST_SOURCES = $(libstdc___la_SOURCES) $(libstdc___nonshared_la_SOURCES)
+ DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/fragment.am \
+ Makefile.am
+-SOURCES = $(libstdc___la_SOURCES)
++SOURCES = $(libstdc___la_SOURCES) $(libstdc___nonshared_la_SOURCES)
+
+ all: all-am
+
+@@ -430,6 +439,8 @@ clean-toolexeclibLTLIBRARIES:
+ done
+ libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES)
+ $(CXXLINK) -rpath $(toolexeclibdir) $(libstdc___la_LDFLAGS) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS)
++libstdc++_nonshared.la: $(libstdc___nonshared_la_OBJECTS) $(libstdc___nonshared_la_DEPENDENCIES)
++ $(CXXLINK) -rpath $(toolexeclibdir) $(libstdc___nonshared_la_LDFLAGS) $(libstdc___nonshared_la_OBJECTS) $(libstdc___nonshared_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+@@ -674,6 +685,14 @@ strstream.lo: strstream.cc
+ strstream.o: strstream.cc
+ $(CXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -c $<
+
++# Use special rules for libstdc++_nonshared.la files, as -prefer-pic
++# doesn't seem to work for some reason.
++sstream-inst-showmanyc.lo: sstream-inst-showmanyc.cc
++ $(LTCXXCOMPILE) -c $< \
++ && cp -f .libs/sstream-inst-showmanyc.o sstream-inst-showmanyc.o
++sstream-inst-showmanyc.o: sstream-inst-showmanyc.cc
++ $(CXXCOMPILE) -fPIC -DPIC -c $<
++
+ # Use special rules for the concept-checking instantiations so that all
+ # the generated template functions are also instantiated. Force the checks
+ # to be on so that the instantiations are actually seen.
+--- libstdc++-v3/include/std/std_sstream.h.jj 2004-10-04 14:58:25.000000000 +0200
++++ libstdc++-v3/include/std/std_sstream.h 2005-07-21 17:17:16.000000000 +0200
+@@ -185,6 +185,18 @@ namespace std
+ _M_sync(const_cast<char_type*>(_M_string.data()), 0, __len);
+ }
+
++ virtual streamsize
++ showmanyc()
++ {
++ streamsize __ret = -1;
++ if (_M_mode & ios_base::in)
++ {
++ _M_update_egptr();
++ __ret = this->egptr() - this->gptr();
++ }
++ return __ret;
++ }
++
+ // [documentation is inherited]
+ virtual int_type
+ underflow();
+--- libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc.jj 2003-10-01 12:12:11.000000000 +0200
++++ libstdc++-v3/testsuite/27_io/basic_stringbuf/str/char/1.cc 2005-07-22 01:22:15.000000000 +0200
+@@ -45,7 +45,7 @@ void test03()
+ std::streamsize d1 = strb_01.in_avail();
+ std::streamsize d2 = strb_03.in_avail();
+ VERIFY( d1 ); // non-zero
+- VERIFY( !d2 ); // zero, cuz ios_base::out
++ VERIFY( d2 == -1 ); // -1, cuz ios_base::out
+ VERIFY( d1 != d2 ); //these should be the same
+ VERIFY( static_cast<std::streamsize>(str_01.length()) == d1 );
+ VERIFY( strb_01.str() == strb_03.str() ); //ditto
+--- libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc.jj 2003-10-01 12:12:10.000000000 +0200
++++ libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/1.cc 2005-07-22 01:22:04.000000000 +0200
+@@ -49,8 +49,8 @@ void test04()
+ VERIFY( strmof_1 == static_cast<std::streamoff>(str_01.length()) );
+ VERIFY( strmof_2 == static_cast<std::streamoff>(str_02.length()) );
+ strmof_1 = strb_03.in_avail();
+- // zero cuz write-only, or eof()? zero, from showmany
+- VERIFY( strmof_1 == 0 );
++ // zero cuz write-only, or eof() to match basic_filebuf
++ VERIFY( strmof_1 == -1 );
+ }
+
+ int main()
+--- libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/21955.cc.jj 2005-07-22 01:22:04.000000000 +0200
++++ libstdc++-v3/testsuite/27_io/basic_stringbuf/in_avail/char/21955.cc 2005-07-22 01:22:04.000000000 +0200
+@@ -0,0 +1,54 @@
++// 2005-06-07 Benjamin Kosnik
++
++// Copyright (C) 2005
++// Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++#include <sstream>
++#include <testsuite_hooks.h>
++#include <stdexcept>
++
++double
++test_stringstream()
++{
++ double result;
++ char* source = "1918";
++ std::stringstream s;
++ s << source;
++
++ std::string tmp = s.str();
++ std::streambuf* sb = s.rdbuf();
++ int i = sb->in_avail();
++
++ if (i)
++ {
++ s >> result;
++ }
++ else
++ {
++ throw std::runtime_error("conversion failed");
++ }
++ return result;
++}
++
++
++int main ()
++{
++ test_stringstream();
++ return 0;
++}
+--- libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/1.cc.jj 2005-07-22 01:21:41.000000000 +0200
++++ libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/char/1.cc 2005-07-22 01:21:41.000000000 +0200
+@@ -0,0 +1,54 @@
++// 2005-06-07 Benjamin Kosnik <bkoz@redhat.com>
++
++// Copyright (C) 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// 27.8.1.4 Overridden virtual functions
++
++#include <fstream>
++#include <testsuite_hooks.h>
++
++typedef std::basic_streambuf<char> streambuf_type;
++
++struct testbuf : streambuf_type
++{
++ testbuf() { }
++};
++
++void test05()
++{
++ typedef streambuf_type::int_type int_type;
++ typedef streambuf_type::traits_type traits_type;
++ typedef streambuf_type::pos_type pos_type;
++ typedef streambuf_type::off_type off_type;
++ typedef size_t size_type;
++
++ bool test __attribute__((unused)) = true;
++ std::streamoff strmof_1, strmof_2;
++ testbuf sb01;
++
++ // int in_avail()
++ strmof_1 = sb01.in_avail();
++ VERIFY( strmof_1 == 0 );
++}
++
++int main()
++{
++ test05();
++ return 0;
++}
+--- libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc.jj 2005-07-22 01:21:41.000000000 +0200
++++ libstdc++-v3/testsuite/27_io/basic_streambuf/in_avail/wchar_t/1.cc 2005-07-22 01:21:41.000000000 +0200
+@@ -0,0 +1,54 @@
++// 2005-06-07 Benjamin Kosnik <bkoz@redhat.com>
++
++// Copyright (C) 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// 27.8.1.4 Overridden virtual functions
++
++#include <fstream>
++#include <testsuite_hooks.h>
++
++typedef std::basic_streambuf<wchar_t> streambuf_type;
++
++struct testbuf : streambuf_type
++{
++ testbuf() { }
++};
++
++void test05()
++{
++ typedef streambuf_type::int_type int_type;
++ typedef streambuf_type::traits_type traits_type;
++ typedef streambuf_type::pos_type pos_type;
++ typedef streambuf_type::off_type off_type;
++ typedef size_t size_type;
++
++ bool test __attribute__((unused)) = true;
++ std::streamoff strmof_1, strmof_2;
++ testbuf sb01;
++
++ // int in_avail()
++ strmof_1 = sb01.in_avail();
++ VERIFY( strmof_1 == 0 );
++}
++
++int main()
++{
++ test05();
++ return 0;
++}
+--- libstdc++-v3/libsupc++/eh_globals.cc.jj 2005-11-21 14:43:32.000000000 +0100
++++ libstdc++-v3/libsupc++/eh_globals.cc 2006-04-21 15:38:55.000000000 +0200
+@@ -36,6 +36,26 @@
+
+ using namespace __cxxabiv1;
+
++#if 1
++namespace __gnu_internal
++{
++ __cxxabiv1::__cxa_eh_globals*
++ get_global() throw()
++ {
++ static __thread __cxxabiv1::__cxa_eh_globals global __attribute__((tls_model ("initial-exec")));
++ return &global;
++ }
++}
++
++extern "C" __cxa_eh_globals*
++__cxxabiv1::__cxa_get_globals_fast() throw()
++{ return __gnu_internal::get_global(); }
++
++extern "C" __cxa_eh_globals*
++__cxxabiv1::__cxa_get_globals() throw()
++{ return __gnu_internal::get_global(); }
++
++#else
+
+ // Single-threaded fallback buffer.
+ static __cxa_eh_globals globals_static;
+@@ -125,3 +145,4 @@ __cxa_get_globals () throw()
+ return &globals_static;
+ #endif
+ }
++#endif
+2005-11-23 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/24975 (basic_string)
+ * include/bits/basic_string.h (_Rep::_S_empty_rep): Avoid
+ strict-aliasing warnings.
+
+2005-11-22 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/24975
+ * include/bits/stl_set.h (insert(iterator, const value_type&),
+ erase(iterator), erase(iterator, iterator)): Don't break aliasing
+ rules casting to _Rep_iterator&, forward to _Rb_tree facilities.
+ * include/bits/stl_multiset.h (insert(iterator, const value_type&),
+ erase(iterator), erase(iterator, iterator)): Likewise.
+ * include/bits/stl_tree.h (_Rb_tree<>::_M_insert(_Const_Base_ptr,
+ _Const_Base_ptr, const value_type&), insert_unique(const_iterator,
+ const value_type&), insert_equal(const_iterator, const value_type&),
+ erase(const_iterator), erase(const_iterator, const_iterator)): New,
+ _Rb_tree<>::const_iterator counterparts of existing facilities.
+
+--- libstdc++-v3/include/bits/basic_string.h.jj 2007-02-23 21:29:15.000000000 +0100
++++ libstdc++-v3/include/bits/basic_string.h 2007-07-19 12:11:40.000000000 +0200
+@@ -175,7 +175,16 @@ namespace std
+
+ static _Rep&
+ _S_empty_rep()
+- { return *reinterpret_cast<_Rep*>(&_S_empty_rep_storage); }
++ {
++#if __GNUC__ >= 4
++ // Work around type-punning warning in g++4. _S_empty_rep_storage
++ // is never modified, so type-punning is ok.
++ void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage);
++ return *reinterpret_cast<_Rep*>(__p);
++#else
++ return *reinterpret_cast<_Rep*>(&_S_empty_rep_storage);
++#endif
++ }
+
+ bool
+ _M_is_leaked() const
+--- libstdc++-v3/include/bits/stl_tree.h.jj 2007-02-23 21:29:15.000000000 +0100
++++ libstdc++-v3/include/bits/stl_tree.h 2007-07-19 13:18:28.000000000 +0200
+@@ -532,6 +532,12 @@ namespace std
+ iterator
+ _M_insert(_Base_ptr __x, _Base_ptr __y, const value_type& __v);
+
++#if __GNUC__ >= 4
++ const_iterator
++ _M_insert(_Const_Base_ptr __x, _Const_Base_ptr __y,
++ const value_type& __v);
++#endif
++
+ _Link_type
+ _M_copy(_Const_Link_type __x, _Link_type __p);
+
+@@ -631,9 +637,19 @@ namespace std
+ iterator
+ insert_unique(iterator __position, const value_type& __x);
+
++#if __GNUC__ >= 4
++ const_iterator
++ insert_unique(const_iterator __position, const value_type& __x);
++#endif
++
+ iterator
+ insert_equal(iterator __position, const value_type& __x);
+
++#if __GNUC__ >= 4
++ const_iterator
++ insert_equal(const_iterator __position, const value_type& __x);
++#endif
++
+ template<typename _InputIterator>
+ void
+ insert_unique(_InputIterator __first, _InputIterator __last);
+@@ -645,12 +661,22 @@ namespace std
+ void
+ erase(iterator __position);
+
++#if __GNUC__ >= 4
++ void
++ erase(const_iterator __position);
++#endif
++
+ size_type
+ erase(const key_type& __x);
+
+ void
+ erase(iterator __first, iterator __last);
+
++#if __GNUC__ >= 4
++ void
++ erase(const_iterator __first, const_iterator __last);
++#endif
++
+ void
+ erase(const key_type* __first, const key_type* __last);
+
+@@ -793,6 +819,28 @@ namespace std
+ return iterator(__z);
+ }
+
++#if __GNUC__ >= 4
++ template<typename _Key, typename _Val, typename _KeyOfValue,
++ typename _Compare, typename _Alloc>
++ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator
++ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
++ _M_insert(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v)
++ {
++ _Link_type __z = _M_create_node(__v);
++ bool __insert_left;
++
++ __insert_left = __x != 0 || __p == _M_end()
++ || _M_impl._M_key_compare(_KeyOfValue()(__v),
++ _S_key(__p));
++
++ _Rb_tree_insert_and_rebalance(__insert_left, __z,
++ const_cast<_Base_ptr>(__p),
++ this->_M_impl._M_header);
++ ++_M_impl._M_node_count;
++ return const_iterator(__z);
++ }
++#endif
++
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
+@@ -928,6 +976,54 @@ namespace std
+ }
+ }
+
++#if __GNUC__ >= 4
++ template<typename _Key, typename _Val, typename _KeyOfValue,
++ typename _Compare, typename _Alloc>
++ typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator
++ _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
++ insert_unique(const_iterator __position, const _Val& __v)
++ {
++ if (__position._M_node == _M_leftmost())
++ {
++ // begin()
++ if (size() > 0
++ && _M_impl._M_key_compare(_KeyOfValue()(__v),
++ _S_key(__position._M_node)))
++ return _M_insert(__position._M_node, __position._M_node, __v);
++ // First argument just needs to be non-null.
++ else
++ return const_iterator(insert_unique(__v).first);
++ }
++ else if (__position._M_node == _M_end())
++ {
++ // end()
++ if (_M_impl._M_key_compare(_S_key(_M_rightmost()),
++ _KeyOfValue()(__v)))
++ return _M_insert(0, _M_rightmost(), __v);
++ else
++ return const_iterator(insert_unique(__v).first);
++ }
++ else
++ {
++ const_iterator __before = __position;
++ --__before;
++ if (_M_impl._M_key_compare(_S_key(__before._M_node),
++ _KeyOfValue()(__v))
++ && _M_impl._M_key_compare(_KeyOfValue()(__v),
++ _S_key(__position._M_node)))
++ {
++ if (_S_right(__before._M_node) == 0)
++ return _M_insert(0, __before._M_node, __v);
++ else
++ return _M_insert(__position._M_node, __position._M_node, __v);
++ // First argument just needs to be non-null.
++ }
++ else
++ return const_iterator(insert_unique(__v).first);
++ }
++ }
++#endif
++
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
+@@ -974,6 +1070,54 @@ namespace std
+ }
+ }
+
++#if __GNUC__ >= 4
++ template<typename _Key, typename _Val, typename _KeyOfValue,
++ typename _Compare, typename _Alloc>
++ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator
++ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
++ insert_equal(const_iterator __position, const _Val& __v)
++ {
++ if (__position._M_node == _M_leftmost())
++ {
++ // begin()
++ if (size() > 0
++ && !_M_impl._M_key_compare(_S_key(__position._M_node),
++ _KeyOfValue()(__v)))
++ return _M_insert(__position._M_node, __position._M_node, __v);
++ // first argument just needs to be non-null
++ else
++ return const_iterator(insert_equal(__v));
++ }
++ else if (__position._M_node == _M_end())
++ {
++ // end()
++ if (!_M_impl._M_key_compare(_KeyOfValue()(__v),
++ _S_key(_M_rightmost())))
++ return _M_insert(0, _M_rightmost(), __v);
++ else
++ return const_iterator(insert_equal(__v));
++ }
++ else
++ {
++ const_iterator __before = __position;
++ --__before;
++ if (!_M_impl._M_key_compare(_KeyOfValue()(__v),
++ _S_key(__before._M_node))
++ && !_M_impl._M_key_compare(_S_key(__position._M_node),
++ _KeyOfValue()(__v)))
++ {
++ if (_S_right(__before._M_node) == 0)
++ return _M_insert(0, __before._M_node, __v);
++ else
++ return _M_insert(__position._M_node, __position._M_node, __v);
++ // First argument just needs to be non-null.
++ }
++ else
++ return const_iterator(insert_equal(__v));
++ }
++ }
++#endif
++
+ template<typename _Key, typename _Val, typename _KoV,
+ typename _Cmp, typename _Alloc>
+ template<class _II>
+@@ -1008,6 +1152,20 @@ namespace std
+ --_M_impl._M_node_count;
+ }
+
++#if __GNUC__ >= 4
++ template<typename _Key, typename _Val, typename _KeyOfValue,
++ typename _Compare, typename _Alloc>
++ inline void
++ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::erase(const_iterator __position)
++ {
++ _Link_type __y =
++ static_cast<_Link_type>(_Rb_tree_rebalance_for_erase(const_cast<_Base_ptr>(__position._M_node),
++ this->_M_impl._M_header));
++ destroy_node(__y);
++ --_M_impl._M_node_count;
++ }
++#endif
++
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::size_type
+@@ -1082,6 +1240,20 @@ namespace std
+ while (__first != __last) erase(__first++);
+ }
+
++#if __GNUC__ >= 4
++ template<typename _Key, typename _Val, typename _KeyOfValue,
++ typename _Compare, typename _Alloc>
++ void
++ _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
++ erase(const_iterator __first, const_iterator __last)
++ {
++ if (__first == begin() && __last == end())
++ clear();
++ else
++ while (__first != __last) erase(__first++);
++ }
++#endif
++
+ template<typename _Key, typename _Val, typename _KeyOfValue,
+ typename _Compare, typename _Alloc>
+ void
+--- libstdc++-v3/include/bits/stl_multiset.h.jj 2007-02-23 21:29:15.000000000 +0100
++++ libstdc++-v3/include/bits/stl_multiset.h 2007-07-19 12:30:47.000000000 +0200
+@@ -328,8 +328,12 @@ namespace _GLIBCXX_STD
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
++#if __GNUC__ >= 4
++ return _M_t.insert_equal(__position, __x);
++#else
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ return _M_t.insert_equal((_Rep_iterator&)__position, __x);
++#endif
+ }
+
+ /**
+@@ -358,8 +362,12 @@ namespace _GLIBCXX_STD
+ void
+ erase(iterator __position)
+ {
++#if __GNUC__ >= 4
++ _M_t.erase(__position);
++#else
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ _M_t.erase((_Rep_iterator&)__position);
++#endif
+ }
+
+ /**
+@@ -391,8 +399,12 @@ namespace _GLIBCXX_STD
+ void
+ erase(iterator __first, iterator __last)
+ {
++#if __GNUC__ >= 4
++ _M_t.erase(__first, __last);
++#else
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last);
++#endif
+ }
+
+ /**
+--- libstdc++-v3/include/bits/stl_set.h.jj 2007-02-23 21:29:15.000000000 +0100
++++ libstdc++-v3/include/bits/stl_set.h 2007-07-19 12:23:57.000000000 +0200
+@@ -337,8 +337,12 @@ namespace _GLIBCXX_STD
+ iterator
+ insert(iterator __position, const value_type& __x)
+ {
++#if __GNUC__ >= 4
++ return _M_t.insert_unique(__position, __x);
++#else
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ return _M_t.insert_unique((_Rep_iterator&)__position, __x);
++#endif
+ }
+
+ /**
+@@ -366,8 +370,12 @@ namespace _GLIBCXX_STD
+ void
+ erase(iterator __position)
+ {
++#if __GNUC__ >= 4
++ _M_t.erase(__position);
++#else
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ _M_t.erase((_Rep_iterator&)__position);
++#endif
+ }
+
+ /**
+@@ -398,8 +406,12 @@ namespace _GLIBCXX_STD
+ void
+ erase(iterator __first, iterator __last)
+ {
++#if __GNUC__ >= 4
++ _M_t.erase(__first, __last);
++#else
+ typedef typename _Rep_type::iterator _Rep_iterator;
+ _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last);
++#endif
+ }
+
+ /**
+2006-02-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR other/26208
+ * unwind-dw2.c (struct _Unwind_Context): Add signal_frame field.
+ (_Unwind_FrameState): Add signal_frame field.
+ (extract_cie_info): Handle S flag in augmentation string.
+ (execute_cfa_program): If context->signal_frame, execute also
+ fs->pc == context->ra instructions.
+ (uw_frame_state_for): If context->signal_frame, don't subtract one
+ from context->ra to find FDE.
+ (uw_update_context_1): Set context->signal_frame to
+ fs->signal_frame.
+ (_Unwind_GetIPInfo): New function.
+ * unwind-c.c (PERSONALITY_FUNCTION): Use _Unwind_GetIPInfo instead
+ of _Unwind_GetIP.
+ * unwind-sjlj.c (_Unwind_GetIPInfo): New function.
+ * unwind.h (_Unwind_GetIPInfo): New prototype.
+ * unwind-compat.c (_Unwind_GetIPInfo): New function.
+ * libgcc-std.ver (_Unwind_GetIPInfo): Export @@GCC_4.2.0.
+ * config/ia64/unwind-ia64.c (_Unwind_GetIPInfo): New function.
+ * config/i386/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Set
+ (FS)->signal_frame.
+ * config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Likewise.
+ * config/rs6000/linux-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Likewise.
+ * config/s390/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Likewise.
+
+ * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Use
+ _Unwind_GetIPInfo instead of _Unwind_GetIP.
+
+ * exception.cc (PERSONALITY_FUNCTION): Use _Unwind_GetIPInfo instead
+ of _Unwind_GetIP.
+ * include/i386-signal.h (MAKE_THROW_FRAME): Change into empty macro.
+ (HANDLE_DIVIDE_OVERFLOW): Don't adjust _res->eip if falling through
+ to throw.
+ * include/x86_64-signal.h (MAKE_THROW_FRAME): Change into empty
+ macro.
+ * include/powerpc-signal.h (MAKE_THROW_FRAME): Change into empty
+ macro.
+
+--- libjava/exception.cc.jj 2005-11-21 14:47:25.000000000 +0100
++++ libjava/exception.cc 2006-04-21 14:00:19.000000000 +0200
+@@ -199,6 +199,7 @@ PERSONALITY_FUNCTION (int version,
+ int handler_switch_value;
+ bool saw_cleanup;
+ bool saw_handler;
++ int ip_before_insn = 0;
+
+
+ // Interface version check.
+@@ -214,10 +215,10 @@ PERSONALITY_FUNCTION (int version,
+ goto install_context;
+ }
+
+- // FIXME: In Phase 1, record _Unwind_GetIP in xh->obj as a part of
++ // FIXME: In Phase 1, record _Unwind_GetIPInfo in xh->obj as a part of
+ // the stack trace for this exception. This will only collect Java
+ // frames, but perhaps that is acceptable.
+- // FIXME2: _Unwind_GetIP is nonsensical for SJLJ, being a call-site
++ // FIXME2: _Unwind_GetIPInfo is nonsensical for SJLJ, being a call-site
+ // index instead of a PC value. We could perhaps arrange for
+ // _Unwind_GetRegionStart to return context->fc->jbuf[1], which
+ // is the address of the handler label for __builtin_longjmp, but
+@@ -232,7 +233,9 @@ PERSONALITY_FUNCTION (int version,
+
+ // Parse the LSDA header.
+ p = parse_lsda_header (context, language_specific_data, &info);
+- ip = _Unwind_GetIP (context) - 1;
++ ip = _Unwind_GetIPInfo (context, &ip_before_insn);
++ if (! ip_before_insn)
++ --ip;
+ landing_pad = 0;
+ action_record = 0;
+ handler_switch_value = 0;
+--- libjava/include/i386-signal.h.jj 2005-11-21 14:47:15.000000000 +0100
++++ libjava/include/i386-signal.h 2006-04-21 14:57:55.000000000 +0200
+@@ -22,19 +22,7 @@ details. */
+ #define SIGNAL_HANDLER(_name) \
+ static void _name (int _dummy)
+
+-#define MAKE_THROW_FRAME(_exception) \
+-do \
+-{ \
+- void **_p = (void **)&_dummy; \
+- struct sigcontext_struct *_regs = (struct sigcontext_struct *)++_p; \
+- \
+- /* Advance the program counter so that it is after the start of the \
+- instruction: the x86 exception handler expects \
+- the PC to point to the instruction after a call. */ \
+- _regs->eip += 2; \
+- \
+-} \
+-while (0)
++#define MAKE_THROW_FRAME(_exception)
+
+ #define HANDLE_DIVIDE_OVERFLOW \
+ do \
+@@ -84,14 +72,6 @@ do \
+ _regs->eip = (unsigned long)_eip; \
+ return; \
+ } \
+- else \
+- { \
+- /* Advance the program counter so that it is after the start \
+- of the instruction: this is because the x86 exception \
+- handler expects the PC to point to the instruction after a \
+- call. */ \
+- _regs->eip += 2; \
+- } \
+ } \
+ } \
+ while (0)
+--- libjava/include/x86_64-signal.h.jj 2006-04-20 17:02:27.000000000 +0200
++++ libjava/include/x86_64-signal.h 2006-04-21 14:00:19.000000000 +0200
+@@ -34,17 +34,7 @@ extern "C"
+ };
+ }
+
+-#define MAKE_THROW_FRAME(_exception) \
+-do \
+-{ \
+- /* Advance the program counter so that it is after the start of the \
+- instruction: the x86_64 exception handler expects \
+- the PC to point to the instruction after a call. */ \
+- struct ucontext *_uc = (struct ucontext *)_p; \
+- volatile struct sigcontext *_sc = (struct sigcontext *) &_uc->uc_mcontext; \
+- _sc->rip += 2; \
+-} \
+-while (0)
++#define MAKE_THROW_FRAME(_exception)
+
+ #define RESTORE(name, syscall) RESTORE2 (name, syscall)
+ #define RESTORE2(name, syscall) \
+--- libjava/include/powerpc-signal.h.jj 2005-11-21 14:47:15.000000000 +0100
++++ libjava/include/powerpc-signal.h 2006-04-21 14:00:19.000000000 +0200
+@@ -22,18 +22,12 @@ details. */
+ #define SIGNAL_HANDLER(_name) \
+ static void _name (int /* _signal */, struct sigcontext *_sc)
+
+-/* PPC either leaves PC pointing at a faulting instruction or the
+- following instruction, depending on the signal. SEGV always does
+- the former, so we adjust the saved PC to point to the following
+- instruction. This is what the handler in libgcc expects. */
++/* MD_FALBACK_FRAME_STATE_FOR takes care of special casing PC
++ before the faulting instruction, so we don't need to do anything
++ here. */
++
++#define MAKE_THROW_FRAME(_exception)
+
+-#define MAKE_THROW_FRAME(_exception) \
+-do \
+- { \
+- _sc->regs->nip += 4; \
+- } \
+-while (0)
+-
+ /* For an explanation why we cannot simply use sigaction to
+ install the handlers, see i386-signal.h. */
+
+--- libstdc++-v3/libsupc++/eh_personality.cc.jj 2005-11-21 14:43:32.000000000 +0100
++++ libstdc++-v3/libsupc++/eh_personality.cc 2006-04-21 14:24:34.000000000 +0200
+@@ -201,6 +201,7 @@ PERSONALITY_FUNCTION (int version,
+ _Unwind_Ptr landing_pad, ip;
+ int handler_switch_value;
+ void *thrown_ptr = xh + 1;
++ int ip_before_insn = 0;
+
+ // Interface version check.
+ if (version != 1)
+@@ -227,7 +228,9 @@ PERSONALITY_FUNCTION (int version,
+ // Parse the LSDA header.
+ p = parse_lsda_header (context, language_specific_data, &info);
+ info.ttype_base = base_of_encoded_value (info.ttype_encoding, context);
+- ip = _Unwind_GetIP (context) - 1;
++ ip = _Unwind_GetIPInfo (context, &ip_before_insn);
++ if (! ip_before_insn)
++ --ip;
+ landing_pad = 0;
+ action_record = 0;
+ handler_switch_value = 0;
+--- gcc/libgcc-std.ver.jj 2005-11-21 14:43:21.000000000 +0100
++++ gcc/libgcc-std.ver 2006-04-21 14:02:13.000000000 +0200
+@@ -234,3 +234,8 @@ GCC_3.4.4 {
+ __negvti2
+ __subvti3
+ }
++
++%inherit GCC_4.2.0 GCC_3.4.4
++GCC_4.2.0 {
++ _Unwind_GetIPInfo
++}
+--- gcc/unwind-c.c.jj 2005-11-21 14:43:20.000000000 +0100
++++ gcc/unwind-c.c 2006-04-21 14:00:08.000000000 +0200
+@@ -102,6 +102,7 @@ PERSONALITY_FUNCTION (int version,
+ lsda_header_info info;
+ const unsigned char *language_specific_data, *p, *action_record;
+ _Unwind_Ptr landing_pad, ip;
++ int ip_before_insn = 0;
+
+ if (version != 1)
+ return _URC_FATAL_PHASE1_ERROR;
+@@ -119,7 +120,9 @@ PERSONALITY_FUNCTION (int version,
+
+ /* Parse the LSDA header. */
+ p = parse_lsda_header (context, language_specific_data, &info);
+- ip = _Unwind_GetIP (context) - 1;
++ ip = _Unwind_GetIPInfo (context, &ip_before_insn);
++ if (! ip_before_insn)
++ --ip;
+ landing_pad = 0;
+
+ #ifdef __USING_SJLJ_EXCEPTIONS__
+--- gcc/config/s390/linux.h.jj 2005-11-21 14:40:55.000000000 +0100
++++ gcc/config/s390/linux.h 2006-04-21 14:15:46.000000000 +0200
+@@ -113,6 +113,7 @@ Software Foundation, 59 Temple Place - S
+ } __attribute__ ((__aligned__ (8))) sigregs_; \
+ \
+ sigregs_ *regs_; \
++ int *signo_ = NULL; \
+ \
+ /* svc $__NR_sigreturn or svc $__NR_rt_sigreturn */ \
+ if (pc_[0] != 0x0a || (pc_[1] != 119 && pc_[1] != 173)) \
+@@ -133,6 +134,7 @@ Software Foundation, 59 Temple Place - S
+ } *uc_ = (CONTEXT)->cfa + 8 + 128; \
+ \
+ regs_ = &uc_->uc_mcontext; \
++ signo_ = (CONTEXT)->cfa + sizeof(long); \
+ } \
+ \
+ /* Old-style RT frame and all non-RT frames: \
+@@ -141,6 +143,11 @@ Software Foundation, 59 Temple Place - S
+ else \
+ { \
+ regs_ = *(sigregs_ **)((CONTEXT)->cfa + 8); \
++ /* Recent kernels store the signal number immediately after \
++ the sigregs; old kernels have the return trampoline at \
++ this location. */ \
++ if ((void *)(regs_ + 1) != (CONTEXT)->ra) \
++ signo_ = (int *)(regs_ + 1); \
+ } \
+ \
+ new_cfa_ = regs_->gprs[15] + 16*sizeof(long) + 32; \
+@@ -167,6 +174,12 @@ Software Foundation, 59 Temple Place - S
+ (FS)->regs.reg[32].loc.offset = (long)®s_->psw_addr - new_cfa_; \
+ (FS)->retaddr_column = 32; \
+ \
++ /* SIGILL, SIGFPE and SIGTRAP are delivered with psw_addr \
++ after the faulting instruction rather than before it. \
++ Don't set FS->signal_frame in that case. */ \
++ if (!signo_ || (*signo_ != 4 && *signo_ != 5 && *signo_ != 8)) \
++ (FS)->signal_frame = 1; \
++ \
+ goto SUCCESS; \
+ } while (0)
+
+--- gcc/config/i386/linux.h.jj 2005-11-21 14:41:07.000000000 +0100
++++ gcc/config/i386/linux.h 2006-04-21 14:18:05.000000000 +0200
+@@ -268,6 +268,7 @@ Boston, MA 02111-1307, USA. */
+ (FS)->regs.reg[8].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[8].loc.offset = (long)&sc_->eip - new_cfa_; \
+ (FS)->retaddr_column = 8; \
++ (FS)->signal_frame = 1; \
+ goto SUCCESS; \
+ } while (0)
+ #endif /* not USE_GNULIBC_1 */
+--- gcc/config/i386/linux64.h.jj 2005-11-21 14:41:07.000000000 +0100
++++ gcc/config/i386/linux64.h 2006-04-21 14:18:45.000000000 +0200
+@@ -136,6 +136,7 @@ Boston, MA 02111-1307, USA. */
+ (FS)->regs.reg[16].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[16].loc.offset = (long)&sc_->rip - new_cfa_; \
+ (FS)->retaddr_column = 16; \
++ (FS)->signal_frame = 1; \
+ goto SUCCESS; \
+ } while (0)
+ #else /* ifdef __x86_64__ */
+@@ -190,6 +191,7 @@ Boston, MA 02111-1307, USA. */
+ (FS)->regs.reg[8].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[8].loc.offset = (long)&sc_->eip - new_cfa_; \
+ (FS)->retaddr_column = 8; \
++ (FS)->signal_frame = 1; \
+ goto SUCCESS; \
+ } while (0)
+ #endif /* ifdef __x86_64__ */
+--- gcc/config/ia64/unwind-ia64.c.jj 2005-11-21 14:40:57.000000000 +0100
++++ gcc/config/ia64/unwind-ia64.c 2006-04-21 14:00:11.000000000 +0200
+@@ -1748,6 +1748,13 @@ _Unwind_GetIP (struct _Unwind_Context *c
+ return context->rp;
+ }
+
++inline _Unwind_Ptr
++_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
++{
++ *ip_before_insn = 0;
++ return context->rp;
++}
++
+ /* Overwrite the return address for CONTEXT with VAL. */
+
+ inline void
+--- gcc/unwind-compat.c.jj 2005-11-21 14:43:20.000000000 +0100
++++ gcc/unwind-compat.c 2006-04-21 13:59:59.000000000 +0200
+@@ -134,6 +134,13 @@ _Unwind_GetIP (struct _Unwind_Context *c
+ }
+ symver (_Unwind_GetIP, GCC_3.0);
+
++_Unwind_Ptr
++_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
++{
++ *ip_before_insn = 0;
++ return __libunwind_Unwind_GetIP (context);
++}
++
+ extern void *__libunwind_Unwind_GetLanguageSpecificData
+ (struct _Unwind_Context *);
+
+--- gcc/unwind-sjlj.c.jj 2005-11-21 14:43:21.000000000 +0100
++++ gcc/unwind-sjlj.c 2006-04-21 14:00:08.000000000 +0200
+@@ -202,6 +202,13 @@ _Unwind_GetIP (struct _Unwind_Context *c
+ return context->fc->call_site + 1;
+ }
+
++_Unwind_Ptr
++_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
++{
++ *ip_before_insn = 0;
++ return context->fc->call_site + 1;
++}
++
+ /* Set the return landing pad index in CONTEXT. */
+
+ void
+--- gcc/unwind.h.jj 2005-11-21 14:43:20.000000000 +0100
++++ gcc/unwind.h 2006-04-21 14:08:51.000000000 +0200
+@@ -151,6 +151,7 @@ extern _Unwind_Word _Unwind_GetGR (struc
+ extern void _Unwind_SetGR (struct _Unwind_Context *, int, _Unwind_Word);
+
+ extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *);
++extern _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *);
+ extern void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr);
+
+ /* @@@ Retrieve the CFA of the given context. */
+--- gcc/unwind-dw2.c.jj 2005-11-21 14:43:21.000000000 +0100
++++ gcc/unwind-dw2.c 2006-04-21 14:05:32.000000000 +0200
+@@ -82,6 +82,7 @@ struct _Unwind_Context
+ void *lsda;
+ struct dwarf_eh_bases bases;
+ _Unwind_Word args_size;
++ char signal_frame;
+ };
+
+ /* Byte size of every register managed by these routines. */
+@@ -137,6 +138,7 @@ typedef struct
+ unsigned char fde_encoding;
+ unsigned char lsda_encoding;
+ unsigned char saw_z;
++ unsigned char signal_frame;
+ void *eh_ptr;
+ } _Unwind_FrameState;
+ \f
+@@ -271,6 +273,16 @@ _Unwind_GetIP (struct _Unwind_Context *c
+ return (_Unwind_Ptr) context->ra;
+ }
+
++/* Retrieve the return address and flag whether that IP is before
++ or after first not yet fully executed instruction. */
++
++inline _Unwind_Ptr
++_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn)
++{
++ *ip_before_insn = context->signal_frame != 0;
++ return (_Unwind_Ptr) context->ra;
++}
++
+ /* Overwrite the return address for CONTEXT with VAL. */
+
+ inline void
+@@ -382,6 +394,13 @@ extract_cie_info (const struct dwarf_cie
+ aug += 1;
+ }
+
++ /* "S" indicates a signal frame. */
++ else if (aug[0] == 'S')
++ {
++ fs->signal_frame = 1;
++ aug += 1;
++ }
++
+ /* Otherwise we have an unknown augmentation string.
+ Bail unless we saw a 'z' prefix. */
+ else
+@@ -818,8 +837,10 @@ execute_cfa_program (const unsigned char
+ a different stack configuration that we are not interested in. We
+ assume that the call itself is unwind info-neutral; if not, or if
+ there are delay instructions that adjust the stack, these must be
+- reflected at the point immediately before the call insn. */
+- while (insn_ptr < insn_end && fs->pc < context->ra)
++ reflected at the point immediately before the call insn.
++ In signal frames, return address is after last completed instruction,
++ so we add 1 to return address to make the comparison <=. */
++ while (insn_ptr < insn_end && fs->pc < context->ra + context->signal_frame)
+ {
+ unsigned char insn = *insn_ptr++;
+ _Unwind_Word reg, utmp;
+@@ -1021,7 +1042,8 @@ uw_frame_state_for (struct _Unwind_Conte
+ if (context->ra == 0)
+ return _URC_END_OF_STACK;
+
+- fde = _Unwind_Find_FDE (context->ra - 1, &context->bases);
++ fde = _Unwind_Find_FDE (context->ra + context->signal_frame - 1,
++ &context->bases);
+ if (fde == NULL)
+ {
+ /* Couldn't find frame unwind info for this function. Try a
+@@ -1376,6 +1398,8 @@ uw_update_context_1 (struct _Unwind_Cont
+ break;
+ }
+
++ context->signal_frame = fs->signal_frame;
++
+ MD_FROB_UPDATE_CONTEXT (context, fs);
+ }
+
+--- gcc/unwind-dw2.c.jj 2006-05-22 13:39:48.000000000 -0400
++++ gcc/unwind-dw2.c 2006-05-22 13:48:20.000000000 -0400
+@@ -40,6 +40,7 @@
+ #include "unwind-pe.h"
+ #include "unwind-dw2-fde.h"
+ #include "gthr.h"
++#include <endian.h>
+
+
+ #ifndef __USING_SJLJ_EXCEPTIONS__
+@@ -81,8 +82,15 @@ struct _Unwind_Context
+ void *ra;
+ void *lsda;
+ struct dwarf_eh_bases bases;
+- _Unwind_Word args_size;
+- char signal_frame;
++#if __BYTE_ORDER == __BIG_ENDIAN
++ _Unwind_Word signal_frame : 1;
++ _Unwind_Word args_size : sizeof (_Unwind_Word) * 8 - 1;
++#elif __BYTE_ORDER == __LITTLE_ENDIAN
++ _Unwind_Word args_size : sizeof (_Unwind_Word) * 8 - 1;
++ _Unwind_Word signal_frame : 1;
++#else
++#error Unknown endianity
++#endif
+ };
+
+ /* Byte size of every register managed by these routines. */
+@@ -1003,7 +1011,13 @@ execute_cfa_program (const unsigned char
+ break;
+
+ case DW_CFA_GNU_args_size:
+- insn_ptr = read_uleb128 (insn_ptr, &context->args_size);
++ {
++ _Unwind_Word args_size;
++ insn_ptr = read_uleb128 (insn_ptr, &args_size);
++ context->args_size = args_size;
++ if (context->args_size != args_size)
++ abort ();
++ }
+ break;
+
+ case DW_CFA_GNU_negative_offset_extended:
+--- libjava/exception.cc.jj 2006-05-22 13:39:48.000000000 -0400
++++ libjava/exception.cc 2006-05-22 14:48:30.000000000 -0400
+@@ -31,6 +31,153 @@ namespace std
+ }
+ #include "unwind.h"
+
++#if defined PIC && !defined __ia64__
++
++#include <dlfcn.h>
++
++extern "C" {
++
++static void *libgcc_s_handle;
++
++_Unwind_Reason_Code __attribute__((visibility ("hidden")))
++_Unwind_RaiseException (struct _Unwind_Exception *exc)
++{
++ static _Unwind_Reason_Code (*RaiseException) (struct _Unwind_Exception *);
++
++ if (RaiseException == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ RaiseException = (__typeof (RaiseException))
++ dlsym (libgcc_s_handle, "_Unwind_RaiseException");
++ }
++ return RaiseException (exc);
++}
++
++void __attribute__((visibility ("hidden")))
++_Unwind_Resume (struct _Unwind_Exception *exc)
++{
++ static void (*Resume) (struct _Unwind_Exception *);
++
++ if (Resume == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ Resume = (__typeof (Resume))
++ dlsym (libgcc_s_handle, "_Unwind_Resume");
++ }
++ Resume (exc);
++}
++
++__attribute__((visibility ("hidden"))) void *
++_Unwind_GetLanguageSpecificData (struct _Unwind_Context *ctx)
++{
++ static void * (*GetLanguageSpecificData) (struct _Unwind_Context *);
++
++ if (GetLanguageSpecificData == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ GetLanguageSpecificData = (__typeof (GetLanguageSpecificData))
++ dlsym (libgcc_s_handle, "_Unwind_GetLanguageSpecificData");
++ }
++ return GetLanguageSpecificData (ctx);
++}
++
++_Unwind_Ptr __attribute__((visibility ("hidden")))
++_Unwind_GetRegionStart (struct _Unwind_Context *ctx)
++{
++ static _Unwind_Ptr (*GetRegionStart) (struct _Unwind_Context *);
++
++ if (GetRegionStart == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ GetRegionStart = (__typeof (GetRegionStart))
++ dlsym (libgcc_s_handle, "_Unwind_GetRegionStart");
++ }
++ return GetRegionStart (ctx);
++}
++
++_Unwind_Ptr __attribute__((visibility ("hidden")))
++_Unwind_GetDataRelBase (struct _Unwind_Context *ctx)
++{
++ static _Unwind_Ptr (*GetDataRelBase) (struct _Unwind_Context *);
++
++ if (GetDataRelBase == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ GetDataRelBase = (__typeof (GetDataRelBase))
++ dlsym (libgcc_s_handle, "_Unwind_GetDataRelBase");
++ }
++ return GetDataRelBase (ctx);
++}
++
++_Unwind_Ptr __attribute__((visibility ("hidden")))
++_Unwind_GetTextRelBase (struct _Unwind_Context *ctx)
++{
++ static _Unwind_Ptr (*GetTextRelBase) (struct _Unwind_Context *);
++
++ if (GetTextRelBase == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ GetTextRelBase = (__typeof (GetTextRelBase))
++ dlsym (libgcc_s_handle, "_Unwind_GetTextRelBase");
++ }
++ return GetTextRelBase (ctx);
++}
++
++_Unwind_Ptr __attribute__((visibility ("hidden")))
++_Unwind_GetIPInfo (struct _Unwind_Context *ctx, int *ip)
++{
++ static _Unwind_Ptr (*GetIPInfo) (struct _Unwind_Context *, int *ip);
++
++ if (GetIPInfo == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ GetIPInfo = (__typeof (GetIPInfo))
++ dlsym (libgcc_s_handle, "_Unwind_GetIPInfo");
++ }
++ return GetIPInfo (ctx, ip);
++}
++
++void __attribute__((visibility ("hidden")))
++_Unwind_SetIP (struct _Unwind_Context *ctx, _Unwind_Ptr ip)
++{
++ static void (*SetIP) (struct _Unwind_Context *, _Unwind_Ptr ip);
++
++ if (SetIP == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ SetIP = (__typeof (SetIP))
++ dlsym (libgcc_s_handle, "_Unwind_SetIP");
++ }
++ SetIP (ctx, ip);
++}
++
++void __attribute__((visibility ("hidden")))
++_Unwind_SetGR (struct _Unwind_Context *ctx, int num, _Unwind_Ptr gr)
++{
++ static void (*SetGR) (struct _Unwind_Context *, int num, _Unwind_Ptr gr);
++
++ if (SetGR == NULL)
++ {
++ if (libgcc_s_handle == NULL)
++ libgcc_s_handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
++ SetGR = (__typeof (SetGR))
++ dlsym (libgcc_s_handle, "_Unwind_SetGR");
++ }
++ SetGR (ctx, num, gr);
++}
++
++}
++
++#endif
++
+ struct alignment_test_struct
+ {
+ char space;
+2005-05-08 Roger Sayle <roger@eyesopen.com>
+
+ PR inline-asm/8788
+ * stmt.c (expand_asm_operands): Avoid calling force_reg on BLKmode
+ operands.
+
+ * gcc.dg/pr8788-1.c: New testcase.
+
+--- gcc/stmt.c (revision 99421)
++++ gcc/stmt.c (revision 99422)
+@@ -877,7 +877,7 @@ expand_asm_operands (tree string, tree o
+
+ if (asm_operand_ok (op, constraint) <= 0)
+ {
+- if (allows_reg)
++ if (allows_reg && TYPE_MODE (type) != BLKmode)
+ op = force_reg (TYPE_MODE (type), op);
+ else if (!allows_mem)
+ warning (0, "asm operand %d probably doesn%'t match constraints",
+--- gcc/testsuite/gcc.dg/pr8788-1.c (revision 0)
++++ gcc/testsuite/gcc.dg/pr8788-1.c (revision 99422)
+@@ -0,0 +1,20 @@
++/* PR inline-asm/8788 */
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++
++typedef struct {
++ long x[6];
++} myjmp_buf;
++
++typedef struct {
++ myjmp_buf regs;
++} my_stack;
++
++void switch_to_stack (my_stack *stack){
++ asm ( /* { dg-error "impossible constraint" } */
++/* { dg-warning "asm operand 1" "asm operand 1" { target *-*-* } 14 } */
++ "\n"
++ : "+r" (stack->regs)
++ );
++}
++
+2005-11-30 Alexandre Oliva <aoliva@redhat.com>
+
+ * gcc.c (find_a_file): Use update_path before access tests.
+ Mostly from Thomas Walker <thomas.walker@morganstanley.com>
+ * prefix.c (update_path): Move dir/../-stripping code to...
+ (maybe_strip_dotdots): New function. Reorganize.
+
+--- gcc/gcc.c.orig 2005-12-01 18:38:38.000000000 -0200
++++ gcc/gcc.c 2005-12-01 18:41:01.000000000 -0200
+@@ -2371,7 +2371,7 @@
+ find_a_file (struct path_prefix *pprefix, const char *name, int mode,
+ int multilib)
+ {
+- char *temp;
++ char *temp, *temp2;
+ const char *const file_suffix =
+ ((mode & X_OK) != 0 ? HOST_EXECUTABLE_SUFFIX : "");
+ struct prefix_list *pl;
+@@ -2407,19 +2407,18 @@
+ NULL));
+ }
+
+- temp = xmalloc (len);
+-
+ /* Determine the filename to execute (special case for absolute paths). */
+
+ if (IS_ABSOLUTE_PATH (name))
+ {
+- if (access (name, mode) == 0)
+- {
+- strcpy (temp, name);
+- return temp;
+- }
++ /* IS_ABSOLUTE_PATHNAME lets anything through that starts with '/' */
++ temp = update_path (name, NULL);
++ if (access (temp, mode) == 0)
++ return temp;
+ }
+ else
++ {
++ temp = xmalloc (len);
+ for (pl = pprefix->plist; pl; pl = pl->next)
+ {
+ const char *this_name
+@@ -2435,24 +2434,30 @@
+ strcat (temp, machine_suffix);
+ strcat (temp, multilib_name);
+ strcat (temp, file_suffix);
+- if (access_check (temp, mode) == 0)
++ temp2 = update_path (temp, NULL);
++ if (access_check (temp2, mode) == 0)
+ {
+ if (pl->used_flag_ptr != 0)
+ *pl->used_flag_ptr = 1;
+- return temp;
++ free (temp);
++ return temp2;
+ }
++ free (temp2);
+ }
+
+ /* Now try just the multilib_name. */
+ strcpy (temp, pl->prefix);
+ strcat (temp, machine_suffix);
+ strcat (temp, multilib_name);
+- if (access_check (temp, mode) == 0)
++ temp2 = update_path (temp, NULL);
++ if (access_check (temp2, mode) == 0)
+ {
+ if (pl->used_flag_ptr != 0)
+ *pl->used_flag_ptr = 1;
+- return temp;
++ free (temp);
++ return temp2;
+ }
++ free (temp2);
+ }
+
+ /* Certain prefixes are tried with just the machine type,
+@@ -2467,23 +2472,29 @@
+ strcat (temp, just_machine_suffix);
+ strcat (temp, multilib_name);
+ strcat (temp, file_suffix);
+- if (access_check (temp, mode) == 0)
++ temp2 = update_path (temp, NULL);
++ if (access_check (temp2, mode) == 0)
+ {
+ if (pl->used_flag_ptr != 0)
+ *pl->used_flag_ptr = 1;
+- return temp;
++ free (temp);
++ return temp2;
+ }
++ free (temp2);
+ }
+
+ strcpy (temp, pl->prefix);
+ strcat (temp, just_machine_suffix);
+ strcat (temp, multilib_name);
+- if (access_check (temp, mode) == 0)
++ temp2 = update_path (temp, NULL);
++ if (access_check (temp2, mode) == 0)
+ {
+ if (pl->used_flag_ptr != 0)
+ *pl->used_flag_ptr = 1;
+- return temp;
++ free (temp);
++ return temp2;
+ }
++ free (temp2);
+ }
+
+ /* Certain prefixes can't be used without the machine suffix
+@@ -2497,24 +2508,31 @@
+ strcpy (temp, pl->prefix);
+ strcat (temp, this_name);
+ strcat (temp, file_suffix);
+- if (access_check (temp, mode) == 0)
++ temp2 = update_path (temp, NULL);
++ if (access_check (temp2, mode) == 0)
+ {
+ if (pl->used_flag_ptr != 0)
+ *pl->used_flag_ptr = 1;
+- return temp;
++ free (temp);
++ return temp2;
+ }
++ free (temp2);
+ }
+
+ strcpy (temp, pl->prefix);
+ strcat (temp, this_name);
+- if (access_check (temp, mode) == 0)
++ temp2 = update_path (temp, NULL);
++ if (access_check (temp2, mode) == 0)
+ {
+ if (pl->used_flag_ptr != 0)
+ *pl->used_flag_ptr = 1;
+- return temp;
++ free (temp);
++ return temp2;
+ }
++ free (temp2);
+ }
+ }
++ }
+
+ free (temp);
+ return 0;
+--- gcc/prefix.c.orig 2005-12-01 18:38:38.000000000 -0200
++++ gcc/prefix.c 2005-12-01 18:46:37.000000000 -0200
+@@ -238,6 +238,105 @@
+ while (*string++);
+ }
+
++/* Strip dir/.. from a pathname when it makes sense, e.g., when this
++ would turn an inaccessible pathname into an accessible one.
++
++ We short-circuit dir/.. when dir does not exist, and when
++ some/dir/../thing does not exist but some/thing does. In case
++ there are multiple possible dir/../ stripping possibilities that
++ would turn an inaccessible pathname into an accessible one, the one
++ closer to the end of the pathname is preferred.
++
++ RESULT is the pathname that might contain such dotdot sequences to
++ be stripped. P points into RESULT, and indicates the location
++ where we should start looking for ../ sequences.
++
++ Even though RESULT is const, P is not, and that's because
++ characters in it may be temporarily overwritten, so RESULT must not
++ be in read-only storage.
++
++ The returned value is either a newly-allocated memory area, holding
++ a string that is the result of dotdot-stripping from the original
++ input strip, or RESULT itself, in which case any modifications made
++ to the string will have been undone. */
++
++static const char *
++maybe_strip_dotdots (const char *result, char *p)
++{
++ char *temp;
++ const char *path, *before, *after;
++ size_t len;
++
++ while (1)
++ {
++ p = strchr (p, '.');
++ if (p == NULL)
++ return result;
++ /* Look for `/../' */
++ if (p[1] == '.'
++ && IS_DIR_SEPARATOR (p[2])
++ && (p != result && IS_DIR_SEPARATOR (p[-1])))
++ break;
++ else
++ ++p;
++ }
++
++ *p = 0;
++ if (access (result, X_OK) == 0)
++ {
++ *p = '.';
++
++ path = maybe_strip_dotdots (result, p + 3);
++ if (access (path, F_OK) == 0)
++ return path;
++ if (path != result)
++ free ((char *) path);
++ }
++ else
++ *p = '.';
++
++ /* If we couldn't access the dir, or if recursion resulted in a
++ non-accessible pathname, we try stripping out dir/../. If `dir'
++ turns out to be `.', strip one more path component. */
++ before = p;
++ do
++ {
++ --before;
++ while (before != result && IS_DIR_SEPARATOR (*before))
++ --before;
++ while (before != result && !IS_DIR_SEPARATOR (before[-1]))
++ --before;
++ }
++ while (before != result && *before == '.'
++ && IS_DIR_SEPARATOR (*(before + 1)));
++ /* If we have something like `./..' or `/..', don't
++ strip anything more. */
++ if (*before == '.' || IS_DIR_SEPARATOR (*before))
++ return result;
++
++ after = p + 3;
++ while (IS_DIR_SEPARATOR (*after))
++ ++after;
++
++ len = (after - result) + strlen (after);
++
++ temp = xmalloc (len + 1 - (after - before));
++ memcpy (temp, result, before - result);
++ memcpy (temp + (before - result), after, len + 1 - (after - result));
++
++ path = maybe_strip_dotdots (temp, temp + (before - result));
++
++ if (path != temp)
++ free (temp);
++
++ if (access (path, F_OK) == 0)
++ result = path;
++ else if (path != result)
++ free ((char *) path);
++
++ return result;
++}
++
+ /* Update PATH using KEY if PATH starts with PREFIX. The returned
+ string is always malloc-ed, and the caller is responsible for
+ freeing it. */
+@@ -245,7 +344,7 @@
+ char *
+ update_path (const char *path, const char *key)
+ {
+- char *result, *p;
++ char *result, *temp;
+
+ if (! strncmp (path, std_prefix, strlen (std_prefix)) && key != 0)
+ {
+@@ -265,62 +364,11 @@
+ else
+ result = xstrdup (path);
+
+-#ifndef ALWAYS_STRIP_DOTDOT
+-#define ALWAYS_STRIP_DOTDOT 0
+-#endif
++ temp = result;
++ result = (char *) maybe_strip_dotdots (temp, temp);
+
+- p = result;
+- while (1)
+- {
+- char *src, *dest;
+-
+- p = strchr (p, '.');
+- if (p == NULL)
+- break;
+- /* Look for `/../' */
+- if (p[1] == '.'
+- && IS_DIR_SEPARATOR (p[2])
+- && (p != result && IS_DIR_SEPARATOR (p[-1])))
+- {
+- *p = 0;
+- if (!ALWAYS_STRIP_DOTDOT && access (result, X_OK) == 0)
+- {
+- *p = '.';
+- break;
+- }
+- else
+- {
+- /* We can't access the dir, so we won't be able to
+- access dir/.. either. Strip out `dir/../'. If `dir'
+- turns out to be `.', strip one more path component. */
+- dest = p;
+- do
+- {
+- --dest;
+- while (dest != result && IS_DIR_SEPARATOR (*dest))
+- --dest;
+- while (dest != result && !IS_DIR_SEPARATOR (dest[-1]))
+- --dest;
+- }
+- while (dest != result && *dest == '.');
+- /* If we have something like `./..' or `/..', don't
+- strip anything more. */
+- if (*dest == '.' || IS_DIR_SEPARATOR (*dest))
+- {
+- *p = '.';
+- break;
+- }
+- src = p + 3;
+- while (IS_DIR_SEPARATOR (*src))
+- ++src;
+- p = dest;
+- while ((*dest++ = *src++) != 0)
+- ;
+- }
+- }
+- else
+- ++p;
+- }
++ if (result != temp)
++ free (temp);
+
+ #ifdef UPDATE_PATH_HOST_CANONICALIZE
+ /* Perform host dependent canonicalization when needed. */
+2005-09-29 Alexandre Oliva <aoliva@redhat.com>
+
+ * error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message.
+
+ * g++.dg/overload/unknown1.C: New.
+
+--- gcc/cp/error.c.orig 2004-11-07 11:22:11.000000000 -0200
++++ gcc/cp/error.c 2005-09-29 16:13:20.000000000 -0300
+@@ -302,7 +302,7 @@
+ switch (TREE_CODE (t))
+ {
+ case UNKNOWN_TYPE:
+- pp_identifier (cxx_pp, "<unknown type>");
++ pp_identifier (cxx_pp, "<unresolved overloaded function type>");
+ break;
+
+ case TREE_LIST:
+--- gcc/testsuite/g++.dg/overload/unknown1.C 1970-01-01 00:00:00.000000000 +0000
++++ gcc/testsuite/g++.dg/overload/unknown1.C 2005-09-29 16:12:49.000000000 -0300
+@@ -0,0 +1,9 @@
++// { dg-do compile }
++
++void foo(void);
++int foo(int);
++template <typename T> void bar(T f);
++
++void baz() {
++ bar(foo); // { dg-error "<unresolved overloaded function type>" }
++}
+2005-12-18 Alexandre Oliva <aoliva@redhat.com>
+
+ * optabs.c (expand_vector_binop): Do not use a SUBREG to modify
+ a subword in the output if it matches any of the inputs.
+
+2006-04-20 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.c-torture/execute/20060420-1.c: New test.
+
+--- gcc/optabs.c.orig 2005-11-21 11:43:20.000000000 -0200
++++ gcc/optabs.c 2005-12-18 18:35:14.000000000 -0200
+@@ -1933,16 +1933,19 @@
+
+ for (i = 0; i < elts; ++i)
+ {
+- /* If this is part of a register, and not the first item in the
+- word, we can't store using a SUBREG - that would clobber
+- previous results.
++ /* If this is part of a register, and not the first item in
++ the word, we can't store using a SUBREG - that would
++ clobber previous results, or even the input operands, if
++ target matches any of them.
+ And storing with a SUBREG is only possible for the least
+ significant part, hence we can't do it for big endian
+ (unless we want to permute the evaluation order. */
+ if (GET_CODE (target) == REG
+ && (BYTES_BIG_ENDIAN
+ ? subsize < UNITS_PER_WORD
+- : ((i * subsize) % UNITS_PER_WORD) != 0))
++ : (((i * subsize) % UNITS_PER_WORD) != 0
++ || (subsize < UNITS_PER_WORD
++ && (target == op0 || target == op1)))))
+ t = NULL_RTX;
+ else
+ t = simplify_gen_subreg (submode, target, mode, i * subsize);
+--- gcc/testsuite/gcc.c-torture/execute/20060420-1.c.jj 2006-04-20 18:47:19.000000000 +0200
++++ gcc/testsuite/gcc.c-torture/execute/20060420-1.c 2006-04-20 19:07:20.000000000 +0200
+@@ -0,0 +1,71 @@
++extern void abort (void);
++
++typedef float v4flt __attribute__ ((vector_size (16)));
++
++void __attribute__ ((noinline)) foo (float *dst, float **src, int a, int n)
++{
++ int i, j;
++ int z = sizeof (v4flt) / sizeof (float);
++ unsigned m = sizeof (v4flt) - 1;
++
++ for (j = 0; j < n && (((unsigned long) dst + j) & m); ++j)
++ {
++ float t = src[0][j];
++ for (i = 1; i < a; ++i)
++ t += src[i][j];
++ dst[j] = t;
++ }
++
++ for (; j < (n - (4 * z - 1)); j += 4 * z)
++ {
++ v4flt t0 = *(v4flt *) (src[0] + j + 0 * z);
++ v4flt t1 = *(v4flt *) (src[0] + j + 1 * z);
++ v4flt t2 = *(v4flt *) (src[0] + j + 2 * z);
++ v4flt t3 = *(v4flt *) (src[0] + j + 3 * z);
++ for (i = 1; i < a; ++i)
++ {
++ t0 += *(v4flt *) (src[i] + j + 0 * z);
++ t1 += *(v4flt *) (src[i] + j + 1 * z);
++ t2 += *(v4flt *) (src[i] + j + 2 * z);
++ t3 += *(v4flt *) (src[i] + j + 3 * z);
++ }
++ *(v4flt *) (dst + j + 0 * z) = t0;
++ *(v4flt *) (dst + j + 1 * z) = t1;
++ *(v4flt *) (dst + j + 2 * z) = t2;
++ *(v4flt *) (dst + j + 3 * z) = t3;
++ }
++ for (; j < n; ++j)
++ {
++ float t = src[0][j];
++ for (i = 1; i < a; ++i)
++ t += src[i][j];
++ dst[j] = t;
++ }
++}
++
++float buffer[64];
++
++int
++main (void)
++{
++ int i;
++ float *dst, *src[2];
++
++ dst = buffer;
++ dst += (-(long int) buffer & (16 * sizeof (float) - 1)) / sizeof (float);
++ src[0] = dst + 16;
++ src[1] = dst + 32;
++ for (i = 0; i < 16; ++i)
++ {
++ src[0][i] = (float) i + 11 * (float) i;
++ src[1][i] = (float) i + 12 * (float) i;
++ }
++ foo (dst, src, 2, 16);
++ for (i = 0; i < 16; ++i)
++ {
++ float e = (float) i + 11 * (float) i + (float) i + 12 * (float) i;
++ if (dst[i] != e)
++ abort ();
++ }
++ return 0;
++}
+2006-03-01 Alexandre Oliva <aoliva@redhat.com>
+
+ * dwarf2out.c (dwarf2out_stack_adjust): Always track the stack
+ pointer, instead of assuming it is possible to derive the
+ correct args size from a call insn.
+
+--- gcc/dwarf2out.c.orig 2006-03-01 05:13:50.000000000 -0300
++++ gcc/dwarf2out.c 2006-03-01 05:41:38.000000000 -0300
+@@ -1069,26 +1069,6 @@ dwarf2out_stack_adjust (rtx insn)
+ if (prologue_epilogue_contains (insn) || sibcall_epilogue_contains (insn))
+ return;
+
+- if (!flag_asynchronous_unwind_tables && GET_CODE (insn) == CALL_INSN)
+- {
+- /* Extract the size of the args from the CALL rtx itself. */
+- insn = PATTERN (insn);
+- if (GET_CODE (insn) == PARALLEL)
+- insn = XVECEXP (insn, 0, 0);
+- if (GET_CODE (insn) == SET)
+- insn = SET_SRC (insn);
+- if (GET_CODE (insn) != CALL)
+- abort ();
+-
+- dwarf2out_args_size ("", INTVAL (XEXP (insn, 1)));
+- return;
+- }
+-
+- /* If only calls can throw, and we have a frame pointer,
+- save up adjustments until we see the CALL_INSN. */
+- else if (!flag_asynchronous_unwind_tables && cfa.reg != STACK_POINTER_REGNUM)
+- return;
+-
+ if (GET_CODE (insn) == BARRIER)
+ {
+ /* When we see a BARRIER, we know to reset args_size to 0. Usually
+@@ -1111,9 +1091,20 @@ dwarf2out_stack_adjust (rtx insn)
+ if (GET_CODE (XVECEXP (PATTERN (insn), 0, i)) == SET)
+ offset += stack_adjust_offset (XVECEXP (PATTERN (insn), 0, i));
+ }
++ else if (GET_CODE (insn) == CALL_INSN)
++ offset = 0;
+ else
+ return;
+
++ /* We handle this separately because we want stack adjustments in a
++ CALL_INSN to be handled. */;
++ if (GET_CODE (insn) == CALL_INSN)
++ {
++ /* If only calls can throw, adjust args_size only at call sites. */
++ if (!flag_asynchronous_unwind_tables)
++ dwarf2out_args_size ("", args_size);
++ }
++
+ if (offset == 0)
+ return;
+
+@@ -1128,6 +1119,16 @@ dwarf2out_stack_adjust (rtx insn)
+ if (args_size < 0)
+ args_size = 0;
+
++ /* If only calls can throw and we have a frame pointer, we'll save
++ up adjustments until we see the CALL_INSN. We used to return
++ early and derive args_size from NARGS in the CALL_INSN itself,
++ but that doesn't compute the right value if we have nested call
++ expansions, e.g., stack adjustments for a call have already been
++ emitted, and then we issue another call to compute an argument
++ for the enclosing call (i.e., bar (foo ())). */
++ if (!flag_asynchronous_unwind_tables && cfa.reg != STACK_POINTER_REGNUM)
++ return;
++
+ label = dwarf2out_cfi_label ();
+ def_cfa_1 (label, &cfa);
+ dwarf2out_args_size (label, args_size);
+2006-02-25 Alexandre Oliva <aoliva@redhat.com>
+
+ * varasm.c (copy_constant): Handle VECTOR_CST.
+
+ * gcc.dg/altivec-23.c: New test.
+
+--- gcc/varasm.c 2006-02-25 03:52:54.000000000 -0300
++++ gcc/varasm.c 2006-02-25 03:54:56.000000000 -0300
+@@ -2464,6 +2464,19 @@ copy_constant (tree exp)
+ return copy;
+ }
+
++ case VECTOR_CST:
++ {
++ tree copy = copy_node (exp);
++ tree list = copy_list (TREE_VECTOR_CST_ELTS (exp));
++ tree tail;
++
++ TREE_VECTOR_CST_ELTS (copy) = list;
++ for (tail = list; tail; tail = TREE_CHAIN (tail))
++ TREE_VALUE (tail) = copy_constant (TREE_VALUE (tail));
++
++ return copy;
++ }
++
+ default:
+ {
+ tree t;
+--- gcc/testsuite/gcc.dg/altivec-23.c 1970-01-01 00:00:00.000000000 +0000
++++ gcc/testsuite/gcc.dg/altivec-23.c 2006-02-25 04:10:36.000000000 -0300
+@@ -0,0 +1,25 @@
++/* Verify that it is possible to define variables of composite types
++ containing vector types. We used to crash handling the
++ initializer of automatic ones. */
++
++/* { dg-do compile { target powerpc*-*-* } } */
++/* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "-maltivec" } { "" } } */
++/* { dg-options "-maltivec -mabi=altivec" } */
++
++#include <altivec.h>
++
++typedef int bt;
++typedef vector bt vt;
++typedef struct { vt x; bt y[sizeof(vt) / sizeof (bt)]; } st;
++#define INIT { 1, 2, 3, 4 }
++
++void f ()
++{
++ vt x = INIT;
++ vt y[1] = { INIT };
++ st s = { INIT, INIT };
++}
++
++vt x = INIT;
++vt y[1] = { INIT };
++st s = { INIT, INIT };
+2006-12-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * g++.dg/template/array17.C: New test.
+
+2006-10-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * typeck.c (non_reference): Don't dereference NULL type.
+
+--- gcc/cp/typeck.c.orig 2005-11-21 11:56:03.000000000 -0200
++++ gcc/cp/typeck.c 2006-10-27 03:28:04.000000000 -0300
+@@ -6443,7 +6443,7 @@ casts_away_constness (tree t1, tree t2)
+ tree
+ non_reference (tree t)
+ {
+- if (TREE_CODE (t) == REFERENCE_TYPE)
++ if (t != NULL_TREE && TREE_CODE (t) == REFERENCE_TYPE)
+ t = TREE_TYPE (t);
+ return t;
+ }
+--- gcc/testsuite/g++.dg/template/array17.C 2006-10-04 16:28:56.502613000 +0200
++++ gcc/testsuite/g++.dg/template/array17.C 2006-12-08 12:38:27.000000000 +0100
+@@ -0,0 +1,23 @@
++// { dg-do compile }
++
++template <typename T>
++struct V {
++ T& operator[](int);
++};
++
++struct S {
++ S operator +(int);
++ template <typename T> T value();
++};
++
++template <typename T>
++void R (T v)
++{
++ v[(S() + 0).template value<int>()][0] = 0;
++}
++
++int
++main ()
++{
++ R(V<V<int> >());
++}
+2006-12-08 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/opt/ifcvt1.C: New test.
+
+2005-11-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * ifcvt.c (noce_get_alt_condition): Use prev_nonnote_insn.
+ (noce_try_abs): Negate if the comparison is reversed.
+ Look only one instruction backwards for a REG_EQUAL note.
+
+ * gcc.dg/ifcvt-fabs-1.c: New test.
+
+--- gcc/ifcvt.c.orig 2005-11-21 11:43:21.000000000 -0200
++++ gcc/ifcvt.c 2006-10-26 02:21:07.000000000 -0300
+@@ -1406,7 +1406,7 @@ noce_get_alt_condition (struct noce_if_i
+ rtx prev_insn;
+
+ /* First, look to see if we put a constant in a register. */
+- prev_insn = PREV_INSN (if_info->cond_earliest);
++ prev_insn = prev_nonnote_insn (if_info->cond_earliest);
+ if (prev_insn
+ && INSN_P (prev_insn)
+ && GET_CODE (PATTERN (prev_insn)) == SET)
+@@ -1642,25 +1642,30 @@ noce_try_abs (struct noce_if_info *if_in
+ if (rtx_equal_p (XEXP (cond, 0), b))
+ c = XEXP (cond, 1);
+ else if (rtx_equal_p (XEXP (cond, 1), b))
+- c = XEXP (cond, 0);
++ {
++ c = XEXP (cond, 0);
++ negate = !negate;
++ }
+ else
+ return FALSE;
+
+- /* Verify that C is zero. Search backward through the block for
+- a REG_EQUAL note if necessary. */
++ /* Verify that C is zero. Search one step backward for a
++ REG_EQUAL note or a simple source if necessary. */
+ if (REG_P (c))
+ {
+- rtx insn, note = NULL;
+- for (insn = earliest;
+- insn != BB_HEAD (if_info->test_bb);
+- insn = PREV_INSN (insn))
+- if (INSN_P (insn)
+- && ((note = find_reg_note (insn, REG_EQUAL, c))
+- || (note = find_reg_note (insn, REG_EQUIV, c))))
+- break;
+- if (! note)
++ rtx set, insn = prev_nonnote_insn (earliest);
++ if (insn
++ && (set = single_set (insn))
++ && rtx_equal_p (SET_DEST (set), c))
++ {
++ rtx note = find_reg_equal_equiv_note (insn);
++ if (note)
++ c = XEXP (note, 0);
++ else
++ c = SET_SRC (set);
++ }
++ else
+ return FALSE;
+- c = XEXP (note, 0);
+ }
+ if (GET_CODE (c) == MEM
+ && GET_CODE (XEXP (c, 0)) == SYMBOL_REF
+--- gcc/testsuite/gcc.dg/ifcvt-fabs-1.c 1970-01-01 00:00:00.000000000 +0000
++++ gcc/testsuite/gcc.dg/ifcvt-fabs-1.c 2006-10-26 02:20:24.000000000 -0300
+@@ -0,0 +1,21 @@
++/* { dg-do run } */
++/* { dg-options "-O" } */
++/* { dg-options "-O -march=i686" { target i686-*-* } } */
++
++extern void abort(void);
++
++float foo(float f)
++{
++ if (f < 0.0f)
++ f = -f;
++
++ return f;
++}
++
++int main(void)
++{
++ if (foo (-1.0f) != 1.0f)
++ abort ();
++
++ return 0;
++}
+--- gcc/testsuite/g++.dg/opt/ifcvt1.C 2006-10-04 16:28:56.502613000 +0200
++++ gcc/testsuite/g++.dg/opt/ifcvt1.C 2006-12-08 12:23:23.000000000 +0100
+@@ -0,0 +1,17 @@
++// { dg-do compile }
++// { dg-options "-O2 -fnon-call-exceptions" }
++
++struct S { ~S () throw () {} };
++double bar ();
++
++int
++foo ()
++{
++ S a;
++ int i = 0;
++ double c = bar ();
++ c = c < 0 ? -c : c;
++ if (c <= 1.e-8)
++ i += 24;
++ return i;
++}
+2007-04-02 Jakub Jelinek <jakub@redhat.com>
+
+ * expr.c (expand_expr_real) <case COMPLEX_EXPR>: Force op1
+ into register if target overlaps with op1.
+
+ * g77.f-torture/execute/20070402.f: New test.
+
+--- gcc/expr.c.jj 2006-10-05 00:37:01.000000000 +0200
++++ gcc/expr.c 2007-04-02 13:28:52.000000000 +0200
+@@ -8949,6 +8949,9 @@ expand_expr_real (tree exp, rtx target,
+
+ if (! target)
+ target = gen_reg_rtx (TYPE_MODE (TREE_TYPE (exp)));
++ else if (GET_CODE (target) == MEM
++ && reg_overlap_mentioned_p (target, op1))
++ op1 = force_reg (mode, op1);
+
+ start_sequence ();
+
+--- gcc/testsuite/g77.f-torture/execute/20070402.f.jj 2007-04-02 13:29:51.000000000 +0200
++++ gcc/testsuite/g77.f-torture/execute/20070402.f 2007-04-02 12:11:00.000000000 +0200
+@@ -0,0 +1,21 @@
++ program rh233941
++ implicit none
++ complex*16 z
++ z = dcmplx(1.0, 2.0)
++ call sub(z)
++ stop
++ end program rh233941
++
++ subroutine sub(z)
++ implicit none
++ complex*16 z
++ z = dcmplx(-dimag(z), dreal(z))
++ call sub2(z)
++ return
++ end subroutine sub
++
++ subroutine sub2(z)
++ implicit none
++ complex*16 z
++ if (dreal(z).ne.-2.0.or.dimag(z).ne.1.0) call abort
++ end subroutine sub2
+2007-01-24 Steve LoBasso <slobasso@yahoo.com>
+ Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/deque.tcc (deque<>::erase(iterator, iterator)):
+ Fix condition.
+ * testsuite/23_containers/deque/modifiers/erase/3.cc: New.
+
+--- libstdc++-v3/include/bits/deque.tcc (revision 121146)
++++ libstdc++-v3/include/bits/deque.tcc (revision 121147)
+@@ -140,7 +140,7 @@ namespace _GLIBCXX_STD
+ {
+ const difference_type __n = __last - __first;
+ const difference_type __elems_before = __first - this->_M_impl._M_start;
+- if (static_cast<size_type>(__elems_before) < (size() - __n) / 2)
++ if (static_cast<size_type>(__elems_before) <= (size() - __n) / 2)
+ {
+ std::copy_backward(this->_M_impl._M_start, __first, __last);
+ iterator __new_start = this->_M_impl._M_start + __n;
+--- libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/3.cc (revision 0)
++++ libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/3.cc (revision 121147)
+@@ -0,0 +1,52 @@
++// Copyright (C) 2007 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
++// USA.
++
++// 23.2.1.3 deque modifiers
++
++#include <deque>
++#include <testsuite_hooks.h>
++
++void erase(size_t num_elm, size_t elm_strt, size_t elm_end)
++{
++ bool test __attribute__((unused)) = true;
++ using __gnu_test::copy_tracker;
++ using __gnu_test::assignment_operator;
++
++ std::deque<copy_tracker> x(num_elm);
++ copy_tracker::reset();
++
++ x.erase(x.begin() + elm_strt, x.begin() + elm_end);
++
++ const size_t min_num_cpy = std::min(elm_strt, num_elm - elm_end);
++ VERIFY( assignment_operator::count() == min_num_cpy );
++}
++
++// http://gcc.gnu.org/ml/libstdc++/2007-01/msg00098.html
++void test01()
++{
++ for (size_t num_elm = 0; num_elm <= 10; ++num_elm)
++ for (size_t elm_strt = 0; elm_strt <= num_elm; ++elm_strt)
++ for (size_t elm_end = elm_strt; elm_end <= num_elm; ++elm_end)
++ erase(num_elm, elm_strt, elm_end);
++}
++
++int main()
++{
++ test01();
++ return 0;
++}
+2007-04-12 Jakub Jelinek <jakub@redhat.com>
+
+ * fr.po: Use %s rather than %S.
+ * rw.po: Comment out translations with bogus format
+ strings.
+
+--- gcc/po/fr.po.jj 2006-10-05 00:33:36.000000000 +0200
++++ gcc/po/fr.po 2007-04-13 00:23:29.000000000 +0200
+@@ -17100,7 +17100,7 @@ msgstr "%s liste d'expressions traitée c
+
+ #: cp/typeck.c:4490
+ msgid "%s from type `%T' to type `%T' casts away constness"
+-msgstr "%S à partir du « %T » vers le type « %T » provoque un transtypage sans constante"
++msgstr "%s à partir du « %T » vers le type « %T » provoque un transtypage sans constante"
+
+ #: cp/typeck.c:4692
+ msgid "invalid static_cast from type `%T' to type `%T'"
+2007-04-21 Alexandre Oliva <aoliva@redhat.com>
+
+ * gcse.c (store_killed_in_insn): Handle PARALLELs.
+ (store_killed_in_pat): New.
+
+ * gcc.dg/movsi-sm-1.c: New.
+
+--- gcc/gcse.c.jj 2007-02-23 21:29:12.000000000 +0100
++++ gcc/gcse.c 2007-07-18 20:41:08.000000000 +0200
+@@ -7427,6 +7427,40 @@ find_loads (rtx x, rtx store_pattern, in
+ return ret;
+ }
+
++static inline bool
++store_killed_in_pat (rtx x, rtx pat, int after)
++{
++ if (GET_CODE (pat) == SET)
++ {
++ rtx dest = SET_DEST (pat);
++
++ if (GET_CODE (dest) == SIGN_EXTRACT
++ || GET_CODE (dest) == ZERO_EXTRACT)
++ dest = XEXP (dest, 0);
++
++ /* Check for memory stores to aliased objects. */
++ if (GET_CODE (dest) == MEM
++ && !expr_equiv_p (dest, x))
++ {
++ if (after)
++ {
++ if (output_dependence (dest, x))
++ return true;
++ }
++ else
++ {
++ if (output_dependence (x, dest))
++ return true;
++ }
++ }
++ }
++
++ if (find_loads (pat, x, after))
++ return true;
++
++ return false;
++}
++
+ /* Check if INSN kills the store pattern X (is aliased with it).
+ AFTER is true if we are checking the case when store X occurs
+ after the insn. Return true if it it does. */
+@@ -7434,7 +7468,7 @@ find_loads (rtx x, rtx store_pattern, in
+ static bool
+ store_killed_in_insn (rtx x, rtx x_regs, rtx insn, int after)
+ {
+- rtx reg, base, note;
++ rtx reg, base, note, pat;
+
+ if (!INSN_P (insn))
+ return false;
+@@ -7461,33 +7495,20 @@ store_killed_in_insn (rtx x, rtx x_regs,
+ return false;
+ }
+
+- if (GET_CODE (PATTERN (insn)) == SET)
++ pat = PATTERN (insn);
++ if (GET_CODE (pat) == SET)
+ {
+- rtx pat = PATTERN (insn);
+- rtx dest = SET_DEST (pat);
+-
+- if (GET_CODE (dest) == SIGN_EXTRACT
+- || GET_CODE (dest) == ZERO_EXTRACT)
+- dest = XEXP (dest, 0);
+-
+- /* Check for memory stores to aliased objects. */
+- if (GET_CODE (dest) == MEM
+- && !expr_equiv_p (dest, x))
+- {
+- if (after)
+- {
+- if (output_dependence (dest, x))
+- return true;
+- }
+- else
+- {
+- if (output_dependence (x, dest))
+- return true;
+- }
+- }
+- if (find_loads (SET_SRC (pat), x, after))
++ if (store_killed_in_pat (x, pat, after))
+ return true;
+ }
++ else if (GET_CODE (pat) == PARALLEL)
++ {
++ int i;
++
++ for (i = 0; i < XVECLEN (pat, 0); i++)
++ if (store_killed_in_pat (x, XVECEXP (pat, 0, i), after))
++ return true;
++ }
+ else if (find_loads (PATTERN (insn), x, after))
+ return true;
+
+--- gcc/testsuite/gcc.dg/movsi-sm-1.c.jj 2007-07-18 20:58:08.000000000 +0200
++++ gcc/testsuite/gcc.dg/movsi-sm-1.c 2007-07-18 21:01:52.000000000 +0200
+@@ -0,0 +1,35 @@
++/* { dg-do run } */
++/* { dg-options "-O2" } */
++/* { dg-options "-O2 -mtune=i386" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
++
++int ret = 1;
++char buf[128];
++
++void
++__attribute__((noinline))
++bug (int arg)
++{
++ char str[28];
++
++ __builtin_memcpy (str, "Bugged!", 8);
++
++ if (arg & 0200)
++ {
++ __builtin_memcpy (str, "This is what we should get!", 28);
++ ret = 0;
++ }
++
++ if (arg & 0100)
++ __builtin_memcpy (str, "Broken!", 8);
++
++ __builtin_sprintf (buf, "%s\n", str);
++}
++
++int
++main ()
++{
++ bug (0200);
++ if (ret)
++ return ret;
++ return __builtin_strcmp (buf, "This is what we should get!\n") != 0;
++}
+2007-06-08 Jatin Nansi <jnansi@redhat.com>
+
+ * config/locale/ieee_1003.1-2001/codecvt_specializations.h: Make sure
+ _M_int_enc and _M_ext_enc are '\0' terminated.
+
+--- libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h.jj 2007-02-23 21:29:34.000000000 +0100
++++ libstdc++-v3/config/locale/ieee_1003.1-2001/codecvt_specializations.h 2007-07-19 14:20:20.000000000 +0200
+@@ -83,8 +83,10 @@
+ int __ibom = 0, int __ebom = 0)
+ : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(__ebom), _M_int_bom(__ibom)
+ {
+- strncpy(_M_int_enc, __int, _S_max_size);
+- strncpy(_M_ext_enc, __ext, _S_max_size);
++ strncpy(_M_int_enc, __int, _S_max_size - 1);
++ strncpy(_M_ext_enc, __ext, _S_max_size - 1);
++ _M_int_enc[_S_max_size - 1] = '\0';
++ _M_ext_enc[_S_max_size - 1] = '\0';
+ _M_init();
+ }
+
+@@ -98,8 +100,10 @@
+ // information.
+ __enc_traits(const __enc_traits& __obj): _M_in_desc(0), _M_out_desc(0)
+ {
+- strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
+- strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
++ strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size - 1);
++ strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size - 1);
++ _M_int_enc[_S_max_size - 1] = '\0';
++ _M_ext_enc[_S_max_size - 1] = '\0';
+ _M_ext_bom = __obj._M_ext_bom;
+ _M_int_bom = __obj._M_int_bom;
+ _M_destroy();
+@@ -110,8 +114,10 @@
+ __enc_traits&
+ operator=(const __enc_traits& __obj)
+ {
+- strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
+- strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
++ strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size - 1);
++ strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size - 1);
++ _M_int_enc[_S_max_size - 1] = '\0';
++ _M_ext_enc[_S_max_size - 1] = '\0';
+ _M_ext_bom = __obj._M_ext_bom;
+ _M_int_bom = __obj._M_int_bom;
+ _M_destroy();
--- /dev/null
+Index: gcc/ChangeLog
+from Alexandre Oliva <aoliva@redhat.com>
+
+ PR middle-end/15666
+ * c-decl.c (finish_decl): Use change_decl_assembler_name for the
+ builtin decl as well.
+
+Index: gcc/c-decl.c
+===================================================================
+RCS file: /cvs/gcc/gcc/gcc/c-decl.c,v
+retrieving revision 1.504
+diff -u -p -r1.504 c-decl.c
+--- gcc/c-decl.c 31 May 2004 22:06:27 -0000 1.504
++++ gcc/c-decl.c 1 Jun 2004 04:03:41 -0000
+@@ -2886,7 +2886,7 @@ finish_decl (tree decl, tree init, tree
+ {
+ tree builtin = built_in_decls [DECL_FUNCTION_CODE (decl)];
+ SET_DECL_RTL (builtin, NULL_RTX);
+- SET_DECL_ASSEMBLER_NAME (builtin, get_identifier (starred));
++ change_decl_assembler_name (builtin, get_identifier (starred));
+ #ifdef TARGET_MEM_FUNCTIONS
+ if (DECL_FUNCTION_CODE (decl) == BUILT_IN_MEMCPY)
+ init_block_move_fn (starred);
--- /dev/null
+diff -uNr gcc-3.4.3.orig/gcc/calls.c gcc-3.4.3/gcc/calls.c
+--- gcc-3.4.3.orig/gcc/calls.c 2004-06-24 09:26:50.000000000 +0200
++++ gcc-3.4.3/gcc/calls.c 2004-11-24 18:35:31.000000000 +0100
+@@ -2321,8 +2321,12 @@
+ {
+ /* For variable-sized objects, we must be called with a target
+ specified. If we were to allocate space on the stack here,
+- we would have no way of knowing when to free it. */
+- rtx d = assign_temp (TREE_TYPE (exp), 1, 1, 1);
++ we would have no way of knowing when to free it.
++
++ This is the structure of a function return object and it isn't
++ a character array for the stack protection, so it is
++ marked using the assignment of the KEEP argument to 5. */
++ rtx d = assign_temp (TREE_TYPE (exp), 5, 1, 1);
+
+ mark_temp_addr_taken (d);
+ structure_value_addr = XEXP (d, 0);
+diff -uNr gcc-3.4.3.orig/gcc/c-cppbuiltin.c gcc-3.4.3/gcc/c-cppbuiltin.c
+--- gcc-3.4.3.orig/gcc/c-cppbuiltin.c 2004-03-04 11:24:54.000000000 +0100
++++ gcc-3.4.3/gcc/c-cppbuiltin.c 2004-11-24 18:35:31.000000000 +0100
+@@ -408,6 +408,12 @@
+ if (c_dialect_objc () && flag_next_runtime)
+ cpp_define (pfile, "__NEXT_RUNTIME__");
+
++ /* Make the choice of the stack protector runtime visible to source code. */
++ if (flag_propolice_protection)
++ cpp_define (pfile, "__SSP__=1");
++ if (flag_stack_protection)
++ cpp_define (pfile, "__SSP_ALL__=2");
++
+ /* A straightforward target hook doesn't work, because of problems
+ linking that hook's body when part of non-C front ends. */
+ # define preprocessing_asm_p() (cpp_get_options (pfile)->lang == CLK_ASM)
+diff -uNr gcc-3.4.3.orig/gcc/combine.c gcc-3.4.3/gcc/combine.c
+--- gcc-3.4.3.orig/gcc/combine.c 2004-10-13 01:35:29.000000000 +0200
++++ gcc-3.4.3/gcc/combine.c 2004-11-24 18:35:31.000000000 +0100
+@@ -1401,6 +1401,10 @@
+ && ! fixed_regs[REGNO (dest)]
+ && CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (REGNO (dest))))))
+ return 1;
++ /* Never combine loads and stores protecting argument that use set insn
++ with used flag on. */
++ if (SET_VOLATILE_P (set))
++ return 1;
+
+ return 0;
+ }
+@@ -3781,7 +3785,20 @@
+ rtx inner_op0 = XEXP (XEXP (x, 0), 1);
+ rtx inner_op1 = XEXP (x, 1);
+ rtx inner;
+-
++
++#ifndef FRAME_GROWS_DOWNWARD
++ /* For the case where the frame grows upward,
++ the stack protector keeps the offset of the frame pointer
++ positive integer. */
++ if (flag_propolice_protection
++ && code == PLUS
++ && other == frame_pointer_rtx
++ && GET_CODE (inner_op0) == CONST_INT
++ && GET_CODE (inner_op1) == CONST_INT
++ && INTVAL (inner_op0) > 0
++ && INTVAL (inner_op0) + INTVAL (inner_op1) <= 0)
++ return x;
++#endif
+ /* Make sure we pass the constant operand if any as the second
+ one if this is a commutative operation. */
+ if (CONSTANT_P (inner_op0) && GET_RTX_CLASS (code) == 'c')
+@@ -4146,6 +4163,13 @@
+ they are now checked elsewhere. */
+ if (GET_CODE (XEXP (x, 0)) == PLUS
+ && CONSTANT_ADDRESS_P (XEXP (XEXP (x, 0), 1)))
++#ifndef FRAME_GROWS_DOWNWARD
++ /* The stack protector keeps the addressing style of a local variable
++ to be able to change its stack position. */
++ if (! (flag_propolice_protection
++ && XEXP (XEXP (x, 0), 0) == frame_pointer_rtx
++ && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT))
++#endif
+ return gen_binary (PLUS, mode,
+ gen_binary (PLUS, mode, XEXP (XEXP (x, 0), 0),
+ XEXP (x, 1)),
+@@ -4273,8 +4297,14 @@
+ }
+
+ /* Canonicalize (minus A (plus B C)) to (minus (minus A B) C) for
+- integers. */
+- if (GET_CODE (XEXP (x, 1)) == PLUS && INTEGRAL_MODE_P (mode))
++ integers.
++
++ The stack protector keeps the addressing style of
++ a local variable. */
++ if (GET_CODE (XEXP (x, 1)) == PLUS && INTEGRAL_MODE_P (mode)
++ && (! (flag_propolice_protection
++ && XEXP (XEXP (x, 1), 0) == frame_pointer_rtx
++ && GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT)))
+ return gen_binary (MINUS, mode,
+ gen_binary (MINUS, mode, XEXP (x, 0),
+ XEXP (XEXP (x, 1), 0)),
+diff -uNr gcc-3.4.3.orig/gcc/common.opt gcc-3.4.3/gcc/common.opt
+--- gcc-3.4.3.orig/gcc/common.opt 2004-11-24 18:04:19.000000000 +0100
++++ gcc-3.4.3/gcc/common.opt 2004-11-24 18:35:31.000000000 +0100
+@@ -152,6 +152,10 @@
+ Common
+ Warn when a variable is unused
+
++Wstack-protector
++Common
++Warn when not issuing stack smashing protection for some reason
++
+ aux-info
+ Common Separate
+ -aux-info <file> Emit declaration information into <file>
+@@ -743,6 +747,14 @@
+ Common
+ Put zero initialized data in the bss section
+
++fstack-protector
++Common
++Enables stack protection
++
++fstack-protector-all
++Common
++Enables stack protection of every function
++
+ g
+ Common JoinedOrMissing
+ Generate debug information in default format
+diff -uNr gcc-3.4.3.orig/gcc/config/arm/arm.md gcc-3.4.3/gcc/config/arm/arm.md
+--- gcc-3.4.3.orig/gcc/config/arm/arm.md 2004-08-25 17:46:19.000000000 +0200
++++ gcc-3.4.3/gcc/config/arm/arm.md 2004-11-24 18:35:31.000000000 +0100
+@@ -3840,7 +3840,13 @@
+ (match_operand:DI 1 "general_operand" ""))]
+ "TARGET_EITHER"
+ "
+- if (TARGET_THUMB)
++ if (TARGET_ARM)
++ {
++ /* Everything except mem = const or mem = mem can be done easily */
++ if (GET_CODE (operands[0]) == MEM)
++ operands[1] = force_reg (DImode, operands[1]);
++ }
++ else /* TARGET_THUMB.... */
+ {
+ if (!no_new_pseudos)
+ {
+diff -uNr gcc-3.4.3.orig/gcc/config/t-linux gcc-3.4.3/gcc/config/t-linux
+--- gcc-3.4.3.orig/gcc/config/t-linux 2003-09-23 20:55:57.000000000 +0200
++++ gcc-3.4.3/gcc/config/t-linux 2004-11-24 18:35:31.000000000 +0100
+@@ -1,7 +1,7 @@
+ # Compile crtbeginS.o and crtendS.o with pic.
+ CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC
+ # Compile libgcc2.a with pic.
+-TARGET_LIBGCC2_CFLAGS = -fPIC
++TARGET_LIBGCC2_CFLAGS = -fPIC -DHAVE_SYSLOG
+
+ # Override t-slibgcc-elf-ver to export some libgcc symbols with
+ # the symbol versions that glibc used.
+diff -uNr gcc-3.4.3.orig/gcc/configure gcc-3.4.3/gcc/configure
+--- gcc-3.4.3.orig/gcc/configure 2004-11-05 05:14:05.000000000 +0100
++++ gcc-3.4.3/gcc/configure 2004-11-24 18:44:13.000000000 +0100
+@@ -4809,6 +4809,9 @@
+ fi;
+
+
++ENABLESSP=""
++
++
+ # -------------------------
+ # Checks for other programs
+ # -------------------------
+@@ -13036,6 +13039,7 @@
+ s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
+ s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t
+ s,@onestep@,$onestep,;t t
++s,@ENABLESSP@,$ENABLESSP,;t t
+ s,@SET_MAKE@,$SET_MAKE,;t t
+ s,@AWK@,$AWK,;t t
+ s,@LN@,$LN,;t t
+diff -uNr gcc-3.4.3.orig/gcc/configure.ac gcc-3.4.3/gcc/configure.ac
+--- gcc-3.4.3.orig/gcc/configure.ac 2004-11-24 18:04:19.000000000 +0100
++++ gcc-3.4.3/gcc/configure.ac 2004-11-24 18:46:57.000000000 +0100
+@@ -613,6 +613,9 @@
+ [onestep=""])
+ AC_SUBST(onestep)
+
++ENABLESSP=""
++AC_SUBST(ENABLESSP)
++
+ # -------------------------
+ # Checks for other programs
+ # -------------------------
+diff -uNr gcc-3.4.3.orig/gcc/cse.c gcc-3.4.3/gcc/cse.c
+--- gcc-3.4.3.orig/gcc/cse.c 2004-10-26 20:05:42.000000000 +0200
++++ gcc-3.4.3/gcc/cse.c 2004-11-24 18:35:31.000000000 +0100
+@@ -4212,7 +4212,14 @@
+
+ if (new_const == 0)
+ break;
+-
++#ifndef FRAME_GROWS_DOWNWARD
++ if (flag_propolice_protection
++ && GET_CODE (y) == PLUS
++ && XEXP (y, 0) == frame_pointer_rtx
++ && INTVAL (inner_const) > 0
++ && INTVAL (new_const) <= 0)
++ break;
++#endif
+ /* If we are associating shift operations, don't let this
+ produce a shift of the size of the object or larger.
+ This could occur when we follow a sign-extend by a right
+@@ -4744,6 +4751,14 @@
+ if (SET_DEST (x) == pc_rtx
+ && GET_CODE (SET_SRC (x)) == LABEL_REF)
+ ;
++ /* cut the reg propagation of stack-protected argument. */
++ else if (SET_VOLATILE_P (x)) {
++ rtx x1 = SET_DEST (x);
++ if (GET_CODE (x1) == SUBREG && GET_CODE (SUBREG_REG (x1)) == REG)
++ x1 = SUBREG_REG (x1);
++ if (! REGNO_QTY_VALID_P(REGNO (x1)))
++ make_new_qty (REGNO (x1), GET_MODE (x1));
++ }
+
+ /* Don't count call-insns, (set (reg 0) (call ...)), as a set.
+ The hard function value register is used only once, to copy to
+diff -uNr gcc-3.4.3.orig/gcc/doc/invoke.texi gcc-3.4.3/gcc/doc/invoke.texi
+--- gcc-3.4.3.orig/gcc/doc/invoke.texi 2004-11-24 18:04:19.000000000 +0100
++++ gcc-3.4.3/gcc/doc/invoke.texi 2004-11-24 18:35:32.000000000 +0100
+@@ -228,7 +228,7 @@
+ -Wno-multichar -Wnonnull -Wpacked -Wpadded @gol
+ -Wparentheses -Wpointer-arith -Wredundant-decls @gol
+ -Wreturn-type -Wsequence-point -Wshadow @gol
+--Wsign-compare -Wstrict-aliasing @gol
++-Wsign-compare -Wstack-protector -Wstrict-aliasing @gol
+ -Wswitch -Wswitch-default -Wswitch-enum @gol
+ -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized @gol
+ -Wunknown-pragmas -Wunreachable-code @gol
+@@ -673,6 +673,7 @@
+ -fshort-double -fshort-wchar @gol
+ -fverbose-asm -fpack-struct -fstack-check @gol
+ -fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol
++-fstack-protector -fstack-protector-all @gol
+ -fargument-alias -fargument-noalias @gol
+ -fargument-noalias-global -fleading-underscore @gol
+ -ftls-model=@var{model} @gol
+@@ -3006,6 +3007,10 @@
+ complex; GCC will refuse to optimize programs when the optimization
+ itself is likely to take inordinate amounts of time.
+
++@item -Wstack-protector
++@opindex Wstack-protector
++Warn when not issuing stack smashing protection for some reason.
++
+ @item -Werror
+ @opindex Werror
+ Make all warnings into errors.
+@@ -11202,6 +11207,24 @@
+ @option{-Wl,--defsym,__stack_limit=0x7ffe0000} to enforce a stack limit
+ of 128KB@. Note that this may only work with the GNU linker.
+
++@item -fstack-protector
++@item -fstack-protector-all
++@opindex fstack-protector
++@opindex fstack-protector-all
++@opindex fno-stack-protector
++Generate code to protect an application from a stack smashing
++attack. The features are (1) the insertion of random value next to the
++frame pointer to detect the integrity of the stack, (2) the reordering
++of local variables to place buffers after pointers to avoid the
++corruption of pointers that could be used to further corrupt arbitrary
++memory locations, (3) the copying of pointers in function arguments to
++an area preceding local variable buffers to prevent the corruption of
++pointers that could be used to further corrupt arbitrary memory
++locations, and the (4) omission of instrumentation code from some
++functions to decrease the performance overhead. If the integrity
++would be broken, the program is aborted. If stack-protector-all is
++specified, instrumentation codes are generated at every functions.
++
+ @cindex aliasing of parameters
+ @cindex parameters, aliased
+ @item -fargument-alias
+diff -uNr gcc-3.4.3.orig/gcc/explow.c gcc-3.4.3/gcc/explow.c
+--- gcc-3.4.3.orig/gcc/explow.c 2004-04-03 01:05:26.000000000 +0200
++++ gcc-3.4.3/gcc/explow.c 2004-11-24 18:35:31.000000000 +0100
+@@ -84,7 +84,8 @@
+ rtx tem;
+ int all_constant = 0;
+
+- if (c == 0)
++ if (c == 0
++ && ! (flag_propolice_protection && x == virtual_stack_vars_rtx))
+ return x;
+
+ restart:
+@@ -185,7 +186,10 @@
+ break;
+ }
+
+- if (c != 0)
++ /* For the use of stack protection, keep the frame and offset pattern
++ even if the offset is zero. */
++ if (c != 0
++ || (flag_propolice_protection && x == virtual_stack_vars_rtx))
+ x = gen_rtx_PLUS (mode, x, GEN_INT (c));
+
+ if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF)
+@@ -474,6 +478,26 @@
+ if (memory_address_p (mode, oldx))
+ goto win2;
+
++ /* The stack protector keeps the addressing style of a local variable.
++ LEGITIMIZE_ADDRESS changes the addressing to the machine-dependent
++ style, so the protector split the frame address to a register using
++ force_reg. */
++ if (flag_propolice_protection)
++ {
++#define FRAMEADDR_P(X) (GET_CODE (X) == PLUS \
++ && XEXP (X, 0) == virtual_stack_vars_rtx \
++ && GET_CODE (XEXP (X, 1)) == CONST_INT)
++ rtx y;
++ if (FRAMEADDR_P (x))
++ goto win;
++ for (y = x; y != 0 && GET_CODE (y) == PLUS; y = XEXP (y, 0))
++ {
++ if (FRAMEADDR_P (XEXP (y, 0)))
++ XEXP (y, 0) = force_reg (GET_MODE (XEXP (y, 0)), XEXP (y, 0));
++ if (FRAMEADDR_P (XEXP (y, 1)))
++ XEXP (y, 1) = force_reg (GET_MODE (XEXP (y, 1)), XEXP (y, 1));
++ }
++ }
+ /* Perform machine-dependent transformations on X
+ in certain cases. This is not necessary since the code
+ below can handle all possible cases, but machine-dependent
+diff -uNr gcc-3.4.3.orig/gcc/expr.c gcc-3.4.3/gcc/expr.c
+--- gcc-3.4.3.orig/gcc/expr.c 2004-05-27 21:35:17.000000000 +0200
++++ gcc-3.4.3/gcc/expr.c 2004-11-24 18:35:31.000000000 +0100
+@@ -48,6 +48,7 @@
+ #include "intl.h"
+ #include "tm_p.h"
+ #include "target.h"
++#include "protector.h"
+
+ /* Decide whether a function's arguments should be processed
+ from first to last or from last to first.
+@@ -1060,7 +1061,11 @@
+
+ If ENDP is 0 return to, if ENDP is 1 return memory at the end ala
+ mempcpy, and if ENDP is 2 return memory the end minus one byte ala
+- stpcpy. */
++ stpcpy.
++
++ When the stack protector is used at the reverse move, it starts the move
++ instruction from the address within the region of a variable.
++ So it eliminates the first address decrement instruction. */
+
+ rtx
+ move_by_pieces (rtx to, rtx from, unsigned HOST_WIDE_INT len,
+@@ -1123,6 +1128,8 @@
+
+ if (USE_LOAD_PRE_DECREMENT (mode) && data.reverse && ! data.autinc_from)
+ {
++ if (flag_propolice_protection)
++ len = len - GET_MODE_SIZE (mode);
+ data.from_addr = copy_addr_to_reg (plus_constant (from_addr, len));
+ data.autinc_from = 1;
+ data.explicit_inc_from = -1;
+@@ -1137,6 +1144,8 @@
+ data.from_addr = copy_addr_to_reg (from_addr);
+ if (USE_STORE_PRE_DECREMENT (mode) && data.reverse && ! data.autinc_to)
+ {
++ if (flag_propolice_protection)
++ len = len - GET_MODE_SIZE (mode);
+ data.to_addr = copy_addr_to_reg (plus_constant (to_addr, len));
+ data.autinc_to = 1;
+ data.explicit_inc_to = -1;
+@@ -1280,11 +1289,15 @@
+ from1 = adjust_address (data->from, mode, data->offset);
+
+ if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0)
+- emit_insn (gen_add2_insn (data->to_addr,
+- GEN_INT (-(HOST_WIDE_INT)size)));
++ /* The stack protector skips the first address decrement instruction
++ at the reverse move. */
++ if (!flag_propolice_protection || data->explicit_inc_to < -1)
++ emit_insn (gen_add2_insn (data->to_addr,
++ GEN_INT (-(HOST_WIDE_INT)size)));
+ if (HAVE_PRE_DECREMENT && data->explicit_inc_from < 0)
+- emit_insn (gen_add2_insn (data->from_addr,
+- GEN_INT (-(HOST_WIDE_INT)size)));
++ if (!flag_propolice_protection || data->explicit_inc_from < -1)
++ emit_insn (gen_add2_insn (data->from_addr,
++ GEN_INT (-(HOST_WIDE_INT)size)));
+
+ if (data->to)
+ emit_insn ((*genfun) (to1, from1));
+@@ -2475,7 +2488,12 @@
+
+ if (USE_STORE_PRE_DECREMENT (mode) && data->reverse && ! data->autinc_to)
+ {
+- data->to_addr = copy_addr_to_reg (plus_constant (to_addr, data->len));
++ int len = data->len;
++ /* The stack protector starts the store instruction from
++ the address within the region of a variable. */
++ if (flag_propolice_protection)
++ len -= GET_MODE_SIZE (mode);
++ data->to_addr = copy_addr_to_reg (plus_constant (to_addr, len));
+ data->autinc_to = 1;
+ data->explicit_inc_to = -1;
+ }
+@@ -2544,8 +2562,11 @@
+ to1 = adjust_address (data->to, mode, data->offset);
+
+ if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0)
+- emit_insn (gen_add2_insn (data->to_addr,
+- GEN_INT (-(HOST_WIDE_INT) size)));
++ /* The stack protector skips the first address decrement instruction
++ at the reverse store. */
++ if (!flag_propolice_protection || data->explicit_inc_to < -1)
++ emit_insn (gen_add2_insn (data->to_addr,
++ GEN_INT (-(HOST_WIDE_INT) size)));
+
+ cst = (*data->constfun) (data->constfundata, data->offset, mode);
+ emit_insn ((*genfun) (to1, cst));
+@@ -5701,7 +5722,9 @@
+ && GET_CODE (XEXP (value, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (value, 0), 0)) == REG
+ && REGNO (XEXP (XEXP (value, 0), 0)) >= FIRST_VIRTUAL_REGISTER
+- && REGNO (XEXP (XEXP (value, 0), 0)) <= LAST_VIRTUAL_REGISTER)
++ && REGNO (XEXP (XEXP (value, 0), 0)) <= LAST_VIRTUAL_REGISTER
++ && (!flag_propolice_protection
++ || XEXP (XEXP (value, 0), 0) != virtual_stack_vars_rtx))
+ {
+ rtx temp = expand_simple_binop (GET_MODE (value), code,
+ XEXP (XEXP (value, 0), 0), op2,
+diff -uNr gcc-3.4.3.orig/gcc/flags.h gcc-3.4.3/gcc/flags.h
+--- gcc-3.4.3.orig/gcc/flags.h 2004-11-24 18:04:19.000000000 +0100
++++ gcc-3.4.3/gcc/flags.h 2004-11-24 18:35:31.492689688 +0100
+@@ -210,6 +210,10 @@
+
+ extern bool warn_strict_aliasing;
+
++/* Warn when not issuing stack smashing protection for some reason. */
++
++extern bool warn_stack_protector;
++
+ /* Nonzero if generating code to do profiling. */
+
+ extern int profile_flag;
+@@ -795,4 +799,12 @@
+ #define HONOR_SIGN_DEPENDENT_ROUNDING(MODE) \
+ (MODE_HAS_SIGN_DEPENDENT_ROUNDING (MODE) && flag_rounding_math)
+
++/* Nonzero means use propolice as a stack protection method. */
++
++extern int flag_propolice_protection;
++
++/* Nonzero means use a stack protection method for every function. */
++
++extern int flag_stack_protection;
++
+ #endif /* ! GCC_FLAGS_H */
+diff -uNr gcc-3.4.3.orig/gcc/function.c gcc-3.4.3/gcc/function.c
+--- gcc-3.4.3.orig/gcc/function.c 2004-10-14 01:18:13.000000000 +0200
++++ gcc-3.4.3/gcc/function.c 2004-11-24 18:35:31.542682088 +0100
+@@ -63,6 +63,7 @@
+ #include "integrate.h"
+ #include "langhooks.h"
+ #include "target.h"
++#include "protector.h"
+
+ #ifndef TRAMPOLINE_ALIGNMENT
+ #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
+@@ -155,6 +156,10 @@
+ /* Array of INSN_UIDs to hold the INSN_UIDs for each sibcall epilogue
+ in this function. */
+ static GTY(()) varray_type sibcall_epilogue;
++
++/* Current boundary mark for character arrays. */
++static int temp_boundary_mark = 0;
++
+ \f
+ /* In order to evaluate some expressions, such as function calls returning
+ structures in memory, we need to temporarily allocate stack locations.
+@@ -208,6 +213,8 @@
+ /* The size of the slot, including extra space for alignment. This
+ info is for combine_temp_slots. */
+ HOST_WIDE_INT full_size;
++ /* Boundary mark of a character array and the others. This info is for propolice. */
++ int boundary_mark;
+ };
+ \f
+ /* This structure is used to record MEMs or pseudos used to replace VAR, any
+@@ -638,6 +645,7 @@
+ whose lifetime is controlled by CLEANUP_POINT_EXPRs. KEEP is 3
+ if we are to allocate something at an inner level to be treated as
+ a variable in the block (e.g., a SAVE_EXPR).
++ KEEP is 5 if we allocate a place to return structure.
+
+ TYPE is the type that will be used for the stack slot. */
+
+@@ -648,6 +656,8 @@
+ unsigned int align;
+ struct temp_slot *p, *best_p = 0;
+ rtx slot;
++ int char_array = (flag_propolice_protection
++ && keep == 1 && search_string_def (type));
+
+ /* If SIZE is -1 it means that somebody tried to allocate a temporary
+ of a variable size. */
+@@ -673,7 +683,8 @@
+ && ! p->in_use
+ && objects_must_conflict_p (p->type, type)
+ && (best_p == 0 || best_p->size > p->size
+- || (best_p->size == p->size && best_p->align > p->align)))
++ || (best_p->size == p->size && best_p->align > p->align))
++ && (! char_array || p->boundary_mark != 0))
+ {
+ if (p->align == align && p->size == size)
+ {
+@@ -708,6 +719,7 @@
+ p->address = 0;
+ p->rtl_expr = 0;
+ p->type = best_p->type;
++ p->boundary_mark = best_p->boundary_mark;
+ p->next = temp_slots;
+ temp_slots = p;
+
+@@ -768,6 +780,7 @@
+ p->full_size = frame_offset - frame_offset_old;
+ #endif
+ p->address = 0;
++ p->boundary_mark = char_array ? ++temp_boundary_mark : 0;
+ p->next = temp_slots;
+ temp_slots = p;
+ }
+@@ -932,14 +945,16 @@
+ int delete_q = 0;
+ if (! q->in_use && GET_MODE (q->slot) == BLKmode)
+ {
+- if (p->base_offset + p->full_size == q->base_offset)
++ if (p->base_offset + p->full_size == q->base_offset &&
++ p->boundary_mark == q->boundary_mark)
+ {
+ /* Q comes after P; combine Q into P. */
+ p->size += q->size;
+ p->full_size += q->full_size;
+ delete_q = 1;
+ }
+- else if (q->base_offset + q->full_size == p->base_offset)
++ else if (q->base_offset + q->full_size == p->base_offset &&
++ p->boundary_mark == q->boundary_mark)
+ {
+ /* P comes after Q; combine P into Q. */
+ q->size += p->size;
+@@ -1449,7 +1464,9 @@
+ }
+
+ if (new == 0)
+- new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func);
++ new = function ?
++ assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func)
++ : assign_stack_local_for_pseudo_reg (decl_mode, GET_MODE_SIZE (decl_mode), 0);
+
+ PUT_CODE (reg, MEM);
+ PUT_MODE (reg, decl_mode);
+@@ -3937,10 +3954,13 @@
+ }
+
+ /* Otherwise copy the new constant into a register and replace
+- constant with that register. */
++ constant with that register.
++ At the use of stack protection, stop to replace the frame
++ offset with a register. */
+ temp = gen_reg_rtx (Pmode);
+ XEXP (x, 0) = new;
+- if (validate_change (object, &XEXP (x, 1), temp, 0))
++ if (validate_change (object, &XEXP (x, 1), temp, 0)
++ && !flag_propolice_protection)
+ emit_insn_before (gen_move_insn (temp, new_offset), object);
+ else
+ {
+diff -uNr gcc-3.4.3.orig/gcc/gcse.c gcc-3.4.3/gcc/gcse.c
+--- gcc-3.4.3.orig/gcc/gcse.c 2004-10-30 20:02:53.000000000 +0200
++++ gcc-3.4.3/gcc/gcse.c 2004-11-24 18:35:31.583675856 +0100
+@@ -4176,9 +4176,13 @@
+ continue;
+
+ /* Find an assignment that sets reg_used and is available
+- at the start of the block. */
++ at the start of the block.
++
++ Skip the copy propagation not to eliminate the register that is
++ the duplicated pointer of a function argument. It is used for
++ the function argument protection. */
+ set = find_avail_set (regno, insn);
+- if (! set)
++ if (! set || SET_VOLATILE_P (set->expr))
+ continue;
+
+ pat = set->expr;
+diff -uNr gcc-3.4.3.orig/gcc/integrate.c gcc-3.4.3/gcc/integrate.c
+--- gcc-3.4.3.orig/gcc/integrate.c 2004-01-24 00:36:00.000000000 +0100
++++ gcc-3.4.3/gcc/integrate.c 2004-11-24 18:35:31.603672816 +0100
+@@ -393,6 +393,11 @@
+ /* These args would always appear unused, if not for this. */
+ TREE_USED (copy) = 1;
+
++ /* The inlined variable is marked as INLINE not to change the location
++ by stack protector. */
++ if (flag_propolice_protection && TREE_CODE (copy) == VAR_DECL)
++ DECL_COPIED (copy) = 1;
++
+ /* Set the context for the new declaration. */
+ if (!DECL_CONTEXT (decl))
+ /* Globals stay global. */
+@@ -1970,6 +1975,12 @@
+
+ seq = get_insns ();
+ end_sequence ();
++#ifdef ARGS_GROWS_DOWNWARD
++ /* Mark this pointer as the top of the argument
++ block. The pointer minus one is in the block. */
++ if (flag_propolice_protection && GET_CODE (seq) == SET)
++ RTX_INTEGRATED_P (SET_SRC (seq)) = 1;
++#endif
+ emit_insn_after (seq, map->insns_at_start);
+ return temp;
+ }
+diff -uNr gcc-3.4.3.orig/gcc/libgcc2.c gcc-3.4.3/gcc/libgcc2.c
+--- gcc-3.4.3.orig/gcc/libgcc2.c 2004-09-26 22:47:14.000000000 +0200
++++ gcc-3.4.3/gcc/libgcc2.c 2004-11-24 18:35:31.627669168 +0100
+@@ -1678,3 +1678,124 @@
+ #endif /* no INIT_SECTION_ASM_OP and not CTOR_LISTS_DEFINED_EXTERNALLY */
+ #endif /* L_ctors */
+
++\f
++#ifdef L_stack_smash_handler
++#ifndef _LIBC_PROVIDES_SSP_
++#include <stdio.h>
++#include <string.h>
++#include <fcntl.h>
++#include <unistd.h>
++
++#ifdef _POSIX_SOURCE
++#include <signal.h>
++#endif
++
++#if defined(HAVE_SYSLOG)
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <sys/un.h>
++
++#include <sys/syslog.h>
++#ifndef _PATH_LOG
++#define _PATH_LOG "/dev/log"
++#endif
++#endif
++
++long __guard[8] = {0, 0, 0, 0, 0, 0, 0, 0};
++static void __guard_setup (void) __attribute__ ((constructor));
++
++static void
++__guard_setup (void)
++{
++ int fd;
++ if (__guard[0] != 0)
++ return;
++ fd = open ("/dev/urandom", 0);
++ if (fd != -1) {
++ ssize_t size = read (fd, (char*)&__guard, sizeof(__guard));
++ close (fd) ;
++ if (size == sizeof(__guard))
++ return;
++ }
++ /* If a random generator can't be used, the protector switches the guard
++ to the "terminator canary". */
++ ((char*)__guard)[0] = 0;
++ ((char*)__guard)[1] = 0;
++ ((char*)__guard)[2] = '\n';
++ ((char*)__guard)[3] = 255;
++}
++
++extern void __stack_smash_handler (char func[], ATTRIBUTE_UNUSED int damaged);
++void
++__stack_smash_handler (char func[], ATTRIBUTE_UNUSED int damaged)
++{
++#if defined (__GNU_LIBRARY__)
++ extern char * __progname;
++#endif
++ const char message[] = ": stack smashing attack in function ";
++ int bufsz = 256, len;
++ char buf[bufsz];
++#if defined(HAVE_SYSLOG)
++ int log_file;
++ struct sockaddr_un sys_log_addr; /* AF_UNIX address of local logger. */
++#endif
++#ifdef _POSIX_SOURCE
++ {
++ sigset_t mask;
++ sigfillset (&mask);
++ /* Block all signal handlers except SIGABRT. */
++ sigdelset (&mask, SIGABRT);
++ sigprocmask (SIG_BLOCK, &mask, NULL);
++ }
++#endif
++
++ /* send LOG_CRIT. */
++ strcpy (buf, "<2>"); len=3;
++#if defined (__GNU_LIBRARY__)
++ strncat (buf, __progname, bufsz - len - 1);
++ len = strlen (buf);
++#endif
++ if (bufsz > len)
++ {
++ strncat (buf, message, bufsz - len - 1);
++ len = strlen (buf);
++ }
++ if (bufsz > len)
++ {
++ strncat (buf, func, bufsz - len - 1);
++ len = strlen (buf);
++ }
++
++ /* Print error message. */
++ write (STDERR_FILENO, buf + 3, len - 3);
++#if defined(HAVE_SYSLOG)
++ if ((log_file = socket (AF_UNIX, SOCK_DGRAM, 0)) != -1)
++ {
++
++ /* Send "found" message to the "/dev/log" path. */
++ sys_log_addr.sun_family = AF_UNIX;
++ (void)strncpy (sys_log_addr.sun_path, _PATH_LOG,
++ sizeof (sys_log_addr.sun_path) - 1);
++ sys_log_addr.sun_path[sizeof (sys_log_addr.sun_path) - 1] = '\0';
++ sendto(log_file, buf, len, 0, (struct sockaddr *)&sys_log_addr,
++ sizeof (sys_log_addr));
++ }
++#endif
++
++#ifdef _POSIX_SOURCE
++ {
++ /* Make sure the default handler is associated with SIGABRT. */
++ struct sigaction sa;
++
++ memset (&sa, 0, sizeof(struct sigaction));
++ sigfillset (&sa.sa_mask); /* Block all signals. */
++ sa.sa_flags = 0;
++ sa.sa_handler = SIG_DFL;
++ sigaction (SIGABRT, &sa, NULL);
++ (void)kill (getpid(), SIGABRT);
++ }
++#endif
++ _exit (127);
++}
++#endif /* _LIBC_PROVIDES_SSP_ */
++#endif /* L_stack_smash_handler */
+diff -uNr gcc-3.4.3.orig/gcc/libgcc-std.ver gcc-3.4.3/gcc/libgcc-std.ver
+--- gcc-3.4.3.orig/gcc/libgcc-std.ver 2004-09-01 21:14:33.000000000 +0200
++++ gcc-3.4.3/gcc/libgcc-std.ver 2004-11-24 18:35:31.620670232 +0100
+@@ -174,6 +174,12 @@
+ _Unwind_SjLj_RaiseException
+ _Unwind_SjLj_ForcedUnwind
+ _Unwind_SjLj_Resume
++
++%if !defined(_LIBC_PROVIDES_SSP_)
++ # stack smash handler symbols
++ __guard
++ __stack_smash_handler
++%endif
+ }
+
+ %inherit GCC_3.3 GCC_3.0
+diff -uNr gcc-3.4.3.orig/gcc/loop.c gcc-3.4.3/gcc/loop.c
+--- gcc-3.4.3.orig/gcc/loop.c 2004-07-13 17:29:08.000000000 +0200
++++ gcc-3.4.3/gcc/loop.c 2004-11-24 18:35:31.680661112 +0100
+@@ -6514,6 +6514,14 @@
+ if (GET_CODE (*mult_val) == USE)
+ *mult_val = XEXP (*mult_val, 0);
+
++#ifndef FRAME_GROWS_DOWNWARD
++ if (flag_propolice_protection
++ && GET_CODE (*add_val) == PLUS
++ && (XEXP (*add_val, 0) == frame_pointer_rtx
++ || XEXP (*add_val, 1) == frame_pointer_rtx))
++ return 0;
++#endif
++
+ if (is_addr)
+ *pbenefit += address_cost (orig_x, addr_mode) - reg_address_cost;
+ else
+diff -uNr gcc-3.4.3.orig/gcc/Makefile.in gcc-3.4.3/gcc/Makefile.in
+--- gcc-3.4.3.orig/gcc/Makefile.in 2004-11-24 18:04:18.000000000 +0100
++++ gcc-3.4.3/gcc/Makefile.in 2004-11-24 18:35:31.038758696 +0100
+@@ -867,7 +867,7 @@
+ sibcall.o simplify-rtx.o sreal.o stmt.o stor-layout.o stringpool.o \
+ targhooks.o timevar.o toplev.o tracer.o tree.o tree-dump.o unroll.o \
+ varasm.o varray.o version.o vmsdbgout.o xcoffout.o alloc-pool.o \
+- et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) web.o
++ et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) web.o protector.o
+
+ OBJS-md = $(out_object_file)
+ OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) hashtable.o tree-inline.o \
+@@ -1549,7 +1549,7 @@
+ langhooks.h insn-flags.h cfglayout.h real.h cfgloop.h \
+ hosthooks.h $(LANGHOOKS_DEF_H) cgraph.h $(COVERAGE_H) alloc-pool.h
+ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+- -DTARGET_NAME=\"$(target_noncanonical)\" \
++ -DTARGET_NAME=\"$(target_noncanonical)\" @ENABLESSP@ \
+ -c $(srcdir)/toplev.c $(OUTPUT_OPTION)
+ main.o : main.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h
+
+@@ -1852,6 +1852,10 @@
+ params.o : params.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(PARAMS_H) toplev.h
+ hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H)
+ pretty-print.o: $(CONFIG_H) $(SYSTEM_H) pretty-print.c $(PRETTY_PRINT_H)
++protector.o : protector.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
++ flags.h function.h $(EXPR_H) $(OPTABS_H) $(REGS_H) toplev.h hard-reg-set.h \
++ insn-config.h insn-flags.h $(RECOG_H) output.h toplev.h except.h reload.h \
++ $(TM_P_H) conditions.h $(INSN_ATTR_H) real.h protector.h
+
+ $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) $(GGC_H) \
+ $(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \
+diff -uNr gcc-3.4.3.orig/gcc/mklibgcc.in gcc-3.4.3/gcc/mklibgcc.in
+--- gcc-3.4.3.orig/gcc/mklibgcc.in 2004-10-18 18:00:43.000000000 +0200
++++ gcc-3.4.3/gcc/mklibgcc.in 2004-11-24 18:35:31.699658224 +0100
+@@ -57,7 +57,7 @@
+ _enable_execute_stack _trampoline __main _absvsi2 _absvdi2 _addvsi3
+ _addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors
+ _ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2 _popcount_tab
+- _popcountsi2 _popcountdi2 _paritysi2 _paritydi2'
++ _popcountsi2 _popcountdi2 _paritysi2 _paritydi2 _stack_smash_handler'
+
+ # Disable SHLIB_LINK if shared libgcc not enabled.
+ if [ "@enable_shared@" = "no" ]; then
+diff -uNr gcc-3.4.3.orig/gcc/optabs.c gcc-3.4.3/gcc/optabs.c
+--- gcc-3.4.3.orig/gcc/optabs.c 2004-03-03 01:45:01.000000000 +0100
++++ gcc-3.4.3/gcc/optabs.c 2004-11-24 18:35:31.739652144 +0100
+@@ -678,6 +678,27 @@
+ if (target)
+ target = protect_from_queue (target, 1);
+
++ /* Keep the frame and offset pattern at the use of stack protection. */
++ if (flag_propolice_protection
++ && binoptab->code == PLUS
++ && op0 == virtual_stack_vars_rtx
++ && GET_CODE(op1) == CONST_INT)
++ {
++ int icode = (int) binoptab->handlers[(int) mode].insn_code;
++ if (target)
++ temp = target;
++ else
++ temp = gen_reg_rtx (mode);
++
++ if (! (*insn_data[icode].operand[0].predicate) (temp, mode)
++ || GET_CODE (temp) != REG)
++ temp = gen_reg_rtx (mode);
++
++ emit_insn (gen_rtx_SET (VOIDmode, temp,
++ gen_rtx_PLUS (GET_MODE (op0), op0, op1)));
++ return temp;
++ }
++
+ if (flag_force_mem)
+ {
+ /* Load duplicate non-volatile operands once. */
+diff -uNr gcc-3.4.3.orig/gcc/opts.c gcc-3.4.3/gcc/opts.c
+--- gcc-3.4.3.orig/gcc/opts.c 2004-11-24 18:04:19.000000000 +0100
++++ gcc-3.4.3/gcc/opts.c 2004-11-24 18:35:31.762648648 +0100
+@@ -125,6 +125,9 @@
+ bool warn_unused_variable;
+ bool warn_unused_value;
+
++/* Warn when not issuing stack smashing protection for some reason */
++bool warn_stack_protector;
++
+ /* Hack for cooperation between set_Wunused and set_Wextra. */
+ static bool maybe_warn_unused_parameter;
+
+@@ -804,6 +807,10 @@
+ warn_unused_variable = value;
+ break;
+
++ case OPT_Wstack_protector:
++ warn_stack_protector = value;
++ break;
++
+ case OPT_aux_info:
+ case OPT_aux_info_:
+ aux_info_file_name = arg;
+@@ -1367,6 +1374,14 @@
+ stack_limit_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (arg));
+ break;
+
++ case OPT_fstack_protector:
++ flag_propolice_protection = value;
++ break;
++
++ case OPT_fstack_protector_all:
++ flag_stack_protection = value;
++ break;
++
+ case OPT_fstrength_reduce:
+ flag_strength_reduce = value;
+ break;
+diff -uNr gcc-3.4.3.orig/gcc/protector.c gcc-3.4.3/gcc/protector.c
+--- gcc-3.4.3.orig/gcc/protector.c 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.3/gcc/protector.c 2004-09-02 11:36:11.000000000 +0200
+@@ -0,0 +1,2730 @@
++/* RTL buffer overflow protection function for GNU C compiler
++ Copyright (C) 2003 Free Software Foundation, Inc.
++
++This file is part of GCC.
++
++GCC is free software; you can redistribute it and/or modify it under
++the terms of the GNU General Public License as published by the Free
++Software Foundation; either version 2, or (at your option) any later
++version.
++
++GCC is distributed in the hope that it will be useful, but WITHOUT ANY
++WARRANTY; without even the implied warranty of MERCHANTABILITY or
++FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++for more details.
++
++You should have received a copy of the GNU General Public License
++along with GCC; see the file COPYING. If not, write to the Free
++Software Foundation, 59 Temple Place - Suite 330, Boston, MA
++02111-1307, USA. */
++
++/* This file contains several memory arrangement functions to protect
++ the return address and the frame pointer of the stack
++ from a stack-smashing attack. It also
++ provides the function that protects pointer variables. */
++
++#include "config.h"
++#include "system.h"
++#include "coretypes.h"
++#include "tm.h"
++#include "machmode.h"
++#include "real.h"
++#include "rtl.h"
++#include "tree.h"
++#include "regs.h"
++#include "flags.h"
++#include "insn-config.h"
++#include "insn-flags.h"
++#include "expr.h"
++#include "output.h"
++#include "recog.h"
++#include "hard-reg-set.h"
++#include "except.h"
++#include "function.h"
++#include "toplev.h"
++#include "tm_p.h"
++#include "conditions.h"
++#include "insn-attr.h"
++#include "optabs.h"
++#include "reload.h"
++#include "protector.h"
++
++
++/* Round a value to the lowest integer less than it that is a multiple of
++ the required alignment. Avoid using division in case the value is
++ negative. Assume the alignment is a power of two. */
++#define FLOOR_ROUND(VALUE,ALIGN) ((VALUE) & ~((ALIGN) - 1))
++
++/* Similar, but round to the next highest integer that meets the
++ alignment. */
++#define CEIL_ROUND(VALUE,ALIGN) (((VALUE) + (ALIGN) - 1) & ~((ALIGN)- 1))
++
++
++/* Nonzero if function being compiled can define string buffers that may be
++ damaged by the stack-smash attack. */
++static int current_function_defines_vulnerable_string;
++static int current_function_defines_short_string;
++static int current_function_has_variable_string;
++static int current_function_defines_vsized_array;
++static int current_function_is_inlinable;
++
++/* Nonzero if search_string_def finds the variable which contains an array. */
++static int is_array;
++
++/* Nonzero if search_string_def finds a byte-pointer variable,
++ which may be assigned to alloca output. */
++static int may_have_alloca_pointer;
++
++static rtx guard_area, _guard;
++static rtx function_first_insn, prologue_insert_point;
++
++/* Offset to end of sweeped area for gathering character arrays. */
++static HOST_WIDE_INT sweep_frame_offset;
++
++/* Offset to end of allocated area for instantiating pseudo registers. */
++static HOST_WIDE_INT push_allocated_offset = 0;
++
++/* Offset to end of assigned area for instantiating pseudo registers. */
++static HOST_WIDE_INT push_frame_offset = 0;
++
++/* Set to 1 after cse_not_expected becomes nonzero. it is used to identify
++ which stage assign_stack_local_for_pseudo_reg is called from. */
++static int saved_cse_not_expected = 0;
++
++static int search_string_from_argsandvars (int);
++static int search_string_from_local_vars (tree);
++static int search_pointer_def (tree);
++static int search_func_pointer (tree);
++static int check_used_flag (rtx);
++static void reset_used_flags_for_insns (rtx);
++static void reset_used_flags_for_decls (tree);
++static void reset_used_flags_of_plus (rtx);
++static void rtl_prologue (rtx);
++static void rtl_epilogue (rtx);
++static void arrange_var_order (tree);
++static void copy_args_for_protection (void);
++static void sweep_string_variable (rtx, HOST_WIDE_INT);
++static void sweep_string_in_decls (tree, HOST_WIDE_INT, HOST_WIDE_INT);
++static void sweep_string_in_args (tree, HOST_WIDE_INT, HOST_WIDE_INT);
++static void sweep_string_use_of_insns (rtx, HOST_WIDE_INT, HOST_WIDE_INT);
++static void sweep_string_in_operand (rtx, rtx *, HOST_WIDE_INT, HOST_WIDE_INT);
++static void move_arg_location (rtx, rtx, rtx, HOST_WIDE_INT);
++static void change_arg_use_of_insns (rtx, rtx, rtx *, HOST_WIDE_INT);
++static void change_arg_use_in_operand (rtx, rtx, rtx, rtx *, HOST_WIDE_INT);
++static void validate_insns_of_varrefs (rtx);
++static void validate_operand_of_varrefs (rtx, rtx *);
++
++/* Specify which size of buffers should be protected from a stack smashing
++ attack. Because small buffers are not used in situations which may
++ overflow buffer, the default size sets to the size of 64 bit register. */
++#ifndef SUSPICIOUS_BUF_SIZE
++#define SUSPICIOUS_BUF_SIZE 8
++#endif
++
++#define AUTO_BASEPTR(X) \
++ (GET_CODE (X) == PLUS ? XEXP (X, 0) : X)
++#define AUTO_OFFSET(X) \
++ (GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0)
++#undef PARM_PASSED_IN_MEMORY
++#define PARM_PASSED_IN_MEMORY(PARM) \
++ (GET_CODE (DECL_INCOMING_RTL (PARM)) == MEM)
++#define TREE_VISITED(NODE) ((NODE)->common.unused_0)
++
++/* Argument values for calling search_string_from_argsandvars. */
++#define CALL_FROM_PREPARE_STACK_PROTECTION 0
++#define CALL_FROM_PUSH_FRAME 1
++
++
++/* Prepare several stack protection instruments for the current function
++ if the function has an array as a local variable, which may be vulnerable
++ from a stack smashing attack, and it is not inlinable.
++
++ The overall steps are as follows;
++ (1)search an array,
++ (2)insert guard_area on the stack,
++ (3)duplicate pointer arguments into local variables, and
++ (4)arrange the location of local variables. */
++void
++prepare_stack_protection (int inlinable)
++{
++ tree blocks = DECL_INITIAL (current_function_decl);
++ current_function_is_inlinable = inlinable && !flag_no_inline;
++ push_frame_offset = push_allocated_offset = 0;
++ saved_cse_not_expected = 0;
++
++ /* Skip the protection if the function has no block
++ or it is an inline function. */
++ if (current_function_is_inlinable)
++ validate_insns_of_varrefs (get_insns ());
++ if (! blocks || current_function_is_inlinable)
++ return;
++
++ current_function_defines_vulnerable_string
++ = search_string_from_argsandvars (CALL_FROM_PREPARE_STACK_PROTECTION);
++
++ if (current_function_defines_vulnerable_string
++ || flag_stack_protection)
++ {
++ function_first_insn = get_insns ();
++
++ if (current_function_contains_functions)
++ {
++ if (warn_stack_protector)
++ warning ("not protecting function: it contains functions");
++ return;
++ }
++
++ /* Initialize recognition, indicating that volatile is OK. */
++ init_recog ();
++
++ sweep_frame_offset = 0;
++
++#ifdef STACK_GROWS_DOWNWARD
++ /* frame_offset: offset to end of allocated area of stack frame.
++ It is defined in the function.c. */
++
++ /* the location must be before buffers. */
++ guard_area = assign_stack_local (BLKmode, UNITS_PER_GUARD, -1);
++ PUT_MODE (guard_area, GUARD_m);
++ MEM_VOLATILE_P (guard_area) = 1;
++
++#ifndef FRAME_GROWS_DOWNWARD
++ sweep_frame_offset = frame_offset;
++#endif
++
++ /* For making room for guard value, scan all insns and fix the offset
++ address of the variable that is based on frame pointer.
++ Scan all declarations of variables and fix the offset address
++ of the variable that is based on the frame pointer. */
++ sweep_string_variable (guard_area, UNITS_PER_GUARD);
++
++
++ /* the location of guard area moves to the beginning of stack frame. */
++ if (AUTO_OFFSET(XEXP (guard_area, 0)))
++ XEXP (XEXP (guard_area, 0), 1)
++ = gen_rtx_CONST_INT (VOIDmode, sweep_frame_offset);
++
++
++ /* Insert prologue rtl instructions. */
++ rtl_prologue (function_first_insn);
++
++ if (! current_function_has_variable_string)
++ {
++ /* Generate argument saving instruction. */
++ copy_args_for_protection ();
++
++#ifndef FRAME_GROWS_DOWNWARD
++ /* If frame grows upward, character arrays for protecting args
++ may copy to the top of the guard variable.
++ So sweep the guard variable again. */
++ sweep_frame_offset = CEIL_ROUND (frame_offset,
++ BIGGEST_ALIGNMENT / BITS_PER_UNIT);
++ sweep_string_variable (guard_area, UNITS_PER_GUARD);
++#endif
++ }
++ /* Variable can't be protected from the overflow of variable length
++ buffer. But variable reordering is still effective against
++ the overflow of fixed size character arrays. */
++ else if (warn_stack_protector)
++ warning ("not protecting variables: it has a variable length buffer");
++#endif
++#ifndef FRAME_GROWS_DOWNWARD
++ if (STARTING_FRAME_OFFSET == 0)
++ {
++ /* This part may be only for alpha. */
++ push_allocated_offset = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
++ assign_stack_local (BLKmode, push_allocated_offset, -1);
++ sweep_frame_offset = frame_offset;
++ sweep_string_variable (const0_rtx, -push_allocated_offset);
++ sweep_frame_offset = AUTO_OFFSET (XEXP (guard_area, 0));
++ }
++#endif
++
++ /* Arrange the order of local variables. */
++ arrange_var_order (blocks);
++
++#ifdef STACK_GROWS_DOWNWARD
++ /* Insert epilogue rtl instructions. */
++ rtl_epilogue (get_last_insn ());
++#endif
++ init_recog_no_volatile ();
++ }
++ else if (current_function_defines_short_string
++ && warn_stack_protector)
++ warning ("not protecting function: buffer is less than %d bytes long",
++ SUSPICIOUS_BUF_SIZE);
++}
++
++/*
++ Search string from arguments and local variables.
++ caller: CALL_FROM_PREPARE_STACK_PROTECTION (0)
++ CALL_FROM_PUSH_FRAME (1)
++*/
++static int
++search_string_from_argsandvars (int caller)
++{
++ tree blocks, parms;
++ int string_p;
++
++ /* Saves a latest search result as a cached infomation. */
++ static tree __latest_search_decl = 0;
++ static int __latest_search_result = FALSE;
++
++ if (__latest_search_decl == current_function_decl)
++ return __latest_search_result;
++ else
++ if (caller == CALL_FROM_PUSH_FRAME)
++ return FALSE;
++
++ __latest_search_decl = current_function_decl;
++ __latest_search_result = TRUE;
++
++ current_function_defines_short_string = FALSE;
++ current_function_has_variable_string = FALSE;
++ current_function_defines_vsized_array = FALSE;
++ may_have_alloca_pointer = FALSE;
++
++ /* Search a string variable from local variables. */
++ blocks = DECL_INITIAL (current_function_decl);
++ string_p = search_string_from_local_vars (blocks);
++
++ if (! current_function_defines_vsized_array
++ && may_have_alloca_pointer
++ && current_function_calls_alloca)
++ {
++ current_function_has_variable_string = TRUE;
++ return TRUE;
++ }
++
++ if (string_p)
++ return TRUE;
++
++#ifdef STACK_GROWS_DOWNWARD
++ /* Search a string variable from arguments. */
++ parms = DECL_ARGUMENTS (current_function_decl);
++
++ for (; parms; parms = TREE_CHAIN (parms))
++ if (DECL_NAME (parms) && TREE_TYPE (parms) != error_mark_node)
++ {
++ if (PARM_PASSED_IN_MEMORY (parms))
++ {
++ string_p = search_string_def (TREE_TYPE(parms));
++ if (string_p)
++ return TRUE;
++ }
++ }
++#endif
++
++ __latest_search_result = FALSE;
++ return FALSE;
++}
++
++
++/* Search string from local variables in the specified scope. */
++static int
++search_string_from_local_vars (tree block)
++{
++ tree types;
++ int found = FALSE;
++
++ while (block && TREE_CODE(block)==BLOCK)
++ {
++ for (types = BLOCK_VARS(block); types; types = TREE_CHAIN(types))
++ {
++ /* Skip the declaration that refers an external variable. */
++ /* name: types.decl.name.identifier.id */
++ if (! DECL_EXTERNAL (types) && ! TREE_STATIC (types)
++ && TREE_CODE (types) == VAR_DECL
++ && ! DECL_ARTIFICIAL (types)
++ && DECL_RTL_SET_P (types)
++ && GET_CODE (DECL_RTL (types)) == MEM
++
++ && search_string_def (TREE_TYPE (types)))
++ {
++ rtx home = DECL_RTL (types);
++
++ if (GET_CODE (home) == MEM
++ && (GET_CODE (XEXP (home, 0)) == MEM
++ || (GET_CODE (XEXP (home, 0)) == REG
++ && XEXP (home, 0) != virtual_stack_vars_rtx
++ && REGNO (XEXP (home, 0)) != HARD_FRAME_POINTER_REGNUM
++ && REGNO (XEXP (home, 0)) != STACK_POINTER_REGNUM
++#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
++ && REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM
++#endif
++ )))
++ /* If the value is indirect by memory or by a register
++ that isn't the frame pointer then it means the object is
++ variable-sized and address through
++ that register or stack slot.
++ The protection has no way to hide pointer variables
++ behind the array, so all we can do is staying
++ the order of variables and arguments. */
++ {
++ current_function_has_variable_string = TRUE;
++ }
++
++ /* Found character array. */
++ found = TRUE;
++ }
++ }
++
++ if (search_string_from_local_vars (BLOCK_SUBBLOCKS (block)))
++ {
++ found = TRUE;
++ }
++
++ block = BLOCK_CHAIN (block);
++ }
++
++ return found;
++}
++
++
++/* Search a character array from the specified type tree. */
++int
++search_string_def (tree type)
++{
++ tree tem;
++
++ if (! type)
++ return FALSE;
++
++ switch (TREE_CODE (type))
++ {
++ case ARRAY_TYPE:
++ /* Check if the array is a variable-sized array. */
++ if (TYPE_DOMAIN (type) == 0
++ || (TYPE_MAX_VALUE (TYPE_DOMAIN (type)) != 0
++ && TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) == NOP_EXPR))
++ current_function_defines_vsized_array = TRUE;
++
++ /* Check if the array is related to char array. */
++ if (TYPE_MAIN_VARIANT (TREE_TYPE(type)) == char_type_node
++ || TYPE_MAIN_VARIANT (TREE_TYPE(type)) == signed_char_type_node
++ || TYPE_MAIN_VARIANT (TREE_TYPE(type)) == unsigned_char_type_node)
++ {
++ /* Check if the string is a variable string. */
++ if (TYPE_DOMAIN (type) == 0
++ || (TYPE_MAX_VALUE (TYPE_DOMAIN (type)) != 0
++ && TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) == NOP_EXPR))
++ return TRUE;
++
++ /* Check if the string size is greater than SUSPICIOUS_BUF_SIZE. */
++ if (TYPE_MAX_VALUE (TYPE_DOMAIN (type)) != 0
++ && (TREE_INT_CST_LOW(TYPE_MAX_VALUE(TYPE_DOMAIN(type)))+1
++ >= SUSPICIOUS_BUF_SIZE))
++ return TRUE;
++
++ current_function_defines_short_string = TRUE;
++ }
++
++ /* to protect every functions, sweep any arrays to the frame top. */
++ is_array = TRUE;
++
++ return search_string_def(TREE_TYPE(type));
++
++ case UNION_TYPE:
++ case QUAL_UNION_TYPE:
++ case RECORD_TYPE:
++ /* Check if each field has character arrays. */
++ for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
++ {
++ /* Omit here local type decls until we know how to support them. */
++ if ((TREE_CODE (tem) == TYPE_DECL)
++ || (TREE_CODE (tem) == VAR_DECL && TREE_STATIC (tem)))
++ continue;
++
++ if (search_string_def(TREE_TYPE(tem)))
++ return TRUE;
++ }
++ break;
++
++ case POINTER_TYPE:
++ /* Check if pointer variables, which may be a pointer assigned
++ by alloca function call, are declared. */
++ if (TYPE_MAIN_VARIANT (TREE_TYPE(type)) == char_type_node
++ || TYPE_MAIN_VARIANT (TREE_TYPE(type)) == signed_char_type_node
++ || TYPE_MAIN_VARIANT (TREE_TYPE(type)) == unsigned_char_type_node)
++ may_have_alloca_pointer = TRUE;
++ break;
++
++ case REFERENCE_TYPE:
++ case OFFSET_TYPE:
++ default:
++ break;
++ }
++
++ return FALSE;
++}
++
++
++/* Examine whether the input contains frame pointer addressing. */
++int
++contains_fp (rtx op)
++{
++ enum rtx_code code;
++ rtx x;
++ int i, j;
++ const char *fmt;
++
++ x = op;
++ if (x == 0)
++ return FALSE;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case CONST:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case REG:
++ case ADDRESSOF:
++ return FALSE;
++
++ case MEM:
++ /* This case is not generated at the stack protection.
++ see plus_constant_wide and simplify_plus_minus function. */
++ if (XEXP (x, 0) == virtual_stack_vars_rtx)
++ abort ();
++
++ case PLUS:
++ if (XEXP (x, 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (x, 1)) == CONST_INT)
++ return TRUE;
++
++ default:
++ break;
++ }
++
++ /* Scan all subexpressions. */
++ fmt = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
++ if (*fmt == 'e')
++ {
++ if (contains_fp (XEXP (x, i)))
++ return TRUE;
++ }
++ else if (*fmt == 'E')
++ for (j = 0; j < XVECLEN (x, i); j++)
++ if (contains_fp (XVECEXP (x, i, j)))
++ return TRUE;
++
++ return FALSE;
++}
++
++
++/* Examine whether the input contains any pointer. */
++static int
++search_pointer_def (tree type)
++{
++ tree tem;
++
++ if (! type)
++ return FALSE;
++
++ switch (TREE_CODE (type))
++ {
++ case UNION_TYPE:
++ case QUAL_UNION_TYPE:
++ case RECORD_TYPE:
++ /* Check if each field has a pointer. */
++ for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
++ {
++ if ((TREE_CODE (tem) == TYPE_DECL)
++ || (TREE_CODE (tem) == VAR_DECL && TREE_STATIC (tem)))
++ continue;
++
++ if (search_pointer_def (TREE_TYPE(tem)))
++ return TRUE;
++ }
++ break;
++
++ case ARRAY_TYPE:
++ return search_pointer_def (TREE_TYPE(type));
++
++ case POINTER_TYPE:
++ case REFERENCE_TYPE:
++ case OFFSET_TYPE:
++ if (TYPE_READONLY (TREE_TYPE (type)))
++ {
++ /* If this pointer contains function pointer,
++ it should be protected. */
++ return search_func_pointer (TREE_TYPE (type));
++ }
++ return TRUE;
++
++ default:
++ break;
++ }
++
++ return FALSE;
++}
++
++
++/* Examine whether the input contains function pointer. */
++static int
++search_func_pointer (tree type)
++{
++ tree tem;
++
++ if (! type)
++ return FALSE;
++
++ switch (TREE_CODE (type))
++ {
++ case UNION_TYPE:
++ case QUAL_UNION_TYPE:
++ case RECORD_TYPE:
++ if (! TREE_VISITED (type))
++ {
++ /* Mark the type as having been visited already. */
++ TREE_VISITED (type) = 1;
++
++ /* Check if each field has a function pointer. */
++ for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
++ {
++ if (TREE_CODE (tem) == FIELD_DECL
++ && search_func_pointer (TREE_TYPE(tem)))
++ {
++ TREE_VISITED (type) = 0;
++ return TRUE;
++ }
++ }
++
++ TREE_VISITED (type) = 0;
++ }
++ break;
++
++ case ARRAY_TYPE:
++ return search_func_pointer (TREE_TYPE(type));
++
++ case POINTER_TYPE:
++ case REFERENCE_TYPE:
++ case OFFSET_TYPE:
++ if (TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE)
++ return TRUE;
++ return search_func_pointer (TREE_TYPE(type));
++
++ default:
++ break;
++ }
++
++ return FALSE;
++}
++
++
++/* Check whether the specified rtx contains PLUS rtx with used flag. */
++static int
++check_used_flag (rtx x)
++{
++ register int i, j;
++ register enum rtx_code code;
++ register const char *format_ptr;
++
++ if (x == 0)
++ return FALSE;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case REG:
++ case QUEUED:
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ return FALSE;
++
++ case PLUS:
++ if (x->used)
++ return TRUE;
++
++ default:
++ break;
++ }
++
++ format_ptr = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++)
++ {
++ switch (*format_ptr++)
++ {
++ case 'e':
++ if (check_used_flag (XEXP (x, i)))
++ return TRUE;
++ break;
++
++ case 'E':
++ for (j = 0; j < XVECLEN (x, i); j++)
++ if (check_used_flag (XVECEXP (x, i, j)))
++ return TRUE;
++ break;
++ }
++ }
++
++ return FALSE;
++}
++
++
++/* Reset used flag of every insns after the spcecified insn. */
++static void
++reset_used_flags_for_insns (rtx insn)
++{
++ int i, j;
++ enum rtx_code code;
++ const char *format_ptr;
++
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
++ || GET_CODE (insn) == CALL_INSN)
++ {
++ code = GET_CODE (insn);
++ insn->used = 0;
++ format_ptr = GET_RTX_FORMAT (code);
++
++ for (i = 0; i < GET_RTX_LENGTH (code); i++)
++ {
++ switch (*format_ptr++)
++ {
++ case 'e':
++ reset_used_flags_of_plus (XEXP (insn, i));
++ break;
++
++ case 'E':
++ for (j = 0; j < XVECLEN (insn, i); j++)
++ reset_used_flags_of_plus (XVECEXP (insn, i, j));
++ break;
++ }
++ }
++ }
++}
++
++
++/* Reset used flag of every variables in the specified block. */
++static void
++reset_used_flags_for_decls (tree block)
++{
++ tree types;
++ rtx home;
++
++ while (block && TREE_CODE(block)==BLOCK)
++ {
++ types = BLOCK_VARS(block);
++
++ for (types= BLOCK_VARS(block); types; types = TREE_CHAIN(types))
++ {
++ /* Skip the declaration that refers an external variable and
++ also skip an global variable. */
++ if (! DECL_EXTERNAL (types))
++ {
++ if (! DECL_RTL_SET_P (types))
++ continue;
++ home = DECL_RTL (types);
++
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == PLUS
++ && GET_CODE (XEXP (XEXP (home, 0), 1)) == CONST_INT)
++ {
++ XEXP (home, 0)->used = 0;
++ }
++ }
++ }
++
++ reset_used_flags_for_decls (BLOCK_SUBBLOCKS (block));
++
++ block = BLOCK_CHAIN (block);
++ }
++}
++
++
++/* Reset the used flag of every PLUS rtx derived from the specified rtx. */
++static void
++reset_used_flags_of_plus (rtx x)
++{
++ int i, j;
++ enum rtx_code code;
++ const char *format_ptr;
++
++ if (x == 0)
++ return;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ /* These types may be freely shared so we needn't do any resetting
++ for them. */
++ case REG:
++ case QUEUED:
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ return;
++
++ case INSN:
++ case JUMP_INSN:
++ case CALL_INSN:
++ case NOTE:
++ case LABEL_REF:
++ case BARRIER:
++ /* The chain of insns is not being copied. */
++ return;
++
++ case PLUS:
++ x->used = 0;
++ break;
++
++ case CALL_PLACEHOLDER:
++ reset_used_flags_for_insns (XEXP (x, 0));
++ reset_used_flags_for_insns (XEXP (x, 1));
++ reset_used_flags_for_insns (XEXP (x, 2));
++ break;
++
++ default:
++ break;
++ }
++
++ format_ptr = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++)
++ {
++ switch (*format_ptr++)
++ {
++ case 'e':
++ reset_used_flags_of_plus (XEXP (x, i));
++ break;
++
++ case 'E':
++ for (j = 0; j < XVECLEN (x, i); j++)
++ reset_used_flags_of_plus (XVECEXP (x, i, j));
++ break;
++ }
++ }
++}
++
++
++/* Generate the prologue insns of the protector into the specified insn. */
++static void
++rtl_prologue (rtx insn)
++{
++#if defined(INIT_SECTION_ASM_OP) && !defined(INVOKE__main)
++#undef HAS_INIT_SECTION
++#define HAS_INIT_SECTION
++#endif
++
++ rtx _val;
++
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == NOTE
++ && NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG)
++ break;
++
++#if !defined (HAS_INIT_SECTION)
++ /* If this function is `main', skip a call to `__main'
++ to run guard instruments after global initializers, etc. */
++ if (DECL_NAME (current_function_decl)
++ && MAIN_NAME_P (DECL_NAME (current_function_decl))
++ && DECL_CONTEXT (current_function_decl) == NULL_TREE)
++ {
++ rtx fbinsn = insn;
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == NOTE
++ && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG)
++ break;
++ if (insn == 0)
++ insn = fbinsn;
++ }
++#endif
++
++ /* Mark the next insn of FUNCTION_BEG insn. */
++ prologue_insert_point = NEXT_INSN (insn);
++
++ start_sequence ();
++
++ _guard = gen_rtx_MEM (GUARD_m, gen_rtx_SYMBOL_REF (Pmode, "__guard"));
++ emit_move_insn ( guard_area, _guard);
++
++ _val = get_insns ();
++ end_sequence ();
++
++ emit_insn_before (_val, prologue_insert_point);
++}
++
++
++/* Generate the epilogue insns of the protector into the specified insn. */
++static void
++rtl_epilogue (rtx insn)
++{
++ rtx if_false_label;
++ rtx _val;
++ rtx funcname;
++ tree funcstr;
++ int flag_have_return = FALSE;
++
++ start_sequence ();
++
++#ifdef HAVE_return
++ if (HAVE_return)
++ {
++ rtx insn;
++ return_label = gen_label_rtx ();
++
++ for (insn = prologue_insert_point; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == JUMP_INSN
++ && GET_CODE (PATTERN (insn)) == RETURN
++ && GET_MODE (PATTERN (insn)) == VOIDmode)
++ {
++ rtx pat = gen_rtx_SET (VOIDmode,
++ pc_rtx,
++ gen_rtx_LABEL_REF (VOIDmode,
++ return_label));
++ PATTERN (insn) = pat;
++ flag_have_return = TRUE;
++ }
++
++
++ emit_label (return_label);
++ }
++#endif
++
++ /* if (guard_area != _guard) */
++ compare_from_rtx (guard_area, _guard, NE, 0, GUARD_m, NULL_RTX);
++
++ if_false_label = gen_label_rtx (); /* { */
++ emit_jump_insn ( gen_beq(if_false_label));
++
++ /* generate string for the current function name */
++ funcstr = build_string (strlen(current_function_name ())+1,
++ current_function_name ());
++ TREE_TYPE (funcstr) = build_array_type (char_type_node, 0);
++ funcname = output_constant_def (funcstr, 1);
++
++ emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__stack_smash_handler"),
++ 0, VOIDmode, 2,
++ XEXP (funcname, 0), Pmode, guard_area, GUARD_m);
++
++ /* generate RTL to return from the current function */
++
++ emit_barrier (); /* } */
++ emit_label (if_false_label);
++
++ /* generate RTL to return from the current function */
++ if (DECL_RTL_SET_P (DECL_RESULT (current_function_decl)))
++ use_return_register ();
++
++#ifdef HAVE_return
++ if (HAVE_return && flag_have_return)
++ {
++ emit_jump_insn (gen_return ());
++ emit_barrier ();
++ }
++#endif
++
++ _val = get_insns ();
++ end_sequence ();
++
++ emit_insn_after (_val, insn);
++}
++
++
++/* For every variable which type is character array, moves its location
++ in the stack frame to the sweep_frame_offset position. */
++static void
++arrange_var_order (tree block)
++{
++ tree types;
++ HOST_WIDE_INT offset;
++
++ while (block && TREE_CODE(block)==BLOCK)
++ {
++ /* arrange the location of character arrays in depth first. */
++ arrange_var_order (BLOCK_SUBBLOCKS (block));
++
++ for (types = BLOCK_VARS (block); types; types = TREE_CHAIN(types))
++ {
++ /* Skip the declaration that refers an external variable. */
++ if (! DECL_EXTERNAL (types) && ! TREE_STATIC (types)
++ && TREE_CODE (types) == VAR_DECL
++ && ! DECL_ARTIFICIAL (types)
++ && DECL_RTL_SET_P (types)
++ && GET_CODE (DECL_RTL (types)) == MEM
++ && GET_MODE (DECL_RTL (types)) == BLKmode
++
++ && (is_array=0,
++ search_string_def (TREE_TYPE (types))
++ || (! current_function_defines_vulnerable_string && is_array)))
++ {
++ rtx home = DECL_RTL (types);
++
++ if (!(GET_CODE (home) == MEM
++ && (GET_CODE (XEXP (home, 0)) == MEM
++ || (GET_CODE (XEXP (home, 0)) == REG
++ && XEXP (home, 0) != virtual_stack_vars_rtx
++ && REGNO (XEXP (home, 0)) != HARD_FRAME_POINTER_REGNUM
++ && REGNO (XEXP (home, 0)) != STACK_POINTER_REGNUM
++#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
++ && REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM
++#endif
++ ))))
++ {
++ /* Found a string variable. */
++ HOST_WIDE_INT var_size =
++ ((TREE_INT_CST_LOW (DECL_SIZE (types)) + BITS_PER_UNIT - 1)
++ / BITS_PER_UNIT);
++
++ /* Confirmed it is BLKmode. */
++ int alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
++ var_size = CEIL_ROUND (var_size, alignment);
++
++ /* Skip the variable if it is top of the region
++ specified by sweep_frame_offset. */
++ offset = AUTO_OFFSET (XEXP (DECL_RTL (types), 0));
++ if (offset == sweep_frame_offset - var_size)
++ sweep_frame_offset -= var_size;
++
++ else if (offset < sweep_frame_offset - var_size)
++ sweep_string_variable (DECL_RTL (types), var_size);
++ }
++ }
++ }
++
++ block = BLOCK_CHAIN (block);
++ }
++}
++
++
++/* To protect every pointer argument and move character arrays in the argument,
++ Copy those variables to the top of the stack frame and move the location of
++ character arrays to the posion of sweep_frame_offset. */
++static void
++copy_args_for_protection (void)
++{
++ tree parms = DECL_ARGUMENTS (current_function_decl);
++ rtx temp_rtx;
++
++ parms = DECL_ARGUMENTS (current_function_decl);
++ for (; parms; parms = TREE_CHAIN (parms))
++ if (DECL_NAME (parms) && TREE_TYPE (parms) != error_mark_node)
++ {
++ if (PARM_PASSED_IN_MEMORY (parms) && DECL_NAME (parms))
++ {
++ int string_p;
++ rtx seq;
++
++ string_p = search_string_def (TREE_TYPE(parms));
++
++ /* Check if it is a candidate to move. */
++ if (string_p || search_pointer_def (TREE_TYPE (parms)))
++ {
++ int arg_size
++ = ((TREE_INT_CST_LOW (DECL_SIZE (parms)) + BITS_PER_UNIT - 1)
++ / BITS_PER_UNIT);
++ tree passed_type = DECL_ARG_TYPE (parms);
++ tree nominal_type = TREE_TYPE (parms);
++
++ start_sequence ();
++
++ if (GET_CODE (DECL_RTL (parms)) == REG)
++ {
++ rtx safe = 0;
++
++ change_arg_use_of_insns (prologue_insert_point,
++ DECL_RTL (parms), &safe, 0);
++ if (safe)
++ {
++ /* Generate codes for copying the content. */
++ rtx movinsn = emit_move_insn (safe, DECL_RTL (parms));
++
++ /* Avoid register elimination in gcse.c. */
++ PATTERN (movinsn)->volatil = 1;
++
++ /* Save debugger info. */
++ SET_DECL_RTL (parms, safe);
++ }
++ }
++ else if (GET_CODE (DECL_RTL (parms)) == MEM
++ && GET_CODE (XEXP (DECL_RTL (parms), 0)) == ADDRESSOF)
++ {
++ rtx movinsn;
++ rtx safe = gen_reg_rtx (GET_MODE (DECL_RTL (parms)));
++
++ /* Generate codes for copying the content. */
++ movinsn = emit_move_insn (safe, DECL_INCOMING_RTL (parms));
++ /* Avoid register elimination in gcse.c. */
++ PATTERN (movinsn)->volatil = 1;
++
++ /* Change the addressof information to the newly
++ allocated pseudo register. */
++ emit_move_insn (DECL_RTL (parms), safe);
++
++ /* Save debugger info. */
++ SET_DECL_RTL (parms, safe);
++ }
++
++ /* See if the frontend wants to pass this by invisible
++ reference. */
++ else if (passed_type != nominal_type
++ && POINTER_TYPE_P (passed_type)
++ && TREE_TYPE (passed_type) == nominal_type)
++ {
++ rtx safe = 0, orig = XEXP (DECL_RTL (parms), 0);
++
++ change_arg_use_of_insns (prologue_insert_point,
++ orig, &safe, 0);
++ if (safe)
++ {
++ /* Generate codes for copying the content. */
++ rtx movinsn = emit_move_insn (safe, orig);
++
++ /* Avoid register elimination in gcse.c */
++ PATTERN (movinsn)->volatil = 1;
++
++ /* Save debugger info. */
++ SET_DECL_RTL (parms, safe);
++ }
++ }
++
++ else
++ {
++ /* Declare temporary local variable for parms. */
++ temp_rtx
++ = assign_stack_local (DECL_MODE (parms), arg_size,
++ DECL_MODE (parms) == BLKmode ?
++ -1 : 0);
++
++ MEM_IN_STRUCT_P (temp_rtx)
++ = AGGREGATE_TYPE_P (TREE_TYPE (parms));
++ set_mem_alias_set (temp_rtx, get_alias_set (parms));
++
++ /* Generate codes for copying the content. */
++ store_expr (parms, temp_rtx, 0);
++
++ /* Change the reference for each instructions. */
++ move_arg_location (prologue_insert_point, DECL_RTL (parms),
++ temp_rtx, arg_size);
++
++ /* Change the location of parms variable. */
++ SET_DECL_RTL (parms, temp_rtx);
++ }
++
++ seq = get_insns ();
++ end_sequence ();
++ emit_insn_before (seq, prologue_insert_point);
++
++#ifdef FRAME_GROWS_DOWNWARD
++ /* Process the string argument. */
++ if (string_p && DECL_MODE (parms) == BLKmode)
++ {
++ int alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
++ arg_size = CEIL_ROUND (arg_size, alignment);
++
++ /* Change the reference for each instructions. */
++ sweep_string_variable (DECL_RTL (parms), arg_size);
++ }
++#endif
++ }
++ }
++ }
++}
++
++
++/* Sweep a string variable to the positon of sweep_frame_offset in the
++ stack frame, that is a last position of string variables. */
++static void
++sweep_string_variable (rtx sweep_var, HOST_WIDE_INT var_size)
++{
++ HOST_WIDE_INT sweep_offset;
++
++ switch (GET_CODE (sweep_var))
++ {
++ case MEM:
++ if (GET_CODE (XEXP (sweep_var, 0)) == ADDRESSOF
++ && GET_CODE (XEXP (XEXP (sweep_var, 0), 0)) == REG)
++ return;
++ sweep_offset = AUTO_OFFSET(XEXP (sweep_var, 0));
++ break;
++ case CONST_INT:
++ sweep_offset = INTVAL (sweep_var);
++ break;
++ default:
++ abort ();
++ }
++
++ /* Scan all declarations of variables and fix the offset address of
++ the variable based on the frame pointer. */
++ sweep_string_in_decls (DECL_INITIAL (current_function_decl),
++ sweep_offset, var_size);
++
++ /* Scan all argument variable and fix the offset address based on
++ the frame pointer. */
++ sweep_string_in_args (DECL_ARGUMENTS (current_function_decl),
++ sweep_offset, var_size);
++
++ /* For making room for sweep variable, scan all insns and
++ fix the offset address of the variable that is based on frame pointer. */
++ sweep_string_use_of_insns (function_first_insn, sweep_offset, var_size);
++
++
++ /* Clear all the USED bits in operands of all insns and declarations of
++ local variables. */
++ reset_used_flags_for_decls (DECL_INITIAL (current_function_decl));
++ reset_used_flags_for_insns (function_first_insn);
++
++ sweep_frame_offset -= var_size;
++}
++
++
++
++/* Move an argument to the local variable addressed by frame_offset. */
++static void
++move_arg_location (rtx insn, rtx orig, rtx new, HOST_WIDE_INT var_size)
++{
++ /* For making room for sweep variable, scan all insns and
++ fix the offset address of the variable that is based on frame pointer. */
++ change_arg_use_of_insns (insn, orig, &new, var_size);
++
++
++ /* Clear all the USED bits in operands of all insns and declarations
++ of local variables. */
++ reset_used_flags_for_insns (insn);
++}
++
++
++/* Sweep character arrays declared as local variable. */
++static void
++sweep_string_in_decls (tree block, HOST_WIDE_INT sweep_offset,
++ HOST_WIDE_INT sweep_size)
++{
++ tree types;
++ HOST_WIDE_INT offset;
++ rtx home;
++
++ while (block && TREE_CODE(block)==BLOCK)
++ {
++ for (types = BLOCK_VARS(block); types; types = TREE_CHAIN(types))
++ {
++ /* Skip the declaration that refers an external variable and
++ also skip an global variable. */
++ if (! DECL_EXTERNAL (types) && ! TREE_STATIC (types)) {
++
++ if (! DECL_RTL_SET_P (types))
++ continue;
++
++ home = DECL_RTL (types);
++
++ /* Process for static local variable. */
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == SYMBOL_REF)
++ continue;
++
++ if (GET_CODE (home) == MEM
++ && XEXP (home, 0) == virtual_stack_vars_rtx)
++ {
++ offset = 0;
++
++ /* the operand related to the sweep variable. */
++ if (sweep_offset <= offset
++ && offset < sweep_offset + sweep_size)
++ {
++ offset = sweep_frame_offset - sweep_size - sweep_offset;
++
++ XEXP (home, 0) = plus_constant (virtual_stack_vars_rtx,
++ offset);
++ XEXP (home, 0)->used = 1;
++ }
++ else if (sweep_offset <= offset
++ && offset < sweep_frame_offset)
++ {
++ /* the rest of variables under sweep_frame_offset,
++ shift the location. */
++ XEXP (home, 0) = plus_constant (virtual_stack_vars_rtx,
++ -sweep_size);
++ XEXP (home, 0)->used = 1;
++ }
++ }
++
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == MEM)
++ {
++ /* Process for dynamically allocated array. */
++ home = XEXP (home, 0);
++ }
++
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == PLUS
++ && XEXP (XEXP (home, 0), 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (XEXP (home, 0), 1)) == CONST_INT)
++ {
++ if (! XEXP (home, 0)->used)
++ {
++ offset = AUTO_OFFSET(XEXP (home, 0));
++
++ /* the operand related to the sweep variable. */
++ if (sweep_offset <= offset
++ && offset < sweep_offset + sweep_size)
++ {
++
++ offset
++ += sweep_frame_offset - sweep_size - sweep_offset;
++ XEXP (XEXP (home, 0), 1) = gen_rtx_CONST_INT (VOIDmode,
++ offset);
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++ else if (sweep_offset <= offset
++ && offset < sweep_frame_offset)
++ {
++ /* the rest of variables under sweep_frame_offset,
++ so shift the location. */
++
++ XEXP (XEXP (home, 0), 1)
++ = gen_rtx_CONST_INT (VOIDmode, offset - sweep_size);
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++ }
++ }
++ }
++ }
++
++ sweep_string_in_decls (BLOCK_SUBBLOCKS (block),
++ sweep_offset, sweep_size);
++
++ block = BLOCK_CHAIN (block);
++ }
++}
++
++
++/* Sweep character arrays declared as argument. */
++static void
++sweep_string_in_args (tree parms, HOST_WIDE_INT sweep_offset,
++ HOST_WIDE_INT sweep_size)
++{
++ rtx home;
++ HOST_WIDE_INT offset;
++
++ for (; parms; parms = TREE_CHAIN (parms))
++ if (DECL_NAME (parms) && TREE_TYPE (parms) != error_mark_node)
++ {
++ if (PARM_PASSED_IN_MEMORY (parms) && DECL_NAME (parms))
++ {
++ home = DECL_INCOMING_RTL (parms);
++
++ if (XEXP (home, 0)->used)
++ continue;
++
++ offset = AUTO_OFFSET(XEXP (home, 0));
++
++ /* the operand related to the sweep variable. */
++ if (AUTO_BASEPTR (XEXP (home, 0)) == virtual_stack_vars_rtx)
++ {
++ if (sweep_offset <= offset
++ && offset < sweep_offset + sweep_size)
++ {
++ offset += sweep_frame_offset - sweep_size - sweep_offset;
++ XEXP (XEXP (home, 0), 1) = gen_rtx_CONST_INT (VOIDmode,
++ offset);
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++ else if (sweep_offset <= offset
++ && offset < sweep_frame_offset)
++ {
++ /* the rest of variables under sweep_frame_offset,
++ shift the location. */
++ XEXP (XEXP (home, 0), 1)
++ = gen_rtx_CONST_INT (VOIDmode, offset - sweep_size);
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++ }
++ }
++ }
++}
++
++
++/* Set to 1 when the instruction contains virtual registers. */
++static int has_virtual_reg;
++
++/* Sweep the specified character array for every insns. The array starts from
++ the sweep_offset and its size is sweep_size. */
++static void
++sweep_string_use_of_insns (rtx insn, HOST_WIDE_INT sweep_offset,
++ HOST_WIDE_INT sweep_size)
++{
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
++ || GET_CODE (insn) == CALL_INSN)
++ {
++ has_virtual_reg = FALSE;
++ sweep_string_in_operand (insn, &PATTERN (insn),
++ sweep_offset, sweep_size);
++ sweep_string_in_operand (insn, ®_NOTES (insn),
++ sweep_offset, sweep_size);
++ }
++}
++
++
++/* Sweep the specified character array, which starts from the sweep_offset and
++ its size is sweep_size.
++
++ When a pointer is given,
++ if it points the address higher than the array, it stays.
++ if it points the address inside the array, it changes to point inside
++ the sweeped array.
++ if it points the address lower than the array, it shifts higher address by
++ the sweep_size. */
++static void
++sweep_string_in_operand (rtx insn, rtx *loc,
++ HOST_WIDE_INT sweep_offset, HOST_WIDE_INT sweep_size)
++{
++ rtx x = *loc;
++ enum rtx_code code;
++ int i, j, k = 0;
++ HOST_WIDE_INT offset;
++ const char *fmt;
++
++ if (x == 0)
++ return;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case CONST:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ case ASM_INPUT:
++ case ADDR_VEC:
++ case ADDR_DIFF_VEC:
++ case RETURN:
++ case ADDRESSOF:
++ return;
++
++ case REG:
++ if (x == virtual_incoming_args_rtx
++ || x == virtual_stack_vars_rtx
++ || x == virtual_stack_dynamic_rtx
++ || x == virtual_outgoing_args_rtx
++ || x == virtual_cfa_rtx)
++ has_virtual_reg = TRUE;
++ return;
++
++ case SET:
++ /*
++ skip setjmp setup insn and setjmp restore insn
++ Example:
++ (set (MEM (reg:SI xx)) (virtual_stack_vars_rtx)))
++ (set (virtual_stack_vars_rtx) (REG))
++ */
++ if (GET_CODE (XEXP (x, 0)) == MEM
++ && XEXP (x, 1) == virtual_stack_vars_rtx)
++ return;
++ if (XEXP (x, 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (x, 1)) == REG)
++ return;
++ break;
++
++ case PLUS:
++ /* Handle typical case of frame register plus constant. */
++ if (XEXP (x, 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (x, 1)) == CONST_INT)
++ {
++ if (x->used)
++ goto single_use_of_virtual_reg;
++
++ offset = AUTO_OFFSET(x);
++
++ /* When arguments grow downward, the virtual incoming
++ args pointer points to the top of the argument block,
++ so block is identified by the pointer - 1.
++ The flag is set at the copy_rtx_and_substitute in integrate.c */
++ if (RTX_INTEGRATED_P (x))
++ k = -1;
++
++ /* the operand related to the sweep variable. */
++ if (sweep_offset <= offset + k
++ && offset + k < sweep_offset + sweep_size)
++ {
++ offset += sweep_frame_offset - sweep_size - sweep_offset;
++
++ XEXP (x, 0) = virtual_stack_vars_rtx;
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset);
++ x->used = 1;
++ }
++ else if (sweep_offset <= offset + k
++ && offset + k < sweep_frame_offset)
++ {
++ /* the rest of variables under sweep_frame_offset,
++ shift the location. */
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset - sweep_size);
++ x->used = 1;
++ }
++
++ single_use_of_virtual_reg:
++ if (has_virtual_reg) {
++ /* excerpt from insn_invalid_p in recog.c */
++ int icode = recog_memoized (insn);
++
++ if (icode < 0 && asm_noperands (PATTERN (insn)) < 0)
++ {
++ rtx temp, seq;
++
++ start_sequence ();
++ temp = force_operand (x, NULL_RTX);
++ seq = get_insns ();
++ end_sequence ();
++
++ emit_insn_before (seq, insn);
++ if (! validate_change (insn, loc, temp, 0)
++ && !validate_replace_rtx (x, temp, insn))
++ fatal_insn ("sweep_string_in_operand", insn);
++ }
++ }
++
++ has_virtual_reg = TRUE;
++ return;
++ }
++
++#ifdef FRAME_GROWS_DOWNWARD
++ /* Alert the case of frame register plus constant given by reg. */
++ else if (XEXP (x, 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (x, 1)) == REG)
++ fatal_insn ("sweep_string_in_operand: unknown addressing", insn);
++#endif
++
++ /*
++ process further subtree:
++ Example: (plus:SI (mem/s:SI (plus:SI (reg:SI 17) (const_int 8)))
++ (const_int 5))
++ */
++ break;
++
++ case CALL_PLACEHOLDER:
++ for (i = 0; i < 3; i++)
++ {
++ rtx seq = XEXP (x, i);
++ if (seq)
++ {
++ push_to_sequence (seq);
++ sweep_string_use_of_insns (XEXP (x, i),
++ sweep_offset, sweep_size);
++ XEXP (x, i) = get_insns ();
++ end_sequence ();
++ }
++ }
++ break;
++
++ default:
++ break;
++ }
++
++ /* Scan all subexpressions. */
++ fmt = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
++ if (*fmt == 'e')
++ {
++ /*
++ virtual_stack_vars_rtx without offset
++ Example:
++ (set (reg:SI xx) (reg:SI 78))
++ (set (reg:SI xx) (MEM (reg:SI 78)))
++ */
++ if (XEXP (x, i) == virtual_stack_vars_rtx)
++ fatal_insn ("sweep_string_in_operand: unknown fp usage", insn);
++ sweep_string_in_operand (insn, &XEXP (x, i), sweep_offset, sweep_size);
++ }
++ else if (*fmt == 'E')
++ for (j = 0; j < XVECLEN (x, i); j++)
++ sweep_string_in_operand (insn, &XVECEXP (x, i, j), sweep_offset, sweep_size);
++}
++
++
++/* Change the use of an argument to the use of the duplicated variable for
++ every insns, The variable is addressed by new rtx. */
++static void
++change_arg_use_of_insns (rtx insn, rtx orig, rtx *new, HOST_WIDE_INT size)
++{
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
++ || GET_CODE (insn) == CALL_INSN)
++ {
++ rtx seq;
++
++ start_sequence ();
++ change_arg_use_in_operand (insn, PATTERN (insn), orig, new, size);
++
++ seq = get_insns ();
++ end_sequence ();
++ emit_insn_before (seq, insn);
++
++ /* load_multiple insn from virtual_incoming_args_rtx have several
++ load insns. If every insn change the load address of arg
++ to frame region, those insns are moved before the PARALLEL insn
++ and remove the PARALLEL insn. */
++ if (GET_CODE (PATTERN (insn)) == PARALLEL
++ && XVECLEN (PATTERN (insn), 0) == 0)
++ delete_insn (insn);
++ }
++}
++
++
++/* Change the use of an argument to the use of the duplicated variable for
++ every rtx derived from the x. */
++static void
++change_arg_use_in_operand (rtx insn, rtx x, rtx orig, rtx *new, HOST_WIDE_INT size)
++{
++ enum rtx_code code;
++ int i, j;
++ HOST_WIDE_INT offset;
++ const char *fmt;
++
++ if (x == 0)
++ return;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case CONST:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ case ASM_INPUT:
++ case ADDR_VEC:
++ case ADDR_DIFF_VEC:
++ case RETURN:
++ case REG:
++ case ADDRESSOF:
++ return;
++
++ case MEM:
++ /* Handle special case of MEM (incoming_args). */
++ if (GET_CODE (orig) == MEM
++ && XEXP (x, 0) == virtual_incoming_args_rtx)
++ {
++ offset = 0;
++
++ /* the operand related to the sweep variable. */
++ if (AUTO_OFFSET(XEXP (orig, 0)) <= offset &&
++ offset < AUTO_OFFSET(XEXP (orig, 0)) + size) {
++
++ offset = AUTO_OFFSET(XEXP (*new, 0))
++ + (offset - AUTO_OFFSET(XEXP (orig, 0)));
++
++ XEXP (x, 0) = plus_constant (virtual_stack_vars_rtx, offset);
++ XEXP (x, 0)->used = 1;
++
++ return;
++ }
++ }
++ break;
++
++ case PLUS:
++ /* Handle special case of frame register plus constant. */
++ if (GET_CODE (orig) == MEM
++ && XEXP (x, 0) == virtual_incoming_args_rtx
++ && GET_CODE (XEXP (x, 1)) == CONST_INT
++ && ! x->used)
++ {
++ offset = AUTO_OFFSET(x);
++
++ /* the operand related to the sweep variable. */
++ if (AUTO_OFFSET(XEXP (orig, 0)) <= offset &&
++ offset < AUTO_OFFSET(XEXP (orig, 0)) + size)
++ {
++
++ offset = (AUTO_OFFSET(XEXP (*new, 0))
++ + (offset - AUTO_OFFSET(XEXP (orig, 0))));
++
++ XEXP (x, 0) = virtual_stack_vars_rtx;
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset);
++ x->used = 1;
++
++ return;
++ }
++
++ /*
++ process further subtree:
++ Example: (plus:SI (mem/s:SI (plus:SI (reg:SI 17) (const_int 8)))
++ (const_int 5))
++ */
++ }
++ break;
++
++ case SET:
++ /* Handle special case of "set (REG or MEM) (incoming_args)".
++ It means that the the address of the 1st argument is stored. */
++ if (GET_CODE (orig) == MEM
++ && XEXP (x, 1) == virtual_incoming_args_rtx)
++ {
++ offset = 0;
++
++ /* the operand related to the sweep variable. */
++ if (AUTO_OFFSET(XEXP (orig, 0)) <= offset &&
++ offset < AUTO_OFFSET(XEXP (orig, 0)) + size)
++ {
++ offset = (AUTO_OFFSET(XEXP (*new, 0))
++ + (offset - AUTO_OFFSET(XEXP (orig, 0))));
++
++ XEXP (x, 1) = force_operand (plus_constant (virtual_stack_vars_rtx,
++ offset), NULL_RTX);
++ XEXP (x, 1)->used = 1;
++
++ return;
++ }
++ }
++ break;
++
++ case CALL_PLACEHOLDER:
++ for (i = 0; i < 3; i++)
++ {
++ rtx seq = XEXP (x, i);
++ if (seq)
++ {
++ push_to_sequence (seq);
++ change_arg_use_of_insns (XEXP (x, i), orig, new, size);
++ XEXP (x, i) = get_insns ();
++ end_sequence ();
++ }
++ }
++ break;
++
++ case PARALLEL:
++ for (j = 0; j < XVECLEN (x, 0); j++)
++ {
++ change_arg_use_in_operand (insn, XVECEXP (x, 0, j), orig, new, size);
++ }
++ if (recog_memoized (insn) < 0)
++ {
++ for (i = 0, j = 0; j < XVECLEN (x, 0); j++)
++ {
++ /* if parallel insn has a insn used virtual_incoming_args_rtx,
++ the insn is removed from this PARALLEL insn. */
++ if (check_used_flag (XVECEXP (x, 0, j)))
++ {
++ emit_insn (XVECEXP (x, 0, j));
++ XVECEXP (x, 0, j) = NULL;
++ }
++ else
++ XVECEXP (x, 0, i++) = XVECEXP (x, 0, j);
++ }
++ PUT_NUM_ELEM (XVEC (x, 0), i);
++ }
++ return;
++
++ default:
++ break;
++ }
++
++ /* Scan all subexpressions. */
++ fmt = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
++ if (*fmt == 'e')
++ {
++ if (XEXP (x, i) == orig)
++ {
++ if (*new == 0)
++ *new = gen_reg_rtx (GET_MODE (orig));
++ XEXP (x, i) = *new;
++ continue;
++ }
++ change_arg_use_in_operand (insn, XEXP (x, i), orig, new, size);
++ }
++ else if (*fmt == 'E')
++ for (j = 0; j < XVECLEN (x, i); j++)
++ {
++ if (XVECEXP (x, i, j) == orig)
++ {
++ if (*new == 0)
++ *new = gen_reg_rtx (GET_MODE (orig));
++ XVECEXP (x, i, j) = *new;
++ continue;
++ }
++ change_arg_use_in_operand (insn, XVECEXP (x, i, j), orig, new, size);
++ }
++}
++
++
++/* Validate every instructions from the specified instruction.
++
++ The stack protector prohibits to generate machine specific frame addressing
++ for the first rtl generation. The prepare_stack_protection must convert
++ machine independent frame addressing to machine specific frame addressing,
++ so instructions for inline functions, which skip the conversion of
++ the stack protection, validate every instructions. */
++static void
++validate_insns_of_varrefs (rtx insn)
++{
++ rtx next;
++
++ /* Initialize recognition, indicating that volatile is OK. */
++ init_recog ();
++
++ for (; insn; insn = next)
++ {
++ next = NEXT_INSN (insn);
++ if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
++ || GET_CODE (insn) == CALL_INSN)
++ {
++ /* excerpt from insn_invalid_p in recog.c */
++ int icode = recog_memoized (insn);
++
++ if (icode < 0 && asm_noperands (PATTERN (insn)) < 0)
++ validate_operand_of_varrefs (insn, &PATTERN (insn));
++ }
++ }
++
++ init_recog_no_volatile ();
++}
++
++
++/* Validate frame addressing of the rtx and covert it to machine specific one. */
++static void
++validate_operand_of_varrefs (rtx insn, rtx *loc)
++{
++ enum rtx_code code;
++ rtx x, temp, seq;
++ int i, j;
++ const char *fmt;
++
++ x = *loc;
++ if (x == 0)
++ return;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case USE:
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case CONST:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ case ASM_INPUT:
++ case ADDR_VEC:
++ case ADDR_DIFF_VEC:
++ case RETURN:
++ case REG:
++ case ADDRESSOF:
++ return;
++
++ case PLUS:
++ /* validate insn of frame register plus constant. */
++ if (GET_CODE (x) == PLUS
++ && XEXP (x, 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (x, 1)) == CONST_INT)
++ {
++ start_sequence ();
++
++ { /* excerpt from expand_binop in optabs.c */
++ optab binoptab = add_optab;
++ enum machine_mode mode = GET_MODE (x);
++ int icode = (int) binoptab->handlers[(int) mode].insn_code;
++ enum machine_mode mode1 = insn_data[icode].operand[2].mode;
++ rtx pat;
++ rtx xop0 = XEXP (x, 0), xop1 = XEXP (x, 1);
++ temp = gen_reg_rtx (mode);
++
++ /* Now, if insn's predicates don't allow offset operands,
++ put them into pseudo regs. */
++
++ if (! (*insn_data[icode].operand[2].predicate) (xop1, mode1)
++ && mode1 != VOIDmode)
++ xop1 = copy_to_mode_reg (mode1, xop1);
++
++ pat = GEN_FCN (icode) (temp, xop0, xop1);
++ if (pat)
++ emit_insn (pat);
++ else
++ abort (); /* there must be add_optab handler. */
++ }
++ seq = get_insns ();
++ end_sequence ();
++
++ emit_insn_before (seq, insn);
++ if (! validate_change (insn, loc, temp, 0))
++ abort ();
++ return;
++ }
++ break;
++
++
++ case CALL_PLACEHOLDER:
++ for (i = 0; i < 3; i++)
++ {
++ rtx seq = XEXP (x, i);
++ if (seq)
++ {
++ push_to_sequence (seq);
++ validate_insns_of_varrefs (XEXP (x, i));
++ XEXP (x, i) = get_insns ();
++ end_sequence ();
++ }
++ }
++ break;
++
++ default:
++ break;
++ }
++
++ /* Scan all subexpressions. */
++ fmt = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
++ if (*fmt == 'e')
++ validate_operand_of_varrefs (insn, &XEXP (x, i));
++ else if (*fmt == 'E')
++ for (j = 0; j < XVECLEN (x, i); j++)
++ validate_operand_of_varrefs (insn, &XVECEXP (x, i, j));
++}
++
++
++
++/* Return size that is not allocated for stack frame. It will be allocated
++ to modify the home of pseudo registers called from global_alloc. */
++HOST_WIDE_INT
++get_frame_free_size (void)
++{
++ if (! flag_propolice_protection)
++ return 0;
++
++ return push_allocated_offset - push_frame_offset;
++}
++
++
++/* The following codes are invoked after the instantiation of pseudo registers.
++
++ Reorder local variables to place a peudo register after buffers to avoid
++ the corruption of local variables that could be used to further corrupt
++ arbitrary memory locations. */
++#if !defined(FRAME_GROWS_DOWNWARD) && defined(STACK_GROWS_DOWNWARD)
++static void push_frame (HOST_WIDE_INT, HOST_WIDE_INT);
++static void push_frame_in_decls (tree, HOST_WIDE_INT, HOST_WIDE_INT);
++static void push_frame_in_args (tree, HOST_WIDE_INT, HOST_WIDE_INT);
++static void push_frame_of_insns (rtx, HOST_WIDE_INT, HOST_WIDE_INT);
++static void push_frame_in_operand (rtx, rtx, HOST_WIDE_INT, HOST_WIDE_INT);
++static void push_frame_of_reg_equiv_memory_loc (HOST_WIDE_INT, HOST_WIDE_INT);
++static void push_frame_of_reg_equiv_constant (HOST_WIDE_INT, HOST_WIDE_INT);
++static void reset_used_flags_for_push_frame (void);
++static int check_out_of_frame_access (rtx, HOST_WIDE_INT);
++static int check_out_of_frame_access_in_operand (rtx, HOST_WIDE_INT);
++#endif
++
++
++/* Assign stack local at the stage of register allocater. if a pseudo reg is
++ spilled out from such an allocation, it is allocated on the stack.
++ The protector keep the location be lower stack region than the location of
++ sweeped arrays. */
++rtx
++assign_stack_local_for_pseudo_reg (enum machine_mode mode,
++ HOST_WIDE_INT size, int align)
++{
++#if defined(FRAME_GROWS_DOWNWARD) || !defined(STACK_GROWS_DOWNWARD)
++ return assign_stack_local (mode, size, align);
++#else
++ tree blocks = DECL_INITIAL (current_function_decl);
++ rtx new;
++ HOST_WIDE_INT saved_frame_offset, units_per_push, starting_frame;
++ int first_call_from_purge_addressof, first_call_from_global_alloc;
++
++ if (! flag_propolice_protection
++ || size == 0
++ || ! blocks
++ || current_function_is_inlinable
++ || ! search_string_from_argsandvars (CALL_FROM_PUSH_FRAME)
++ || current_function_contains_functions)
++ return assign_stack_local (mode, size, align);
++
++ first_call_from_purge_addressof = !push_frame_offset && !cse_not_expected;
++ first_call_from_global_alloc = !saved_cse_not_expected && cse_not_expected;
++ saved_cse_not_expected = cse_not_expected;
++
++ starting_frame = ((STARTING_FRAME_OFFSET)
++ ? STARTING_FRAME_OFFSET : BIGGEST_ALIGNMENT / BITS_PER_UNIT);
++ units_per_push = MAX (BIGGEST_ALIGNMENT / BITS_PER_UNIT,
++ GET_MODE_SIZE (mode));
++
++ if (first_call_from_purge_addressof)
++ {
++ push_frame_offset = push_allocated_offset;
++ if (check_out_of_frame_access (get_insns (), starting_frame))
++ {
++ /* After the purge_addressof stage, there may be an instruction which
++ have the pointer less than the starting_frame.
++ if there is an access below frame, push dummy region to seperate
++ the address of instantiated variables. */
++ push_frame (GET_MODE_SIZE (DImode), 0);
++ assign_stack_local (BLKmode, GET_MODE_SIZE (DImode), -1);
++ }
++ }
++
++ if (first_call_from_global_alloc)
++ {
++ push_frame_offset = push_allocated_offset = 0;
++ if (check_out_of_frame_access (get_insns (), starting_frame))
++ {
++ if (STARTING_FRAME_OFFSET)
++ {
++ /* if there is an access below frame, push dummy region
++ to seperate the address of instantiated variables. */
++ push_frame (GET_MODE_SIZE (DImode), 0);
++ assign_stack_local (BLKmode, GET_MODE_SIZE (DImode), -1);
++ }
++ else
++ push_allocated_offset = starting_frame;
++ }
++ }
++
++ saved_frame_offset = frame_offset;
++ frame_offset = push_frame_offset;
++
++ new = assign_stack_local (mode, size, align);
++
++ push_frame_offset = frame_offset;
++ frame_offset = saved_frame_offset;
++
++ if (push_frame_offset > push_allocated_offset)
++ {
++ push_frame (units_per_push,
++ push_allocated_offset + STARTING_FRAME_OFFSET);
++
++ assign_stack_local (BLKmode, units_per_push, -1);
++ push_allocated_offset += units_per_push;
++ }
++
++ /* At the second call from global alloc, alpha push frame and assign
++ a local variable to the top of the stack. */
++ if (first_call_from_global_alloc && STARTING_FRAME_OFFSET == 0)
++ push_frame_offset = push_allocated_offset = 0;
++
++ return new;
++#endif
++}
++
++
++#if !defined(FRAME_GROWS_DOWNWARD) && defined(STACK_GROWS_DOWNWARD)
++
++/* push frame infomation for instantiating pseudo register at the top of stack.
++ This is only for the "frame grows upward", it means FRAME_GROWS_DOWNWARD is
++ not defined.
++
++ It is called by purge_addressof function and global_alloc (or reload)
++ function. */
++static void
++push_frame (HOST_WIDE_INT var_size, HOST_WIDE_INT boundary)
++{
++ reset_used_flags_for_push_frame();
++
++ /* Scan all declarations of variables and fix the offset address of
++ the variable based on the frame pointer. */
++ push_frame_in_decls (DECL_INITIAL (current_function_decl),
++ var_size, boundary);
++
++ /* Scan all argument variable and fix the offset address based on
++ the frame pointer. */
++ push_frame_in_args (DECL_ARGUMENTS (current_function_decl),
++ var_size, boundary);
++
++ /* Scan all operands of all insns and fix the offset address
++ based on the frame pointer. */
++ push_frame_of_insns (get_insns (), var_size, boundary);
++
++ /* Scan all reg_equiv_memory_loc and reg_equiv_constant. */
++ push_frame_of_reg_equiv_memory_loc (var_size, boundary);
++ push_frame_of_reg_equiv_constant (var_size, boundary);
++
++ reset_used_flags_for_push_frame();
++}
++
++
++/* Reset used flag of every insns, reg_equiv_memory_loc,
++ and reg_equiv_constant. */
++static void
++reset_used_flags_for_push_frame(void)
++{
++ int i;
++ extern rtx *reg_equiv_memory_loc;
++ extern rtx *reg_equiv_constant;
++
++ /* Clear all the USED bits in operands of all insns and declarations of
++ local vars. */
++ reset_used_flags_for_decls (DECL_INITIAL (current_function_decl));
++ reset_used_flags_for_insns (get_insns ());
++
++
++ /* The following codes are processed if the push_frame is called from
++ global_alloc (or reload) function. */
++ if (reg_equiv_memory_loc == 0)
++ return;
++
++ for (i=LAST_VIRTUAL_REGISTER+1; i < max_regno; i++)
++ if (reg_equiv_memory_loc[i])
++ {
++ rtx x = reg_equiv_memory_loc[i];
++
++ if (GET_CODE (x) == MEM
++ && GET_CODE (XEXP (x, 0)) == PLUS
++ && AUTO_BASEPTR (XEXP (x, 0)) == frame_pointer_rtx)
++ {
++ /* reset */
++ XEXP (x, 0)->used = 0;
++ }
++ }
++
++
++ if (reg_equiv_constant == 0)
++ return;
++
++ for (i=LAST_VIRTUAL_REGISTER+1; i < max_regno; i++)
++ if (reg_equiv_constant[i])
++ {
++ rtx x = reg_equiv_constant[i];
++
++ if (GET_CODE (x) == PLUS
++ && AUTO_BASEPTR (x) == frame_pointer_rtx)
++ {
++ /* reset */
++ x->used = 0;
++ }
++ }
++}
++
++
++/* Push every variables declared as a local variable and make a room for
++ instantiated register. */
++static void
++push_frame_in_decls (tree block, HOST_WIDE_INT push_size,
++ HOST_WIDE_INT boundary)
++{
++ tree types;
++ HOST_WIDE_INT offset;
++ rtx home;
++
++ while (block && TREE_CODE(block)==BLOCK)
++ {
++ for (types = BLOCK_VARS(block); types; types = TREE_CHAIN(types))
++ {
++ /* Skip the declaration that refers an external variable and
++ also skip an global variable. */
++ if (! DECL_EXTERNAL (types) && ! TREE_STATIC (types))
++ {
++ if (! DECL_RTL_SET_P (types))
++ continue;
++
++ home = DECL_RTL (types);
++
++ /* Process for static local variable. */
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == SYMBOL_REF)
++ continue;
++
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == REG)
++ {
++ if (XEXP (home, 0) != frame_pointer_rtx
++ || boundary != 0)
++ continue;
++
++ XEXP (home, 0) = plus_constant (frame_pointer_rtx,
++ push_size);
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == MEM)
++ {
++ /* Process for dynamically allocated array. */
++ home = XEXP (home, 0);
++ }
++
++ if (GET_CODE (home) == MEM
++ && GET_CODE (XEXP (home, 0)) == PLUS
++ && GET_CODE (XEXP (XEXP (home, 0), 1)) == CONST_INT)
++ {
++ offset = AUTO_OFFSET(XEXP (home, 0));
++
++ if (! XEXP (home, 0)->used
++ && offset >= boundary)
++ {
++ offset += push_size;
++ XEXP (XEXP (home, 0), 1)
++ = gen_rtx_CONST_INT (VOIDmode, offset);
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++ }
++ }
++ }
++
++ push_frame_in_decls (BLOCK_SUBBLOCKS (block), push_size, boundary);
++ block = BLOCK_CHAIN (block);
++ }
++}
++
++
++/* Push every variables declared as an argument and make a room for
++ instantiated register. */
++static void
++push_frame_in_args (tree parms, HOST_WIDE_INT push_size,
++ HOST_WIDE_INT boundary)
++{
++ rtx home;
++ HOST_WIDE_INT offset;
++
++ for (; parms; parms = TREE_CHAIN (parms))
++ if (DECL_NAME (parms) && TREE_TYPE (parms) != error_mark_node)
++ {
++ if (PARM_PASSED_IN_MEMORY (parms))
++ {
++ home = DECL_INCOMING_RTL (parms);
++ offset = AUTO_OFFSET(XEXP (home, 0));
++
++ if (XEXP (home, 0)->used || offset < boundary)
++ continue;
++
++ /* the operand related to the sweep variable. */
++ if (AUTO_BASEPTR (XEXP (home, 0)) == frame_pointer_rtx)
++ {
++ if (XEXP (home, 0) == frame_pointer_rtx)
++ XEXP (home, 0) = plus_constant (frame_pointer_rtx,
++ push_size);
++ else {
++ offset += push_size;
++ XEXP (XEXP (home, 0), 1) = gen_rtx_CONST_INT (VOIDmode,
++ offset);
++ }
++
++ /* mark */
++ XEXP (home, 0)->used = 1;
++ }
++ }
++ }
++}
++
++
++/* Set to 1 when the instruction has the reference to be pushed. */
++static int insn_pushed;
++
++/* Tables of equivalent registers with frame pointer. */
++static int *fp_equiv = 0;
++
++
++/* Push the frame region to make a room for allocated local variable. */
++static void
++push_frame_of_insns (rtx insn, HOST_WIDE_INT push_size, HOST_WIDE_INT boundary)
++{
++ /* init fp_equiv */
++ fp_equiv = (int *) xcalloc (max_reg_num (), sizeof (int));
++
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
++ || GET_CODE (insn) == CALL_INSN)
++ {
++ rtx last;
++
++ insn_pushed = FALSE;
++
++ /* Push frame in INSN operation. */
++ push_frame_in_operand (insn, PATTERN (insn), push_size, boundary);
++
++ /* Push frame in NOTE. */
++ push_frame_in_operand (insn, REG_NOTES (insn), push_size, boundary);
++
++ /* Push frame in CALL EXPR_LIST. */
++ if (GET_CODE (insn) == CALL_INSN)
++ push_frame_in_operand (insn, CALL_INSN_FUNCTION_USAGE (insn),
++ push_size, boundary);
++
++ /* Pushed frame addressing style may not be machine specific one.
++ so the instruction should be converted to use the machine specific
++ frame addressing. */
++ if (insn_pushed
++ && (last = try_split (PATTERN (insn), insn, 1)) != insn)
++ {
++ rtx first = NEXT_INSN (insn);
++ rtx trial = NEXT_INSN (first);
++ rtx pattern = PATTERN (trial);
++ rtx set;
++
++ /* Update REG_EQUIV info to the first splitted insn. */
++ if ((set = single_set (insn))
++ && find_reg_note (insn, REG_EQUIV, SET_SRC (set))
++ && GET_CODE (PATTERN (first)) == SET)
++ {
++ REG_NOTES (first)
++ = gen_rtx_EXPR_LIST (REG_EQUIV,
++ SET_SRC (PATTERN (first)),
++ REG_NOTES (first));
++ }
++
++ /* copy the first insn of splitted insns to the original insn and
++ delete the first insn,
++ because the original insn is pointed from records:
++ insn_chain, reg_equiv_init, used for global_alloc. */
++ if (cse_not_expected)
++ {
++ add_insn_before (insn, first);
++
++ /* Copy the various flags, and other information. */
++ memcpy (insn, first, sizeof (struct rtx_def) - sizeof (rtunion));
++ PATTERN (insn) = PATTERN (first);
++ INSN_CODE (insn) = INSN_CODE (first);
++ LOG_LINKS (insn) = LOG_LINKS (first);
++ REG_NOTES (insn) = REG_NOTES (first);
++
++ /* then remove the first insn of splitted insns. */
++ remove_insn (first);
++ INSN_DELETED_P (first) = 1;
++ }
++
++ if (GET_CODE (pattern) == SET
++ && GET_CODE (XEXP (pattern, 0)) == REG
++ && GET_CODE (XEXP (pattern, 1)) == PLUS
++ && XEXP (pattern, 0) == XEXP (XEXP (pattern, 1), 0)
++ && GET_CODE (XEXP (XEXP (pattern, 1), 1)) == CONST_INT)
++ {
++ rtx offset = XEXP (XEXP (pattern, 1), 1);
++ fp_equiv[REGNO (XEXP (pattern, 0))] = INTVAL (offset);
++
++ delete_insn (trial);
++ }
++
++ insn = last;
++ }
++ }
++
++ /* Clean up. */
++ free (fp_equiv);
++}
++
++
++/* Push the frame region by changing the operand that points the frame. */
++static void
++push_frame_in_operand (rtx insn, rtx orig,
++ HOST_WIDE_INT push_size, HOST_WIDE_INT boundary)
++{
++ rtx x = orig;
++ enum rtx_code code;
++ int i, j;
++ HOST_WIDE_INT offset;
++ const char *fmt;
++
++ if (x == 0)
++ return;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case CONST:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ case ASM_INPUT:
++ case ADDR_VEC:
++ case ADDR_DIFF_VEC:
++ case RETURN:
++ case REG:
++ case ADDRESSOF:
++ case USE:
++ return;
++
++ case SET:
++ /*
++ Skip setjmp setup insn and setjmp restore insn
++ alpha case:
++ (set (MEM (reg:SI xx)) (frame_pointer_rtx)))
++ (set (frame_pointer_rtx) (REG))
++ */
++ if (GET_CODE (XEXP (x, 0)) == MEM
++ && XEXP (x, 1) == frame_pointer_rtx)
++ return;
++ if (XEXP (x, 0) == frame_pointer_rtx
++ && GET_CODE (XEXP (x, 1)) == REG)
++ return;
++
++ /*
++ powerpc case: restores setjmp address
++ (set (frame_pointer_rtx) (plus frame_pointer_rtx const_int -n))
++ or
++ (set (reg) (plus frame_pointer_rtx const_int -n))
++ (set (frame_pointer_rtx) (reg))
++ */
++ if (GET_CODE (XEXP (x, 0)) == REG
++ && GET_CODE (XEXP (x, 1)) == PLUS
++ && XEXP (XEXP (x, 1), 0) == frame_pointer_rtx
++ && GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT
++ && INTVAL (XEXP (XEXP (x, 1), 1)) < 0)
++ {
++ x = XEXP (x, 1);
++ offset = AUTO_OFFSET(x);
++ if (x->used || -offset < boundary)
++ return;
++
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset - push_size);
++ x->used = 1; insn_pushed = TRUE;
++ return;
++ }
++
++ /* Reset fp_equiv register. */
++ else if (GET_CODE (XEXP (x, 0)) == REG
++ && fp_equiv[REGNO (XEXP (x, 0))])
++ fp_equiv[REGNO (XEXP (x, 0))] = 0;
++
++ /* Propagete fp_equiv register. */
++ else if (GET_CODE (XEXP (x, 0)) == REG
++ && GET_CODE (XEXP (x, 1)) == REG
++ && fp_equiv[REGNO (XEXP (x, 1))])
++ if (REGNO (XEXP (x, 0)) <= LAST_VIRTUAL_REGISTER
++ || reg_renumber[REGNO (XEXP (x, 0))] > 0)
++ fp_equiv[REGNO (XEXP (x, 0))] = fp_equiv[REGNO (XEXP (x, 1))];
++ break;
++
++ case MEM:
++ if (XEXP (x, 0) == frame_pointer_rtx
++ && boundary == 0)
++ {
++ XEXP (x, 0) = plus_constant (frame_pointer_rtx, push_size);
++ XEXP (x, 0)->used = 1; insn_pushed = TRUE;
++ return;
++ }
++ break;
++
++ case PLUS:
++ /* Handle special case of frame register plus constant. */
++ if (GET_CODE (XEXP (x, 1)) == CONST_INT
++ && XEXP (x, 0) == frame_pointer_rtx)
++ {
++ offset = AUTO_OFFSET(x);
++
++ if (x->used || offset < boundary)
++ return;
++
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset + push_size);
++ x->used = 1; insn_pushed = TRUE;
++
++ return;
++ }
++ /*
++ Handle alpha case:
++ (plus:SI (subreg:SI (reg:DI 63 FP) 0) (const_int 64 [0x40]))
++ */
++ if (GET_CODE (XEXP (x, 1)) == CONST_INT
++ && GET_CODE (XEXP (x, 0)) == SUBREG
++ && SUBREG_REG (XEXP (x, 0)) == frame_pointer_rtx)
++ {
++ offset = AUTO_OFFSET(x);
++
++ if (x->used || offset < boundary)
++ return;
++
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset + push_size);
++ x->used = 1; insn_pushed = TRUE;
++
++ return;
++ }
++ /*
++ Handle powerpc case:
++ (set (reg x) (plus fp const))
++ (set (.....) (... (plus (reg x) (const B))))
++ */
++ else if (GET_CODE (XEXP (x, 1)) == CONST_INT
++ && GET_CODE (XEXP (x, 0)) == REG
++ && fp_equiv[REGNO (XEXP (x, 0))])
++ {
++ offset = AUTO_OFFSET(x);
++
++ if (x->used)
++ return;
++
++ offset += fp_equiv[REGNO (XEXP (x, 0))];
++
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset);
++ x->used = 1; insn_pushed = TRUE;
++
++ return;
++ }
++ /*
++ Handle special case of frame register plus reg (constant).
++ (set (reg x) (const B))
++ (set (....) (...(plus fp (reg x))))
++ */
++ else if (XEXP (x, 0) == frame_pointer_rtx
++ && GET_CODE (XEXP (x, 1)) == REG
++ && PREV_INSN (insn)
++ && PATTERN (PREV_INSN (insn))
++ && SET_DEST (PATTERN (PREV_INSN (insn))) == XEXP (x, 1)
++ && GET_CODE (SET_SRC (PATTERN (PREV_INSN (insn)))) == CONST_INT)
++ {
++ offset = INTVAL (SET_SRC (PATTERN (PREV_INSN (insn))));
++
++ if (x->used || offset < boundary)
++ return;
++
++ SET_SRC (PATTERN (PREV_INSN (insn)))
++ = gen_rtx_CONST_INT (VOIDmode, offset + push_size);
++ x->used = 1;
++ XEXP (x, 1)->used = 1;
++
++ return;
++ }
++ /*
++ Handle special case of frame register plus reg (used).
++ The register already have a pushed offset, just mark this frame
++ addressing.
++ */
++ else if (XEXP (x, 0) == frame_pointer_rtx
++ && XEXP (x, 1)->used)
++ {
++ x->used = 1;
++ return;
++ }
++ /*
++ Process further subtree:
++ Example: (plus:SI (mem/s:SI (plus:SI (FP) (const_int 8)))
++ (const_int 5))
++ */
++ break;
++
++ case CALL_PLACEHOLDER:
++ push_frame_of_insns (XEXP (x, 0), push_size, boundary);
++ push_frame_of_insns (XEXP (x, 1), push_size, boundary);
++ push_frame_of_insns (XEXP (x, 2), push_size, boundary);
++ break;
++
++ default:
++ break;
++ }
++
++ /* Scan all subexpressions. */
++ fmt = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
++ if (*fmt == 'e')
++ {
++ if (XEXP (x, i) == frame_pointer_rtx && boundary == 0)
++ fatal_insn ("push_frame_in_operand", insn);
++ push_frame_in_operand (insn, XEXP (x, i), push_size, boundary);
++ }
++ else if (*fmt == 'E')
++ for (j = 0; j < XVECLEN (x, i); j++)
++ push_frame_in_operand (insn, XVECEXP (x, i, j), push_size, boundary);
++}
++
++
++/* Change the location pointed in reg_equiv_memory_loc. */
++static void
++push_frame_of_reg_equiv_memory_loc (HOST_WIDE_INT push_size,
++ HOST_WIDE_INT boundary)
++{
++ int i;
++ extern rtx *reg_equiv_memory_loc;
++
++ /* This function is processed if the push_frame is called from
++ global_alloc (or reload) function. */
++ if (reg_equiv_memory_loc == 0)
++ return;
++
++ for (i=LAST_VIRTUAL_REGISTER+1; i < max_regno; i++)
++ if (reg_equiv_memory_loc[i])
++ {
++ rtx x = reg_equiv_memory_loc[i];
++ int offset;
++
++ if (GET_CODE (x) == MEM
++ && GET_CODE (XEXP (x, 0)) == PLUS
++ && XEXP (XEXP (x, 0), 0) == frame_pointer_rtx)
++ {
++ offset = AUTO_OFFSET(XEXP (x, 0));
++
++ if (! XEXP (x, 0)->used
++ && offset >= boundary)
++ {
++ offset += push_size;
++ XEXP (XEXP (x, 0), 1) = gen_rtx_CONST_INT (VOIDmode, offset);
++
++ /* mark */
++ XEXP (x, 0)->used = 1;
++ }
++ }
++ else if (GET_CODE (x) == MEM
++ && XEXP (x, 0) == frame_pointer_rtx
++ && boundary == 0)
++ {
++ XEXP (x, 0) = plus_constant (frame_pointer_rtx, push_size);
++ XEXP (x, 0)->used = 1; insn_pushed = TRUE;
++ }
++ }
++}
++
++
++/* Change the location pointed in reg_equiv_constant. */
++static void
++push_frame_of_reg_equiv_constant (HOST_WIDE_INT push_size,
++ HOST_WIDE_INT boundary)
++{
++ int i;
++ extern rtx *reg_equiv_constant;
++
++ /* This function is processed if the push_frame is called from
++ global_alloc (or reload) function. */
++ if (reg_equiv_constant == 0)
++ return;
++
++ for (i = LAST_VIRTUAL_REGISTER + 1; i < max_regno; i++)
++ if (reg_equiv_constant[i])
++ {
++ rtx x = reg_equiv_constant[i];
++ int offset;
++
++ if (GET_CODE (x) == PLUS
++ && XEXP (x, 0) == frame_pointer_rtx)
++ {
++ offset = AUTO_OFFSET(x);
++
++ if (! x->used
++ && offset >= boundary)
++ {
++ offset += push_size;
++ XEXP (x, 1) = gen_rtx_CONST_INT (VOIDmode, offset);
++
++ /* mark */
++ x->used = 1;
++ }
++ }
++ else if (x == frame_pointer_rtx
++ && boundary == 0)
++ {
++ reg_equiv_constant[i]
++ = plus_constant (frame_pointer_rtx, push_size);
++ reg_equiv_constant[i]->used = 1; insn_pushed = TRUE;
++ }
++ }
++}
++
++
++/* Check every instructions if insn's memory reference is out of frame. */
++static int
++check_out_of_frame_access (rtx insn, HOST_WIDE_INT boundary)
++{
++ for (; insn; insn = NEXT_INSN (insn))
++ if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
++ || GET_CODE (insn) == CALL_INSN)
++ {
++ if (check_out_of_frame_access_in_operand (PATTERN (insn), boundary))
++ return TRUE;
++ }
++ return FALSE;
++}
++
++
++/* Check every operands if the reference is out of frame. */
++static int
++check_out_of_frame_access_in_operand (rtx orig, HOST_WIDE_INT boundary)
++{
++ rtx x = orig;
++ enum rtx_code code;
++ int i, j;
++ const char *fmt;
++
++ if (x == 0)
++ return FALSE;
++
++ code = GET_CODE (x);
++
++ switch (code)
++ {
++ case CONST_INT:
++ case CONST_DOUBLE:
++ case CONST:
++ case SYMBOL_REF:
++ case CODE_LABEL:
++ case PC:
++ case CC0:
++ case ASM_INPUT:
++ case ADDR_VEC:
++ case ADDR_DIFF_VEC:
++ case RETURN:
++ case REG:
++ case ADDRESSOF:
++ return FALSE;
++
++ case MEM:
++ if (XEXP (x, 0) == frame_pointer_rtx)
++ if (0 < boundary)
++ return TRUE;
++ break;
++
++ case PLUS:
++ /* Handle special case of frame register plus constant. */
++ if (GET_CODE (XEXP (x, 1)) == CONST_INT
++ && XEXP (x, 0) == frame_pointer_rtx)
++ {
++ if (0 <= AUTO_OFFSET(x)
++ && AUTO_OFFSET(x) < boundary)
++ return TRUE;
++ return FALSE;
++ }
++ /*
++ Process further subtree:
++ Example: (plus:SI (mem/s:SI (plus:SI (reg:SI 17) (const_int 8)))
++ (const_int 5))
++ */
++ break;
++
++ case CALL_PLACEHOLDER:
++ if (check_out_of_frame_access (XEXP (x, 0), boundary))
++ return TRUE;
++ if (check_out_of_frame_access (XEXP (x, 1), boundary))
++ return TRUE;
++ if (check_out_of_frame_access (XEXP (x, 2), boundary))
++ return TRUE;
++ break;
++
++ default:
++ break;
++ }
++
++ /* Scan all subexpressions. */
++ fmt = GET_RTX_FORMAT (code);
++ for (i = 0; i < GET_RTX_LENGTH (code); i++, fmt++)
++ if (*fmt == 'e')
++ {
++ if (check_out_of_frame_access_in_operand (XEXP (x, i), boundary))
++ return TRUE;
++ }
++ else if (*fmt == 'E')
++ for (j = 0; j < XVECLEN (x, i); j++)
++ if (check_out_of_frame_access_in_operand (XVECEXP (x, i, j), boundary))
++ return TRUE;
++
++ return FALSE;
++}
++#endif
+diff -uNr gcc-3.4.3.orig/gcc/protector.h gcc-3.4.3/gcc/protector.h
+--- gcc-3.4.3.orig/gcc/protector.h 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.3/gcc/protector.h 2004-01-20 03:01:39.000000000 +0100
+@@ -0,0 +1,55 @@
++/* RTL buffer overflow protection function for GNU C compiler
++ Copyright (C) 2003 Free Software Foundation, Inc.
++
++This file is part of GCC.
++
++GCC is free software; you can redistribute it and/or modify it under
++the terms of the GNU General Public License as published by the Free
++Software Foundation; either version 2, or (at your option) any later
++version.
++
++GCC is distributed in the hope that it will be useful, but WITHOUT ANY
++WARRANTY; without even the implied warranty of MERCHANTABILITY or
++FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++for more details.
++
++You should have received a copy of the GNU General Public License
++along with GCC; see the file COPYING. If not, write to the Free
++Software Foundation, 59 Temple Place - Suite 330, Boston, MA
++02111-1307, USA. */
++
++
++/* Declare GUARD variable. */
++#define GUARD_m Pmode
++#define UNITS_PER_GUARD \
++ MAX(BIGGEST_ALIGNMENT / BITS_PER_UNIT, GET_MODE_SIZE (GUARD_m))
++
++#ifndef L_stack_smash_handler
++
++/* Insert a guard variable before a character buffer and change the order
++ of pointer variables, character buffers and pointer arguments. */
++
++extern void prepare_stack_protection (int);
++
++#ifdef TREE_CODE
++/* Search a character array from the specified type tree. */
++
++extern int search_string_def (tree);
++#endif
++
++/* Examine whether the input contains frame pointer addressing. */
++
++extern int contains_fp (rtx);
++
++/* Return size that is not allocated for stack frame. It will be allocated
++ to modify the home of pseudo registers called from global_alloc. */
++
++extern HOST_WIDE_INT get_frame_free_size (void);
++
++/* Allocate a local variable in the stack area before character buffers
++ to avoid the corruption of it. */
++
++extern rtx assign_stack_local_for_pseudo_reg (enum machine_mode,
++ HOST_WIDE_INT, int);
++
++#endif
+diff -uNr gcc-3.4.3.orig/gcc/reload1.c gcc-3.4.3/gcc/reload1.c
+--- gcc-3.4.3.orig/gcc/reload1.c 2004-05-02 14:37:17.000000000 +0200
++++ gcc-3.4.3/gcc/reload1.c 2004-11-24 18:35:31.812641048 +0100
+@@ -43,6 +43,7 @@
+ #include "toplev.h"
+ #include "except.h"
+ #include "tree.h"
++#include "protector.h"
+
+ /* This file contains the reload pass of the compiler, which is
+ run after register allocation has been done. It checks that
+@@ -891,7 +892,7 @@
+ if (cfun->stack_alignment_needed)
+ assign_stack_local (BLKmode, 0, cfun->stack_alignment_needed);
+
+- starting_frame_size = get_frame_size ();
++ starting_frame_size = get_frame_size () - get_frame_free_size ();
+
+ set_initial_elim_offsets ();
+ set_initial_label_offsets ();
+@@ -955,7 +956,7 @@
+ setup_save_areas ();
+
+ /* If we allocated another stack slot, redo elimination bookkeeping. */
+- if (starting_frame_size != get_frame_size ())
++ if (starting_frame_size != get_frame_size () - get_frame_free_size ())
+ continue;
+
+ if (caller_save_needed)
+@@ -974,7 +975,7 @@
+
+ /* If we allocated any new memory locations, make another pass
+ since it might have changed elimination offsets. */
+- if (starting_frame_size != get_frame_size ())
++ if (starting_frame_size != get_frame_size () - get_frame_free_size ())
+ something_changed = 1;
+
+ {
+@@ -1066,11 +1067,11 @@
+ if (insns_need_reload != 0 || something_needs_elimination
+ || something_needs_operands_changed)
+ {
+- HOST_WIDE_INT old_frame_size = get_frame_size ();
++ HOST_WIDE_INT old_frame_size = get_frame_size () - get_frame_free_size ();
+
+ reload_as_needed (global);
+
+- if (old_frame_size != get_frame_size ())
++ if (old_frame_size != get_frame_size () - get_frame_free_size ())
+ abort ();
+
+ if (num_eliminable)
+@@ -1957,8 +1958,10 @@
+ inherent space, and no less total space, then the previous slot. */
+ if (from_reg == -1)
+ {
+- /* No known place to spill from => no slot to reuse. */
+- x = assign_stack_local (GET_MODE (regno_reg_rtx[i]), total_size,
++ /* No known place to spill from => no slot to reuse.
++ For the stack protection, an allocated slot should be placed in
++ the safe region from the stack smaching attack. */
++ x = assign_stack_local_for_pseudo_reg (GET_MODE (regno_reg_rtx[i]), total_size,
+ inherent_size == total_size ? 0 : -1);
+ if (BYTES_BIG_ENDIAN)
+ /* Cancel the big-endian correction done in assign_stack_local.
+diff -uNr gcc-3.4.3.orig/gcc/rtl.h gcc-3.4.3/gcc/rtl.h
+--- gcc-3.4.3.orig/gcc/rtl.h 2004-10-13 01:35:32.000000000 +0200
++++ gcc-3.4.3/gcc/rtl.h 2004-11-24 18:35:31.830638312 +0100
+@@ -473,6 +473,18 @@
+ __FUNCTION__); \
+ _rtx; })
+
++#define RTL_FLAG_CHECK9(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8, C9) \
++ __extension__ \
++({ rtx const _rtx = (RTX); \
++ if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \
++ && GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4 \
++ && GET_CODE(_rtx) != C5 && GET_CODE(_rtx) != C6 \
++ && GET_CODE(_rtx) != C7 && GET_CODE(_rtx) != C8 \
++ && GET_CODE(_rtx) != C9) \
++ rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
++ __FUNCTION__); \
++ _rtx; })
++
+ extern void rtl_check_failed_flag (const char *, rtx, const char *,
+ int, const char *)
+ ATTRIBUTE_NORETURN
+@@ -488,6 +500,7 @@
+ #define RTL_FLAG_CHECK6(NAME, RTX, C1, C2, C3, C4, C5, C6) (RTX)
+ #define RTL_FLAG_CHECK7(NAME, RTX, C1, C2, C3, C4, C5, C6, C7) (RTX)
+ #define RTL_FLAG_CHECK8(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8) (RTX)
++#define RTL_FLAG_CHECK9(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8, C9) (RTX)
+ #endif
+
+ #define CLEAR_RTX_FLAGS(RTX) \
+@@ -583,9 +596,9 @@
+ #define LOG_LINKS(INSN) XEXP(INSN, 7)
+
+ #define RTX_INTEGRATED_P(RTX) \
+- (RTL_FLAG_CHECK8("RTX_INTEGRATED_P", (RTX), INSN, CALL_INSN, \
++ (RTL_FLAG_CHECK9("RTX_INTEGRATED_P", (RTX), INSN, CALL_INSN, \
+ JUMP_INSN, INSN_LIST, BARRIER, CODE_LABEL, CONST, \
+- NOTE)->integrated)
++ PLUS, NOTE)->integrated)
+ #define RTX_UNCHANGING_P(RTX) \
+ (RTL_FLAG_CHECK3("RTX_UNCHANGING_P", (RTX), REG, MEM, CONCAT)->unchanging)
+ #define RTX_FRAME_RELATED_P(RTX) \
+@@ -1125,6 +1138,10 @@
+ (RTL_FLAG_CHECK3("MEM_VOLATILE_P", (RTX), MEM, ASM_OPERANDS, \
+ ASM_INPUT)->volatil)
+
++/* 1 if RTX is an SET rtx that is not eliminated for the stack protection. */
++#define SET_VOLATILE_P(RTX) \
++ (RTL_FLAG_CHECK1("SET_VOLATILE_P", (RTX), SET)->volatil)
++
+ /* 1 if RTX is a mem that refers to an aggregate, either to the
+ aggregate itself of to a field of the aggregate. If zero, RTX may
+ or may not be such a reference. */
+diff -uNr gcc-3.4.3.orig/gcc/simplify-rtx.c gcc-3.4.3/gcc/simplify-rtx.c
+--- gcc-3.4.3.orig/gcc/simplify-rtx.c 2004-10-10 23:53:35.000000000 +0200
++++ gcc-3.4.3/gcc/simplify-rtx.c 2004-11-24 18:35:31.858634056 +0100
+@@ -2287,6 +2287,7 @@
+ int n_ops = 2, input_ops = 2, input_consts = 0, n_consts;
+ int first, changed;
+ int i, j;
++ HOST_WIDE_INT fp_offset = 0;
+
+ memset (ops, 0, sizeof ops);
+
+@@ -2312,6 +2313,10 @@
+ switch (this_code)
+ {
+ case PLUS:
++ if (flag_propolice_protection
++ && XEXP (this_op, 0) == virtual_stack_vars_rtx
++ && GET_CODE (XEXP (this_op, 1)) == CONST_INT)
++ fp_offset = INTVAL (XEXP (this_op, 1));
+ case MINUS:
+ if (n_ops == 7)
+ return NULL_RTX;
+@@ -2473,11 +2478,24 @@
+ && GET_CODE (ops[n_ops - 1].op) == CONST_INT
+ && CONSTANT_P (ops[n_ops - 2].op))
+ {
+- rtx value = ops[n_ops - 1].op;
+- if (ops[n_ops - 1].neg ^ ops[n_ops - 2].neg)
+- value = neg_const_int (mode, value);
+- ops[n_ops - 2].op = plus_constant (ops[n_ops - 2].op, INTVAL (value));
+- n_ops--;
++ if (!flag_propolice_protection)
++ {
++ rtx value = ops[n_ops - 1].op;
++ if (ops[n_ops - 1].neg ^ ops[n_ops - 2].neg)
++ value = neg_const_int (mode, value);
++ ops[n_ops - 2].op = plus_constant (ops[n_ops - 2].op, INTVAL (value));
++ n_ops--;
++ }
++ /* The stack protector keeps the addressing style of a local variable,
++ so it doesn't use neg_const_int function not to change
++ the offset value. */
++ else {
++ HOST_WIDE_INT value = INTVAL (ops[n_ops - 1].op);
++ if (ops[n_ops - 1].neg ^ ops[n_ops - 2].neg)
++ value = -value;
++ ops[n_ops - 2].op = plus_constant (ops[n_ops - 2].op, value);
++ n_ops--;
++ }
+ }
+
+ /* Count the number of CONSTs that we generated. */
+@@ -2495,6 +2513,59 @@
+ || (n_ops + n_consts == input_ops && n_consts <= input_consts)))
+ return NULL_RTX;
+
++ if (flag_propolice_protection)
++ {
++ /* keep the addressing style of local variables
++ as (plus (virtual_stack_vars_rtx) (CONST_int x)).
++ For the case array[r-1],
++ converts from (+ (+VFP c1) (+r -1)) to (SET R (+VFP c1)) (+ R (+r -1)).
++
++ This loop finds ops[i] which is the register for the frame
++ addressing, Then, makes the frame addressing using the register and
++ the constant of ops[n_ops - 1]. */
++ for (i = 0; i < n_ops; i++)
++#ifdef FRAME_GROWS_DOWNWARD
++ if (ops[i].op == virtual_stack_vars_rtx)
++#else
++ if (ops[i].op == virtual_stack_vars_rtx
++ || ops[i].op == frame_pointer_rtx)
++#endif
++ {
++ if (GET_CODE (ops[n_ops - 1].op) == CONST_INT)
++ {
++ HOST_WIDE_INT value = INTVAL (ops[n_ops - 1].op);
++ if (value >= fp_offset)
++ {
++ ops[i].op = plus_constant (ops[i].op, value);
++ n_ops--;
++ }
++ else
++ {
++ if (!force
++ && (n_ops + 1 + n_consts > input_ops
++ || (n_ops + 1 + n_consts == input_ops
++ && n_consts <= input_consts)))
++ return NULL_RTX;
++ ops[n_ops - 1].op = GEN_INT (value-fp_offset);
++ ops[i].op = plus_constant (ops[i].op, fp_offset);
++ }
++ }
++ /* keep the following address pattern;
++ (1) buf[BUFSIZE] is the first assigned variable.
++ (+ (+ fp -BUFSIZE) BUFSIZE)
++ (2) ((+ (+ fp 1) r) -1). */
++ else if (fp_offset != 0)
++ return NULL_RTX;
++ /* keep the (+ fp 0) pattern for the following case;
++ (1) buf[i]: i: REG, buf: (+ fp 0) in !FRAME_GROWS_DOWNWARD
++ (2) argument: the address is (+ fp 0). */
++ else if (fp_offset == 0)
++ return NULL_RTX;
++
++ break;
++ }
++ }
++
+ /* Put a non-negated operand first, if possible. */
+
+ for (i = 0; i < n_ops && ops[i].neg; i++)
+diff -uNr gcc-3.4.3.orig/gcc/testsuite/gcc.dg/ssp-warn.c gcc-3.4.3/gcc/testsuite/gcc.dg/ssp-warn.c
+--- gcc-3.4.3.orig/gcc/testsuite/gcc.dg/ssp-warn.c 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.3/gcc/testsuite/gcc.dg/ssp-warn.c 2003-11-21 09:41:19.000000000 +0100
+@@ -0,0 +1,32 @@
++/* { dg-do compile } */
++/* { dg-options "-fstack-protector" } */
++void
++test1()
++{
++ void intest1(int *a)
++ {
++ *a ++;
++ }
++
++ char buf[80];
++
++ buf[0] = 0;
++} /* { dg-bogus "not protecting function: it contains functions" } */
++
++void
++test2(int n)
++{
++ char buf[80];
++ char vbuf[n];
++
++ buf[0] = 0;
++ vbuf[0] = 0;
++} /* { dg-bogus "not protecting variables: it has a variable length buffer" } */
++
++void
++test3()
++{
++ char buf[5];
++
++ buf[0] = 0;
++} /* { dg-bogus "not protecting function: buffer is less than 8 bytes long" } */
+diff -uNr gcc-3.4.3.orig/gcc/testsuite/gcc.misc-tests/ssp-execute1.c gcc-3.4.3/gcc/testsuite/gcc.misc-tests/ssp-execute1.c
+--- gcc-3.4.3.orig/gcc/testsuite/gcc.misc-tests/ssp-execute1.c 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.3/gcc/testsuite/gcc.misc-tests/ssp-execute1.c 2004-02-16 06:15:39.000000000 +0100
+@@ -0,0 +1,54 @@
++/* Test location changes of character array. */
++
++void
++test(int i)
++{
++ int ibuf1[10];
++ char buf[50];
++ int ibuf2[10];
++ char buf2[50000];
++ int ibuf3[10];
++ char *p;
++
++ /* c1: the frame offset of buf[0]
++ c2: the frame offset of buf2[0]
++ */
++ p= &buf[0]; *p=1; /* expected rtl: (+ fp -c1) */
++ if (*p != buf[0])
++ abort();
++ p= &buf[5]; *p=2; /* expected rtl: (+ fp -c1+5) */
++ if (*p != buf[5])
++ abort();
++ p= &buf[-1]; *p=3; /* expected rtl: (+ (+ fp -c1) -1) */
++ if (*p != buf[-1])
++ abort();
++ p= &buf[49]; *p=4; /* expected rtl: (+ fp -c1+49) */
++ if (*p != buf[49])
++ abort();
++ p = &buf[i+5]; *p=5; /* expected rtl: (+ (+ fp -c1) (+ i 5)) */
++ if (*p != buf[i+5])
++ abort ();
++ p = buf - 1; *p=6; /* expected rtl: (+ (+ fp -c1) -1) */
++ if (*p != buf[-1])
++ abort ();
++ p = 1 + buf; *p=7; /* expected rtl: (+ (+ fp -c1) 1) */
++ if (*p != buf[1])
++ abort ();
++ p = &buf[1] - 1; *p=8; /* expected rtl: (+ (+ fp -c1+1) -1) */
++ if (*p != buf[0])
++ abort ();
++
++ /* test big offset which is greater than the max value of signed 16 bit integer. */
++ p = &buf2[45555]; *p=9; /* expected rtl: (+ fp -c2+45555) */
++ if (*p != buf2[45555])
++ abort ();
++}
++
++int main()
++{
++ test(10);
++ exit(0);
++}
++
++
++
+diff -uNr gcc-3.4.3.orig/gcc/testsuite/gcc.misc-tests/ssp-execute2.c gcc-3.4.3/gcc/testsuite/gcc.misc-tests/ssp-execute2.c
+--- gcc-3.4.3.orig/gcc/testsuite/gcc.misc-tests/ssp-execute2.c 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.3/gcc/testsuite/gcc.misc-tests/ssp-execute2.c 2003-11-22 09:44:33.000000000 +0100
+@@ -0,0 +1,49 @@
++void
++test(int i, char *j, int k)
++{
++ int a[10];
++ char b;
++ int c;
++ long *d;
++ char buf[50];
++ long e[10];
++ int n;
++
++ a[0] = 4;
++ b = 5;
++ c = 6;
++ d = (long*)7;
++ e[0] = 8;
++
++ /* overflow buffer */
++ for (n = 0; n < 120; n++)
++ buf[n] = 0;
++
++ if (j == 0 || *j != 2)
++ abort ();
++ if (a[0] == 0)
++ abort ();
++ if (b == 0)
++ abort ();
++ if (c == 0)
++ abort ();
++ if (d == 0)
++ abort ();
++ if (e[0] == 0)
++ abort ();
++
++ exit (0);
++}
++
++int main()
++{
++ int i, k;
++ int j[40];
++ i = 1;
++ j[39] = 2;
++ k = 3;
++ test(i, &j[39], k);
++}
++
++
++
+diff -uNr gcc-3.4.3.orig/gcc/testsuite/gcc.misc-tests/ssp-execute.exp gcc-3.4.3/gcc/testsuite/gcc.misc-tests/ssp-execute.exp
+--- gcc-3.4.3.orig/gcc/testsuite/gcc.misc-tests/ssp-execute.exp 1970-01-01 01:00:00.000000000 +0100
++++ gcc-3.4.3/gcc/testsuite/gcc.misc-tests/ssp-execute.exp 2004-06-02 13:23:36.000000000 +0200
+@@ -0,0 +1,35 @@
++# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
++
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++
++if $tracelevel then {
++ strace $tracelevel
++}
++
++# Load support procs.
++load_lib c-torture.exp
++
++#
++# main test loop
++#
++
++foreach src [lsort [glob -nocomplain $srcdir/$subdir/ssp-execute*.c]] {
++ # If we're only testing specific files and this isn't one of them, skip it.
++ if ![runtest_file_p $runtests $src] then {
++ continue
++ }
++
++ c-torture-execute $src -fstack-protector
++}
+diff -uNr gcc-3.4.3.orig/gcc/toplev.c gcc-3.4.3/gcc/toplev.c
+--- gcc-3.4.3.orig/gcc/toplev.c 2004-07-26 16:42:11.000000000 +0200
++++ gcc-3.4.3/gcc/toplev.c 2004-11-24 18:35:31.000000000 +0100
+@@ -79,6 +79,7 @@
+ #include "coverage.h"
+ #include "value-prof.h"
+ #include "alloc-pool.h"
++#include "protector.h"
+
+ #if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
+ #include "dwarf2out.h"
+@@ -97,6 +98,10 @@
+ declarations for e.g. AIX 4.x. */
+ #endif
+
++#ifdef STACK_PROTECTOR
++#include "protector.h"
++#endif
++
+ #ifndef HAVE_conditional_execution
+ #define HAVE_conditional_execution 0
+ #endif
+@@ -979,6 +984,15 @@
+ minimum function alignment. Zero means no alignment is forced. */
+ int force_align_functions_log;
+
++#if defined(STACK_PROTECTOR) && defined(STACK_GROWS_DOWNWARD)
++/* Nonzero means use propolice as a stack protection method */
++int flag_propolice_protection = 1;
++int flag_stack_protection = 0;
++#else
++int flag_propolice_protection = 0;
++int flag_stack_protection = 0;
++#endif
++
+ typedef struct
+ {
+ const char *const string;
+@@ -1154,7 +1168,9 @@
+ {"mem-report", &mem_report, 1 },
+ { "trapv", &flag_trapv, 1 },
+ { "wrapv", &flag_wrapv, 1 },
+- { "new-ra", &flag_new_regalloc, 1 }
++ { "new-ra", &flag_new_regalloc, 1 },
++ {"stack-protector", &flag_propolice_protection, 1 },
++ {"stack-protector-all", &flag_stack_protection, 1 }
+ };
+
+ /* Here is a table, controlled by the tm.h file, listing each -m switch
+@@ -2686,6 +2702,9 @@
+
+ insns = get_insns ();
+
++ if (flag_propolice_protection)
++ prepare_stack_protection (inlinable);
++
+ /* Dump the rtl code if we are dumping rtl. */
+
+ if (open_dump_file (DFI_rtl, decl))
+@@ -4483,6 +4502,12 @@
+ /* The presence of IEEE signaling NaNs, implies all math can trap. */
+ if (flag_signaling_nans)
+ flag_trapping_math = 1;
++
++ /* This combination makes optimized frame addressings and causes
++ a internal compilation error at prepare_stack_protection.
++ so don't allow it. */
++ if (flag_stack_protection && !flag_propolice_protection)
++ flag_propolice_protection = TRUE;
+ }
+
+ /* Initialize the compiler back end. */
+diff -uNr gcc-3.4.3.orig/gcc/tree.h gcc-3.4.3/gcc/tree.h
+--- gcc-3.4.3.orig/gcc/tree.h 2004-11-24 18:04:19.000000000 +0100
++++ gcc-3.4.3/gcc/tree.h 2004-11-24 18:35:31.000000000 +0100
+@@ -1489,6 +1489,10 @@
+ where it is called. */
+ #define DECL_INLINE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.inline_flag)
+
++/* In a VAR_DECL, nonzero if the declaration is copied for inlining.
++ The stack protector should keep its location in the stack. */
++#define DECL_COPIED(NODE) (VAR_DECL_CHECK (NODE)->decl.inline_flag)
++
+ /* Nonzero in a FUNCTION_DECL means that this function was declared inline,
+ such as via the `inline' keyword in C/C++. This flag controls the linkage
+ semantics of 'inline'; whether or not the function is inlined is
--- /dev/null
+diff -aur gcc-3.4.0orig/gcc/c-common.c gcc-3.4.0/gcc/c-common.c
+--- gcc-3.4.0orig/gcc/c-common.c 2004-03-19 01:32:59.000000000 +0000
++++ gcc-3.4.0/gcc/c-common.c 2004-05-10 21:05:33.000000000 +0100
+@@ -833,7 +833,7 @@
+ handle_deprecated_attribute },
+ { "vector_size", 1, 1, false, true, false,
+ handle_vector_size_attribute },
+- { "visibility", 1, 1, true, false, false,
++ { "visibility", 1, 1, false, false, false,
+ handle_visibility_attribute },
+ { "tls_model", 1, 1, true, false, false,
+ handle_tls_model_attribute },
+@@ -4886,7 +4886,16 @@
+
+ *no_add_attrs = true;
+
+- if (decl_function_context (decl) != 0 || ! TREE_PUBLIC (decl))
++ if (TYPE_P (*node))
++ {
++ if (TREE_CODE (*node) != RECORD_TYPE && TREE_CODE (*node) != UNION_TYPE)
++ {
++ warning ("`%s' attribute ignored on non-class types",
++ IDENTIFIER_POINTER (name));
++ return NULL_TREE;
++ }
++ }
++ else if (decl_function_context (decl) != 0 || ! TREE_PUBLIC (decl))
+ {
+ warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ return NULL_TREE;
+@@ -4897,6 +4906,14 @@
+ error ("visibility arg not a string");
+ return NULL_TREE;
+ }
++
++ /* If this is a type, set the visibility on the type decl. */
++ if (TYPE_P (decl))
++ {
++ decl = TYPE_NAME (decl);
++ if (! decl)
++ return NULL_TREE;
++ }
+
+ if (strcmp (TREE_STRING_POINTER (id), "default") == 0)
+ DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT;
+@@ -4908,6 +4925,14 @@
+ DECL_VISIBILITY (decl) = VISIBILITY_PROTECTED;
+ else
+ error ("visibility arg must be one of \"default\", \"hidden\", \"protected\" or \"internal\"");
++ DECL_VISIBILITYSPECIFIED (decl) = 1;
++
++ /* For decls only, go ahead and attach the attribute to the node as well.
++ This is needed so we can determine whether we have VISIBILITY_DEFAULT
++ because the visibility was not specified, or because it was explicitly
++ overridden from the class visibility. */
++ if (DECL_P (*node))
++ *no_add_attrs = false;
+
+ return NULL_TREE;
+ }
+
+diff -aur gcc-3.4.0orig/gcc/c-decl.c gcc-3.4.0/gcc/c-decl.c
+--- gcc-3.4.0orig/gcc/c-decl.c 2004-03-22 17:58:18.000000000 +0000
++++ gcc-3.4.0/gcc/c-decl.c 2004-05-10 15:16:27.000000000 +0100
+@@ -1164,9 +1164,8 @@
+ }
+
+ /* warnings */
+- /* All decls must agree on a non-default visibility. */
+- if (DECL_VISIBILITY (newdecl) != VISIBILITY_DEFAULT
+- && DECL_VISIBILITY (olddecl) != VISIBILITY_DEFAULT
++ /* All decls must agree on a visibility. */
++ if (DECL_VISIBILITYSPECIFIED (newdecl) && DECL_VISIBILITYSPECIFIED (olddecl)
+ && DECL_VISIBILITY (newdecl) != DECL_VISIBILITY (olddecl))
+ {
+ warning ("%Jredeclaration of '%D' with different visibility "
+@@ -1361,9 +1360,12 @@
+ Currently, it can only be defined in the prototype. */
+ COPY_DECL_ASSEMBLER_NAME (olddecl, newdecl);
+
+- /* If either declaration has a nondefault visibility, use it. */
+- if (DECL_VISIBILITY (olddecl) != VISIBILITY_DEFAULT)
+- DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl);
++ /* Use visibility of whichever declaration had it specified */
++ if (DECL_VISIBILITYSPECIFIED (olddecl))
++ {
++ DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl);
++ DECL_VISIBILITYSPECIFIED (newdecl) = 1;
++ }
+
+ if (TREE_CODE (newdecl) == FUNCTION_DECL)
+ {
+
+diff -aur gcc-3.4.0orig/gcc/common.opt gcc-3.4.0/gcc/common.opt
+--- gcc-3.4.0orig/gcc/common.opt 2004-02-18 00:09:04.000000000 +0000
++++ gcc-3.4.0/gcc/common.opt 2004-05-09 08:10:50.000000000 +0100
+@@ -718,6 +718,11 @@
+ Common
+ Add extra commentary to assembler output
+
++fvisibility=
++Common Joined RejectNegative
++-fvisibility=[default|internal|hidden|protected] Set the default symbol visibility
++
++
+ fvpt
+ Common
+ Use expression value profiles in optimizations
+
+diff -aur gcc-3.4.0orig/gcc/c.opt gcc-3.4.0/gcc/c.opt
+--- gcc-3.4.0orig/gcc/c.opt 2004-02-18 00:09:03.000000000 +0000
++++ gcc-3.4.0/gcc/c.opt 2004-05-09 08:10:50.000000000 +0100
+@@ -656,6 +656,10 @@
+ C++ ObjC++
+ Use __cxa_atexit to register destructors
+
++fvisibility-inlines-hidden
++C++
++Marks all inlined methods as having hidden visibility
++
+ fvtable-gc
+ C++ ObjC++
+ Discard unused virtual functions
+diff -aur gcc-3.4.0orig/gcc/c-opts.c gcc-3.4.0/gcc/c-opts.c
+--- gcc-3.4.0orig/gcc/c-opts.c 2004-02-18 00:09:03.000000000 +0000
++++ gcc-3.4.0/gcc/c-opts.c 2004-05-09 08:10:50.000000000 +0100
+@@ -912,6 +912,10 @@
+ case OPT_fuse_cxa_atexit:
+ flag_use_cxa_atexit = value;
+ break;
++
++ case OPT_fvisibility_inlines_hidden:
++ visibility_options.inlineshidden = value;
++ break;
+
+ case OPT_fweak:
+ flag_weak = value;
+
+diff -aur gcc-3.4.0orig/gcc/cp/class.c gcc-3.4.0/gcc/cp/class.c
+--- gcc-3.4.0orig/gcc/cp/class.c 2004-03-09 07:27:23.000000000 +0000
++++ gcc-3.4.0/gcc/cp/class.c 2004-05-10 21:06:50.000000000 +0100
+@@ -524,6 +524,10 @@
+ DECL_ALIGN (decl) = MAX (TYPE_ALIGN (double_type_node),
+ DECL_ALIGN (decl));
+
++ /* The vtable's visibility is the class visibility. There is no way
++ to override the visibility for just the vtable. */
++ DECL_VISIBILITY (decl) = CLASSTYPE_VISIBILITY (class_type);
++ DECL_VISIBILITYSPECIFIED (decl) = CLASSTYPE_VISIBILITYSPECIFIED (class_type);
+ import_export_vtable (decl, class_type, 0);
+
+ return decl;
+@@ -2971,7 +2975,25 @@
+ continue;
+
+ if (TREE_CODE (x) == CONST_DECL || TREE_CODE (x) == VAR_DECL)
+- continue;
++ {
++ /* Apply the class's visibility attribute to static members
++ which do not have a visibility attribute. */
++ if (! lookup_attribute ("visibility", DECL_ATTRIBUTES (x)))
++ {
++ if (visibility_options.inlineshidden && DECL_INLINE (x))
++ {
++ DECL_VISIBILITY (x) = VISIBILITY_HIDDEN;
++ DECL_VISIBILITYSPECIFIED (x) = 1;
++ }
++ else
++ {
++ DECL_VISIBILITY (x) = CLASSTYPE_VISIBILITY (current_class_type);
++ DECL_VISIBILITYSPECIFIED (x) = CLASSTYPE_VISIBILITYSPECIFIED (current_class_type);
++ }
++ }
++
++ continue;
++ }
+
+ /* Now it can only be a FIELD_DECL. */
+
+@@ -3708,6 +3730,22 @@
+ check_for_override (x, t);
+ if (DECL_PURE_VIRTUAL_P (x) && ! DECL_VINDEX (x))
+ cp_error_at ("initializer specified for non-virtual method `%D'", x);
++
++ /* Apply the class's visibility attribute to methods which do
++ not have a visibility attribute. */
++ if (! lookup_attribute ("visibility", DECL_ATTRIBUTES (x)))
++ {
++ if (visibility_options.inlineshidden && DECL_INLINE (x))
++ {
++ DECL_VISIBILITY (x) = VISIBILITY_HIDDEN;
++ DECL_VISIBILITYSPECIFIED (x) = 1;
++ }
++ else
++ {
++ DECL_VISIBILITY (x) = CLASSTYPE_VISIBILITY (current_class_type);
++ DECL_VISIBILITYSPECIFIED (x) = CLASSTYPE_VISIBILITYSPECIFIED (current_class_type);
++ }
++ }
+
+ /* The name of the field is the original field name
+ Save this in auxiliary field for later overloading. */
+@@ -7830,3 +7868,4 @@
+ *vid->last_init = build_tree_list (NULL_TREE, init);
+ vid->last_init = &TREE_CHAIN (*vid->last_init);
+ }
++
+
+diff -aur gcc-3.4.0orig/gcc/cp/cp-tree.h gcc-3.4.0/gcc/cp/cp-tree.h
+--- gcc-3.4.0orig/gcc/cp/cp-tree.h 2004-03-20 00:13:08.000000000 +0000
++++ gcc-3.4.0/gcc/cp/cp-tree.h 2004-05-10 20:56:56.000000000 +0100
+@@ -1008,7 +1008,12 @@
+ #define PUBLICLY_UNIQUELY_DERIVED_P(PARENT, TYPE) \
+ (lookup_base ((TYPE), (PARENT), ba_not_special | ba_quiet, NULL) \
+ != NULL_TREE)
+-\f
++
++/* Gives the visibility specification for a class type. */
++#define CLASSTYPE_VISIBILITY(TYPE) DECL_VISIBILITY (TYPE_NAME (TYPE))
++#define CLASSTYPE_VISIBILITYSPECIFIED(TYPE) DECL_VISIBILITYSPECIFIED (TYPE_NAME (TYPE))
++
++
+ /* This is a few header flags for 'struct lang_type'. Actually,
+ all but the first are used only for lang_type_class; they
+ are put in this structure to save space. */
+
+diff -aur gcc-3.4.0orig/gcc/cp/decl.c gcc-3.4.0/gcc/cp/decl.c
+--- gcc-3.4.0orig/gcc/cp/decl.c 2004-04-01 21:47:21.000000000 +0100
++++ gcc-3.4.0/gcc/cp/decl.c 2004-05-28 21:16:11.000000000 +0100
+@@ -1869,17 +1869,34 @@
+ DECL_COMMON (newdecl) = DECL_COMMON (olddecl);
+ COPY_DECL_ASSEMBLER_NAME (olddecl, newdecl);
+
+- /* If either declaration has a nondefault visibility, use it. */
+- if (DECL_VISIBILITY (olddecl) != VISIBILITY_DEFAULT)
++ /* Warn about conflicting visibility specifications. */
++ if (DECL_VISIBILITYSPECIFIED (olddecl) && DECL_VISIBILITYSPECIFIED (newdecl)
++ && DECL_VISIBILITY (newdecl) != DECL_VISIBILITY (olddecl))
++ {
++ warning ("%J'%D': visibility attribute ignored because it",
++ newdecl, newdecl);
++ warning ("%Jconflicts with previous declaration here", olddecl);
++ }
++ /* Choose the declaration which specified visibility. */
++ if (DECL_VISIBILITYSPECIFIED (olddecl))
+ {
+- if (DECL_VISIBILITY (newdecl) != VISIBILITY_DEFAULT
+- && DECL_VISIBILITY (newdecl) != DECL_VISIBILITY (olddecl))
+- {
+- warning ("%J'%D': visibility attribute ignored because it",
+- newdecl, newdecl);
+- warning ("%Jconflicts with previous declaration here", olddecl);
+- }
+ DECL_VISIBILITY (newdecl) = DECL_VISIBILITY (olddecl);
++ DECL_VISIBILITYSPECIFIED (newdecl) = 1;
++ }
++ /* If it's a definition of a global operator new or operator
++ delete, it must be default visibility. */
++ if (NEW_DELETE_OPNAME_P (DECL_NAME (newdecl)) && DECL_INITIAL (newdecl) != NULL_TREE)
++ {
++ if (!DECL_FUNCTION_MEMBER_P (newdecl) && VISIBILITY_DEFAULT != DECL_VISIBILITY (newdecl))
++ {
++ warning ("%J`%D': ignoring non-default symbol",
++ newdecl, newdecl);
++ warning ("%Jvisibility on global operator new or delete", newdecl);
++ DECL_VISIBILITY (olddecl) = VISIBILITY_DEFAULT;
++ DECL_VISIBILITYSPECIFIED (olddecl) = 1;
++ DECL_VISIBILITY (newdecl) = VISIBILITY_DEFAULT;
++ DECL_VISIBILITYSPECIFIED (newdecl) = 1;
++ }
+ }
+
+ if (TREE_CODE (newdecl) == FUNCTION_DECL)
+
+diff -aur gcc-3.4.0orig/gcc/cp/method.c gcc-3.4.0/gcc/cp/method.c
+--- gcc-3.4.0orig/gcc/cp/method.c 2004-04-08 23:15:58.000000000 +0100
++++ gcc-3.4.0/gcc/cp/method.c 2004-05-09 08:10:52.000000000 +0100
+@@ -394,6 +394,7 @@
+ rewrite. */
+ TREE_PUBLIC (thunk_fndecl) = TREE_PUBLIC (function);
+ DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function);
++ DECL_VISIBILITYSPECIFIED (thunk_fndecl) = DECL_VISIBILITYSPECIFIED (function);
+
+ if (flag_syntax_only)
+ {
+
+diff -aur gcc-3.4.0orig/gcc/cp/optimize.c gcc-3.4.0/gcc/cp/optimize.c
+--- gcc-3.4.0orig/gcc/cp/optimize.c 2004-02-08 01:52:50.000000000 +0000
++++ gcc-3.4.0/gcc/cp/optimize.c 2004-05-09 08:10:52.000000000 +0100
+@@ -155,6 +155,7 @@
+ DECL_NOT_REALLY_EXTERN (clone) = DECL_NOT_REALLY_EXTERN (fn);
+ TREE_PUBLIC (clone) = TREE_PUBLIC (fn);
+ DECL_VISIBILITY (clone) = DECL_VISIBILITY (fn);
++ DECL_VISIBILITYSPECIFIED (clone) = DECL_VISIBILITYSPECIFIED (fn);
+
+ /* Adjust the parameter names and locations. */
+ parm = DECL_ARGUMENTS (fn);
+
+diff -aur gcc-3.4.0orig/gcc/cp/rtti.c gcc-3.4.0/gcc/cp/rtti.c
+--- gcc-3.4.0orig/gcc/cp/rtti.c 2004-03-08 23:00:26.000000000 +0000
++++ gcc-3.4.0/gcc/cp/rtti.c 2004-05-10 21:09:21.000000000 +0100
+@@ -361,7 +361,11 @@
+ pushdecl_top_level_and_finish (d, NULL_TREE);
+
+ if (CLASS_TYPE_P (type))
+- CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d;
++ {
++ CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d;
++ DECL_VISIBILITY (d) = CLASSTYPE_VISIBILITY (type);
++ DECL_VISIBILITYSPECIFIED (d) = CLASSTYPE_VISIBILITYSPECIFIED (type);
++ }
+
+ /* Remember the type it is for. */
+ TREE_TYPE (name) = type;
+@@ -759,6 +763,11 @@
+ TREE_STATIC (name_decl) = 1;
+ DECL_EXTERNAL (name_decl) = 0;
+ TREE_PUBLIC (name_decl) = 1;
++ if (CLASS_TYPE_P (target))
++ {
++ DECL_VISIBILITY (name_decl) = CLASSTYPE_VISIBILITY (target);
++ DECL_VISIBILITYSPECIFIED (name_decl) = CLASSTYPE_VISIBILITYSPECIFIED (target);
++ }
+ import_export_tinfo (name_decl, target, typeinfo_in_lib_p (target));
+ /* External name of the string containing the type's name has a
+ special name. */
+
+diff -aur gcc-3.4.0orig/gcc/c-pragma.c gcc-3.4.0/gcc/c-pragma.c
+--- gcc-3.4.0orig/gcc/c-pragma.c 2004-01-23 23:35:53.000000000 +0000
++++ gcc-3.4.0/gcc/c-pragma.c 2004-05-09 08:10:52.000000000 +0100
+@@ -480,6 +480,86 @@
+ return asmname;
+ }
+
++
++#ifdef HANDLE_PRAGMA_VISIBILITY
++static void handle_pragma_visibility (cpp_reader *);
++
++/* Sets the default visibility for symbols to something other than that
++ specified on the command line. */
++static void
++handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED)
++{ /* Form is #pragma GCC visibility push(hidden)|pop */
++ static int visstack [16], visidx;
++ tree x;
++ enum cpp_ttype token;
++ enum { bad, push, pop } action = bad;
++
++ token = c_lex (&x);
++ if (token == CPP_NAME)
++ {
++ const char *op = IDENTIFIER_POINTER (x);
++ if (!strcmp (op, "push"))
++ action = push;
++ else if (!strcmp (op, "pop"))
++ action = pop;
++ }
++ if (bad == action)
++ GCC_BAD ("#pragma GCC visibility must be followed by push or pop");
++ else
++ {
++ if (pop == action)
++ {
++ if (!visidx)
++ {
++ GCC_BAD ("No matching push for '#pragma GCC visibility pop'");
++ }
++ else
++ {
++ default_visibility = visstack[--visidx];
++ visibility_options.inpragma = (visidx>0);
++ }
++ }
++ else
++ {
++ if (c_lex (&x) != CPP_OPEN_PAREN)
++ GCC_BAD ("missing '(' after '#pragma GCC visibility push' - ignored");
++ token = c_lex (&x);
++ if (token != CPP_NAME)
++ {
++ GCC_BAD ("malformed #pragma GCC visibility push");
++ }
++ else if (visidx >= 16)
++ {
++ GCC_BAD ("No more than sixteen #pragma GCC visibility pushes allowed at once");
++ }
++ else
++ {
++ const char *str = IDENTIFIER_POINTER (x);
++ visstack[visidx++] = default_visibility;
++ if (!strcmp (str, "default"))
++ default_visibility = VISIBILITY_DEFAULT;
++ else if (!strcmp (str, "internal"))
++ default_visibility = VISIBILITY_INTERNAL;
++ else if (!strcmp (str, "hidden"))
++ default_visibility = VISIBILITY_HIDDEN;
++ else if (!strcmp (str, "protected"))
++ default_visibility = VISIBILITY_PROTECTED;
++ else
++ {
++ GCC_BAD ("#pragma GCC visibility push() must specify default, internal, hidden or protected");
++ }
++ visibility_options.inpragma = 1;
++ }
++ if (c_lex (&x) != CPP_CLOSE_PAREN)
++ GCC_BAD ("missing '(' after '#pragma GCC visibility push' - ignored");
++ }
++ }
++ if (c_lex (&x) != CPP_EOF)
++ warning ("junk at end of '#pragma GCC visibility'");
++}
++
++#endif
++
+ /* Front-end wrapper for pragma registration to avoid dragging
+ cpplib.h in almost everywhere. */
+ void
+@@ -505,6 +585,9 @@
+ #ifdef HANDLE_PRAGMA_EXTERN_PREFIX
+ c_register_pragma (0, "extern_prefix", handle_pragma_extern_prefix);
+ #endif
++#ifdef HANDLE_PRAGMA_VISIBILITY
++ c_register_pragma ("GCC", "visibility", handle_pragma_visibility);
++#endif
+
+ #ifdef REGISTER_TARGET_PRAGMAS
+ REGISTER_TARGET_PRAGMAS ();
+diff -aur gcc-3.4.0orig/gcc/c-pragma.h gcc-3.4.0/gcc/c-pragma.h
+--- gcc-3.4.0orig/gcc/c-pragma.h 2004-01-31 06:18:05.000000000 +0000
++++ gcc-3.4.0/gcc/c-pragma.h 2004-05-09 08:10:53.000000000 +0100
+@@ -44,6 +44,11 @@
+ #define HANDLE_PRAGMA_PACK 1
+ #endif /* HANDLE_PRAGMA_PACK_PUSH_POP */
+
++/* It's safe to always leave visibility pragma enabled as if
++ visibility is not supported on the host OS platform the
++ statements are ignored. */
++#define HANDLE_PRAGMA_VISIBILITY 1
++
+ extern void init_pragma (void);
+
+ /* Front-end wrapper for pragma registration to avoid dragging
+
+
+diff -aur gcc-3.4.0orig/gcc/doc/invoke.texi gcc-3.4.0/gcc/doc/invoke.texi
+--- gcc-3.4.0orig/gcc/doc/invoke.texi 2004-04-19 00:05:36.000000000 +0100
++++ gcc-3.4.0/gcc/doc/invoke.texi 2004-05-28 21:29:36.000000000 +0100
+@@ -183,7 +183,8 @@
+ -fno-optional-diags -fpermissive @gol
+ -frepo -fno-rtti -fstats -ftemplate-depth-@var{n} @gol
+ -fuse-cxa-atexit -fno-weak -nostdinc++ @gol
+--fno-default-inline -Wabi -Wctor-dtor-privacy @gol
++-fno-default-inline -fvisibility-inlines-hidden @gol
++-Wabi -Wctor-dtor-privacy @gol
+ -Wnon-virtual-dtor -Wreorder @gol
+ -Weffc++ -Wno-deprecated @gol
+ -Wno-non-template-friend -Wold-style-cast @gol
+@@ -674,7 +675,8 @@
+ -fargument-alias -fargument-noalias @gol
+ -fargument-noalias-global -fleading-underscore @gol
+ -ftls-model=@var{model} @gol
+--ftrapv -fwrapv -fbounds-check}
++-ftrapv -fwrapv -fbounds-check @gol
++-fvisibility}
+ @end table
+
+ @menu
+@@ -1433,6 +1435,20 @@
+ destructors, but will only work if your C library supports
+ @code{__cxa_atexit}.
+
++@item -fvisibility-inlines-hidden
++@opindex fvisibility-inlines-hidden
++Causes all inlined methods to be marked with
++@code{__attribute__ ((visibility ("hidden")))} so that they do not
++appear in the export table of a DSO and do not require a PLT indirection
++when used within the DSO. Enabling this option can have a dramatic effect
++on load and link times of a DSO as it massively reduces the size of the
++dynamic export table when the library makes heavy use of templates. While
++it can cause bloating through duplication of code within each DSO where
++it is used, often the wastage is less than the considerable space occupied
++by a long symbol name in the export table which is typical when using
++templates and namespaces. For even more savings, combine with the
++@code{-fvisibility=hidden} switch.
++
+ @item -fno-weak
+ @opindex fno-weak
+ Do not use weak symbol support, even if it is provided by the linker.
+@@ -11198,6 +11214,54 @@
+
+ The default without @option{-fpic} is @code{initial-exec}; with
+ @option{-fpic} the default is @code{global-dynamic}.
++
++@item -fvisibility=@var{default|internal|hidden|protected}
++@opindex fvisibility
++Set the default ELF image symbol visibility to the specified option - all
++symbols will be marked with this unless overrided within the code.
++Using this feature can very substantially improve linking and
++load times of shared object libraries, produce more optimised
++code, provide near-perfect API export and prevent symbol clashes.
++It is @strong{strongly} recommended that you use this in any shared objects
++you distribute.
++
++Despite the nomenclature, @code{default} always means public ie;
++available to be linked against from outside the shared object.
++@code{protected} and @code{internal} are pretty useless in real-world
++usage so the only other commonly used option will be @code{hidden}.
++The default if -fvisibility isn't specified is @code{default} ie; make every
++symbol public - this causes the same behaviour as previous versions of
++GCC.
++
++A good explanation of the benefits offered by ensuring ELF
++symbols have the correct visibility is given by ``How To Write
++Shared Libraries'' by Ulrich Drepper (which can be found at
++@w{@uref{http://people.redhat.com/~drepper/}}) - however a superior
++solution made possible by this option to marking things hidden when
++the default is public is to make the default hidden and mark things
++public. This is the norm with DLL's on Windows and with @option{-fvisibility=hidden}
++and @code{__attribute__ ((visibility("default")))} instead of
++@code{__declspec(dllexport)} you get almost identical semantics with
++identical syntax. This is a great boon to those working with
++cross-platform projects.
++
++For those adding visibility support to existing code, you may find
++@samp{#pragma GCC visibility} of use. This works by you enclosing
++the declarations you wish to set visibility for with (for example)
++@samp{#pragma GCC visibility push(hidden)} and
++@samp{#pragma GCC visibility pop}. These can be nested up to sixteen
++times. Bear in mind that symbol visibility should be viewed @strong{as
++part of the API interface contract} and thus all new code should
++always specify visibility when it is not the default ie; declarations
++only for use within the local DSO should @strong{always} be marked explicitly
++as hidden as so to avoid PLT indirection overheads - making this
++abundantly clear also aids readability and self-documentation of the code.
++Note that due to ISO C++ specification requirements, operator new and
++operator delete must always be of default visibility.
++
++An overview of these techniques, their benefits and how to use them
++is at @w{@uref{http://www.nedprod.com/programs/gccvisibility.html}}.
++
+ @end table
+
+ @c man end
+
+diff -aur gcc-3.4.0orig/gcc/flags.h gcc-3.4.0/gcc/flags.h
+--- gcc-3.4.0orig/gcc/flags.h 2004-02-18 00:09:04.000000000 +0000
++++ gcc-3.4.0/gcc/flags.h 2004-05-09 08:10:53.000000000 +0100
+@@ -60,6 +60,30 @@
+ /* Nonzero means emit debugging information only for symbols which are used. */
+ extern int flag_debug_only_used_symbols;
+
++/* Enumerate visibility settings. */
++#ifndef SYMBOL_VISIBILITY_DEFINED
++#define SYMBOL_VISIBILITY_DEFINED
++enum symbol_visibility
++{
++ VISIBILITY_DEFAULT,
++ VISIBILITY_INTERNAL,
++ VISIBILITY_HIDDEN,
++ VISIBILITY_PROTECTED
++};
++#endif
++
++/* The default visibility for all symbols (unless overridden). */
++extern enum symbol_visibility default_visibility;
++
++struct visibility_flags
++{
++ unsigned inpragma : 1; /* True when in #pragma GCC visibility. */
++ unsigned inlineshidden : 1; /* True when -finlineshidden in effect. */
++};
++
++/* Global visibility options. */
++extern struct visibility_flags visibility_options;
++
+ /* Nonzero means do optimizations. -opt. */
+
+ extern int optimize;
+
+diff -aur gcc-3.4.0orig/gcc/opts.c gcc-3.4.0/gcc/opts.c
+--- gcc-3.4.0orig/gcc/opts.c 2004-02-18 00:09:04.000000000 +0000
++++ gcc-3.4.0/gcc/opts.c 2004-05-09 08:10:53.000000000 +0100
+@@ -142,6 +142,12 @@
+ write_symbols is set to DBX_DEBUG, XCOFF_DEBUG, or DWARF_DEBUG. */
+ bool use_gnu_debug_info_extensions;
+
++/* The default visibility for all symbols (unless overridden) */
++enum symbol_visibility default_visibility = VISIBILITY_DEFAULT;
++
++/* Global visibility options. */
++struct visibility_flags visibility_options;
++
+ /* Columns of --help display. */
+ static unsigned int columns = 80;
+
+@@ -1440,6 +1446,21 @@
+ flag_verbose_asm = value;
+ break;
+
++ case OPT_fvisibility_:
++ {
++ if(!strcmp(arg, "default"))
++ default_visibility=VISIBILITY_DEFAULT;
++ else if(!strcmp(arg, "internal"))
++ default_visibility=VISIBILITY_INTERNAL;
++ else if(!strcmp(arg, "hidden"))
++ default_visibility=VISIBILITY_HIDDEN;
++ else if(!strcmp(arg, "protected"))
++ default_visibility=VISIBILITY_PROTECTED;
++ else
++ error("unrecognised visibility value \"%s\"", arg);
++ }
++ break;
++
+ case OPT_fweb:
+ flag_web = value;
+ break;
+
+diff -aur gcc-3.4.0orig/gcc/tree.c gcc-3.4.0/gcc/tree.c
+--- gcc-3.4.0orig/gcc/tree.c 2004-02-05 22:01:35.000000000 +0000
++++ gcc-3.4.0/gcc/tree.c 2004-05-10 15:22:52.000000000 +0100
+@@ -2563,6 +2563,11 @@
+ layout_decl (t, 0);
+ else if (code == FUNCTION_DECL)
+ DECL_MODE (t) = FUNCTION_MODE;
++
++ /* Set default visibility to whatever the user supplied with
++ visibility_specified depending on #pragma GCC visibility. */
++ DECL_VISIBILITY (t) = default_visibility;
++ DECL_VISIBILITYSPECIFIED (t) = visibility_options.inpragma;
+
+ return t;
+ }
+
+diff -aur gcc-3.4.0orig/gcc/tree.h gcc-3.4.0/gcc/tree.h
+--- gcc-3.4.0orig/gcc/tree.h 2004-02-08 01:52:43.000000000 +0000
++++ gcc-3.4.0/gcc/tree.h 2004-05-09 08:10:54.000000000 +0100
+@@ -1499,6 +1499,10 @@
+ /* Value of the decls's visibility attribute */
+ #define DECL_VISIBILITY(NODE) (DECL_CHECK (NODE)->decl.visibility)
+
++/* Nonzero means that the decl had its visibility specified rather than
++ being inferred. */
++#define DECL_VISIBILITYSPECIFIED(NODE) (DECL_CHECK (NODE)->decl.visibility_specified)
++
+ /* In a FUNCTION_DECL, nonzero if the function cannot be inlined. */
+ #define DECL_UNINLINABLE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.uninlinable)
+
+@@ -1633,7 +1637,8 @@
+ || TREE_CODE (DECL_CONTEXT (EXP)) == TRANSLATION_UNIT_DECL)
+
+ /* Enumerate visibility settings. */
+-
++#ifndef SYMBOL_VISIBILITY_DEFINED
++#define SYMBOL_VISIBILITY_DEFINED
+ enum symbol_visibility
+ {
+ VISIBILITY_DEFAULT,
+@@ -1641,6 +1646,7 @@
+ VISIBILITY_HIDDEN,
+ VISIBILITY_PROTECTED
+ };
++#endif
+
+ struct function;
+
+@@ -1684,8 +1690,7 @@
+ unsigned thread_local_flag : 1;
+ unsigned declared_inline_flag : 1;
+ ENUM_BITFIELD(symbol_visibility) visibility : 2;
+- unsigned unused : 1;
+- /* one unused bit. */
++ unsigned visibility_specified : 1;
+
+ unsigned lang_flag_0 : 1;
+ unsigned lang_flag_1 : 1;
+
+diff -aur gcc-3.4.0orig/gcc/varasm.c gcc-3.4.0/gcc/varasm.c
+--- gcc-3.4.0orig/gcc/varasm.c 2004-04-14 22:14:08.000000000 +0100
++++ gcc-3.4.0/gcc/varasm.c 2004-05-09 08:10:54.000000000 +0100
+@@ -5150,8 +5150,8 @@
+ /* Static variables are always local. */
+ else if (! TREE_PUBLIC (exp))
+ local_p = true;
+- /* A variable is local if the user tells us so. */
+- else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
++ /* A variable is local if the user explicitly tells us so. */
++ else if (DECL_VISIBILITYSPECIFIED (exp) && DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
+ local_p = true;
+ /* Otherwise, variables defined outside this object may not be local. */
+ else if (DECL_EXTERNAL (exp))
+@@ -5159,6 +5159,9 @@
+ /* Linkonce and weak data are never local. */
+ else if (DECL_ONE_ONLY (exp) || DECL_WEAK (exp))
+ local_p = false;
++ /* If none of the above and visibility is not default, make local. */
++ else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
++ local_p = true;
+ /* If PIC, then assume that any global name can be overridden by
+ symbols resolved from other modules. */
+ else if (shlib)
+