โŒ About FreshRSS

Normal view

There are new articles available, click to refresh the page.
Before yesterdaygcc/ada history

ada: Crash on creation of extra formals on type extension

5 September 2023 at 06:57
ada: Crash on creation of extra formals on type extension

Revert previous patch and fix the pending issue.

gcc/ada/

	* accessibility.ads (Needs_Result_Accessibility_Extra_Formal):
	Removed.
	* accessibility.adb (Needs_Result_Accessibility_Level_Param):
	Removed.
	(Needs_Result_Accessibility_Extra_Formal): Removed.
	(Needs_Result_Accessibility_Level): Revert previous patch.
	* sem_ch6.adb (Parent_Subprogram): Handle function overriding an
	enumeration literal.
	(Create_Extra_Formals): Ensure that the parent subprogram has all
	its extra formals.
  • [DBH] gcc/ada/accessibility.adb
  • [DBH] gcc/ada/accessibility.ads
  • [DBH] gcc/ada/sem_ch6.adb
  • 5 September 2023 at 06:57

ada: Assertion failure on expansion of record with invariant

30 August 2023 at 19:19
ada: Assertion failure on expansion of record with invariant

gcc/ada/

	* exp_util.adb (Process_Record_Component): Adjust assertion on the
	availablity of the invariant procedure; required because the
	invariant procedure is built by the expander, and hence it is not
	available compiling generic units or when the sources have errors,
	since expansion is then disabled.
  • [DBH] gcc/ada/exp_util.adb
  • 30 August 2023 at 19:19

ada: Crash on creation of extra formals on type extension

19 August 2023 at 16:50
ada: Crash on creation of extra formals on type extension

The compiler blows up processing an overriding dispatching function
of a derived tagged type that returns a private tagged type that
has an access type discriminant.

gcc/ada/

	* accessibility.ads (Needs_Result_Accessibility_Extra_Formal): New
	subprogram.
	* accessibility.adb (Needs_Result_Accessibility_Level_Param): New
	subprogram.
	(Needs_Result_Accessibility_Extra_Formal): New subprogram,
	temporarily keep the previous behavior of the frontend.
	* sem_ch6.adb (Create_Extra_Formals): Replace occurrences of
	function Needs_Result_Accessibility_Level_Param by calls to
	function Needs_Result_Accessibility_Extra_Formal.
	(Extra_Formals_OK): Ditto.
  • [DBH] gcc/ada/accessibility.adb
  • [DBH] gcc/ada/accessibility.ads
  • [DBH] gcc/ada/sem_ch6.adb
  • 19 August 2023 at 16:50

ada: Crash on function returning empty Ada 2022 aggregate

15 August 2023 at 12:57
ada: Crash on function returning empty Ada 2022 aggregate

The compiler crashes processing a function that returns an empty
aggregate when its returned type is a record type which defined
its container aggregate aspects.

gcc/ada/

	* exp_aggr.adb (Expand_Container_Aggregate): Report warning on
	infinite recursion if an empty container aggregate appears in the
	return statement of its Empty function. Fix typo in comment.
	* sem_aggr.adb (Resolve_Aggregate): Resolve Ada 2022 empty
	aggregate that initializes a record type that has defined its
	container aggregate aspects.
	(Resolve_Iterated_Association): Protect access to attribute Etype.
	* sem_ch13.adb (Resolve_Aspect_Aggregate): Fix typo in comment.
  • [DBH] gcc/ada/exp_aggr.adb
  • [DBH] gcc/ada/sem_aggr.adb
  • [DBH] gcc/ada/sem_ch13.adb
  • 15 August 2023 at 12:57

ada: Spurious error on class-wide preconditions

27 July 2023 at 11:02
ada: Spurious error on class-wide preconditions

The compiler reports an spurious error when a class-wide precondition
expression has a class-wide type conversion.

gcc/ada/

	* sem_res.adb (Resolve_Type_Conversion): Do not warn on conversion
	to class-wide type on internally build helpers of class-wide
	preconditions.
  • [DBH] gcc/ada/sem_res.adb
  • 27 July 2023 at 11:02

ada: Fix unsupported dispatching constructor call

9 July 2023 at 17:34
ada: Fix unsupported dispatching constructor call

Add dummy build-in-place parameters when a BIP function does not
require the BIP parameters but it is a dispatching operation that
inherited them.

gcc/ada/

	* einfo-utils.adb (Underlying_Type): Protect recursion call
	against non-available attribute Etype.
	* einfo.ads (Protected_Subprogram): Fix typo in documentation.
	* exp_ch3.adb (BIP_Function_Call_Id): New subprogram.
	(Expand_N_Object_Declaration): Improve code that evaluates if the
	object is initialized with a BIP function call.
	* exp_ch6.adb (Is_True_Build_In_Place_Function_Call): New
	subprogram.
	(Add_Task_Actuals_To_Build_In_Place_Call): Add dummy actuals if
	the function does not require the BIP task actuals but it is a
	dispatching operation that inherited them.
	(Build_In_Place_Formal): Improve code to avoid never-ending loop
	if the BIP formal is not found.
	(Add_Dummy_Build_In_Place_Actuals): New subprogram.
	(Expand_Call_Helper): Add calls to
	Add_Dummy_Build_In_Place_Actuals.
	(Expand_N_Extended_Return_Statement): Adjust assertion.
	(Expand_Simple_Function_Return): Adjust assertion.
	(Make_Build_In_Place_Call_In_Allocator): No action needed if the
	called function inherited the BIP extra formals but it is not a
	true BIP function.
	(Make_Build_In_Place_Call_In_Assignment): Ditto.
	* exp_intr.adb (Expand_Dispatching_Constructor_Call): Remove code
	reporting unsupported case (since this patch adds support for it).
	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Adding assertion
	to ensure matching of BIP formals when setting the
	Protected_Formal field of a protected subprogram to reference the
	corresponding extra formal of the subprogram that implements it.
	(Might_Need_BIP_Task_Actuals): New subprogram.
	(Create_Extra_Formals): Improve code adding inherited extra
	formals.
  • [DBH] gcc/ada/einfo-utils.adb
  • [DBH] gcc/ada/einfo.ads
  • [DBH] gcc/ada/exp_ch3.adb
  • [DBH] gcc/ada/exp_ch6.adb
  • [DBH] gcc/ada/exp_intr.adb
  • [DBH] gcc/ada/sem_ch6.adb
  • 9 July 2023 at 17:34

ada: Constraint_Error caused by 'Image applied to interface type

9 July 2023 at 10:58
ada: Constraint_Error caused by 'Image applied to interface type

When the prefix of 'Image is used with a class-wide interface
type object, the frontend does not generate code to displace
the pointer to the underlying object to reference its base,
and this is required to invoke Ada.Tags.Wide_Wide_Expanded_Name.

gcc/ada/
	* exp_imgv.adb (Rewrite_Object_Image): fix type of formal. Found
	reading sources.
	(Expand_Wide_Image_Attribute): ditto.
	(Expand_Wide_Wide_Image_Attribute): ditto.
	(Rewrite_Object_Image): ditto.
	* exp_put_image.adb (Build_Image_Call): For class-wide interface
	type prefix generate code to displace the pointer to the object to
	reference the base of the underlying object.
  • [DBH] gcc/ada/exp_imgv.adb
  • [DBH] gcc/ada/exp_put_image.adb
  • 9 July 2023 at 10:58

ada: Constraint_Error caused by interface conversion

5 July 2023 at 17:27
ada: Constraint_Error caused by interface conversion

When the sources have a type conversion from an interface type
T2 to some ancestor interface type T1 (that is, T2 extends T1)
the tag check added by the compiler may fail at runtime.

gcc/ada/

	* exp_disp.adb (Has_Dispatching_Constructor_Call): Removed.
	(Expand_Interface_Conversion): Reverse patch.
  • [DBH] gcc/ada/exp_disp.adb
  • 5 July 2023 at 17:27
โŒ
โŒ