2018-01-11 Ed Schonberg * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the legality of an inherited operation that may require overriding, ignore primitive_wrappers that correspond to explicit operations that override an interface primitive. * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the operation to which the class-wide expression applies is a protected op. with a primitive_wrapper, verify that the updated inherited expression does not contain an internal call to a protected function. This completes the implementation of AI12-0166. 2018-01-11 Hristian Kirtchev * ali.adb: Document the remaining letters available for ALI lines. (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line. * ali.ads: Update type With_Record. Field Implicit_With_From_Instantiation is no longer in use. Add field Implicit_With. * csinfo.adb (CSinfo): Remove the setup for attribute Implicit_With_From_Instantiation. * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as either implicitly or explicitly withed. (Is_Implicit_With_Clause): New routine. (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid confusion with the with clause attribute by the same name. (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers. * rtsfind.adb (Maybe_Add_With): Code cleanup. * sem_ch8.adb (Present_System_Aux): Code cleanup. * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated for a parent unit. (Implicit_With_On_Parent): Mark the with clause as generated for a parent unit. * sem_ch12.adb (Inherit_Context): With clauses inherited by an instantiation are no longer marked as Implicit_With_From_Instantiation because they are already marked as implicit. * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge which marks implicit with clauses as related to an instantiation. * sinfo.adb (Implicit_With_From_Instantiation): Removed. (Parent_With): New routine. (Set_Implicit_With_From_Instantiation): Removed. (Set_Parent_With): New routine. * sinfo.ads: Update the documentation of attribute Implicit_With. Remove attribute Implicit_With_From_Instantiation along with occurrences in nodes. Add attribute Parent_With along with occurrences in nodes. (Implicit_With_From_Instantiation): Removed along with pragma Inline. (Parent_With): New routine along with pragma Inline. (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline. (Set_Parent_With): New routine along with pragma Inline. 2018-01-11 Hristian Kirtchev * sem_util.adb (Find_Enclosing_Scope): Return the unique defining entity when the enclosing construct is a body. 2018-01-11 Patrick Bernardi * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified Secondary_Stack_Size handling as a pragma is now generated for the corresponding aspect instead of an attribute. Pragma expression is relocated instead of evaluated. Discriminant of the corresponding record type is referenced rather than the type discriminant. (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update Secondary_Stack_Size rep item checks to only look for the pragma rep. * sem_ch13.adb (Analyze_One_Aspect): Transform Aspect_Secondary_Stack_Size into a pragma instead of an attribute because the attribute does not have visibility on a task type's discriminants when the type's definition is expanded. (Analyze_Attribute_Definition_Clause): Remove handling of Attribute_Secondary_Stack_Size. * snames.adb-tmpl, snames.ads-tmpl: Remove Attribute_Secondary_Stack_Size, no longer used. 2018-01-11 Justin Squirek * sem_ch8.adb: Minor comment fix. 2018-01-11 Hristian Kirtchev * exp_ch4.adb (Process_Action): Do not abandon the inspection of an individual action because the action may denote a complex expression, such as a case statement, which in turn may contain additional transient objects. 2018-01-11 Ed Schonberg * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform analysis on a copy of the expression with a copy of the index variable, because full expansion will rewrite construct into a loop with the original loop variable. * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the expression is an iterated component association. Full analysis takes place when construct is rewritten as a loop. (In_Place_Assign_OK, Safe_Component): An iterated_component_association is not safe for in-place assignment. * sem_util.adb (Remove_Entity): Handle properly the case of an isolated entity with no homonym and no other entity in the scope. 2018-01-11 Justin Squirek * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error message to be printed on the pragma argument identifier. 2018-01-11 Hristian Kirtchev * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last entity of the generated invariant procedure in order to construct a proper entity chain. 2018-01-11 Piotr Trojanek * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in comment. 2018-01-11 Arnaud Charlet * einfo.ads, einfo.adb (Activation_Record_Component, Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity): Allow E_Discriminant. 2018-01-10 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check for atomic access once the component size is taken into account and also do it if the component type is Atomic or Volatile_Full_Access. 2018-01-04 Eric Botcazou * gnatvsn.ads: Bump copyright year. 2018-01-03 Richard Sandiford Alan Hayward David Sherwood * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE as polynomial. 2018-01-03 Richard Sandiford Alan Hayward David Sherwood * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION as polynomial. 2018-01-03 Richard Sandiford Alan Hayward David Sherwood * gcc-interface/utils.c (gnat_types_compatible_p): Handle polynomial TYPE_VECTOR_SUBPARTS. 2018-01-03 Richard Sandiford Alan Hayward David Sherwood * gcc-interface/misc.c (enumerate_modes): Handle polynomial GET_MODE_NUNITS. 2018-01-03 Jakub Jelinek Update copyright years. * gnat_ugn.texi: Bump @copying's copyright year. * gnat_rm.texi: Likewise. Copyright (C) 2018 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.