โŒ About FreshRSS

Reading view

There are new articles available, click to refresh the page.

ada: Crash initializing component of private record type

ada: Crash initializing component of private record type

The compiler may crash processing the full type declaration of a
private record type that initializes a component with a call to
a function instantiated in the private part of the package.

gcc/ada/

	* freeze.adb (Declared_In_Expanded_Body): New subprogram.
	(In_Expanded_Body): Minor code cleanup.
	(Freeze_Expression): Code cleanup plus factorize in a new function
	the code that identifies entities declared in the body of expander
	generated subprograms, since such case must be checked also for
	other node kinds when climbing the tree to locate the place to
	insert the freezing node.
  • [DBH] gcc/ada/freeze.adb

ada: Crash on creation of extra formals on type extension

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

ada: Assertion failure on expansion of record with invariant

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

ada: Crash on creation of extra formals on type extension

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

ada: Crash on function returning empty Ada 2022 aggregate

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
โŒ