โŒ About FreshRSS

Normal view

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

Fix assertion failure on VSS library

6 March 2023 at 10:43
Fix assertion failure on VSS library

gcc/ada/
	PR ada/108858
	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): For functions with
	separate spec, if their return type was visible through a limited-
	with context clause, their extra formals were not added when the
	spec was analyzed.  Now the full view must be available, and the
	extra formals can be created and Returns_By_Ref computed.
  • [DBH] gcc/ada/sem_ch6.adb
  • 6 March 2023 at 10:43

Fix small regression in Ada

14 February 2023 at 12:27
Fix small regression in Ada

gcc/
	* gimplify.cc (gimplify_save_expr): Add missing guard.
gcc/ada/
	* gcc-interface/trans.cc (gnat_gimplify_expr): Add missing guard.
gcc/testsuite/
	* gnat.dg/shift2.adb: New test.
  • [DBH] gcc/ada/gcc-interface/trans.cc
  • 14 February 2023 at 12:27

Fix musl build on Linux

14 February 2023 at 11:51
Fix musl build on Linux

The commit "ada: Add PIE support to backtraces on Linux" uses
_r_debug under Linux unconditionally. It is incorrect since musl
libc does not define _r_debug like glibc.

gcc/ada/
	* adaint.c [Linux]: Include <features.h>.
	(__gnat_get_executable_load_address) [Linux]: Enable only for
	glibc and uClibc.
  • [DBH] gcc/ada/adaint.c
  • 14 February 2023 at 11:51

ada: Fix latent bug exposed by recent work on extended return statements

12 January 2023 at 23:55
ada: Fix latent bug exposed by recent work on extended return statements

When the type of the return object is a constrained array, there may be an
implicit sliding that needs to be preserved during the expansion.

gcc/ada/

	* exp_ch3.adb (Make_Allocator_For_Return): Convert the expression
	to the return object's type in the constrained array case as well.
  • [DBH] gcc/ada/exp_ch3.adb
  • 12 January 2023 at 23:55

ada: Fix pessimization of some CW objects initialized with function call

10 January 2023 at 15:09
ada: Fix pessimization of some CW objects initialized with function call

The recent removal of the unconditional call to Remove_Side_Effects on the
expression of an object declaration or an allocator with a class-wide type
has introduced a pessimization in the former case for function calls that
return a specific tagged type, because the object ultimately created on the
primary stack has changed from being of a specific tagged type to being of
the class-wide type, the latter type always formally requiring finalization.

With the current finalization machinery, this means that a dispatching call
to the Deep_Finalize routine is generated, which is unnecessary.  Although
this is a generic finalization issue with class-wide objects, this restores
the previous behavior in this case to fix the pessimization for now.

gcc/ada/

	* exp_ch3.adb (Expand_N_Object_Declaration): For a class-wide non-
	interface stand-alone object initialized by a function call, call
	Remove_Side_Effects on the expression to capture the result.
  • [DBH] gcc/ada/exp_ch3.adb
  • 10 January 2023 at 15:09

ada: Use static references to tag in more cases for interface objects

7 January 2023 at 21:05
ada: Use static references to tag in more cases for interface objects

This extends the use of static references to the interface tag in more cases
for (class-wide) interface objects, e.g. for initialization expressions that
are qualified aggregates or nondispatching calls returning a specific tagged
type implementing the interface.

gcc/ada/

	* exp_util.ads (Has_Tag_Of_Type): Declare.
	* exp_util.adb (Has_Tag_Of_Type): Move to package level.  Recurse on
	qualified expressions.
	* exp_ch3.adb (Expand_N_Object_Declaration): Use a static reference
	to the interface tag in more cases for class-wide interface objects.
  • [DBH] gcc/ada/exp_ch3.adb
  • [DBH] gcc/ada/exp_util.adb
  • [DBH] gcc/ada/exp_util.ads
  • 7 January 2023 at 21:05

ada: Fix premature finalization of temporaries for interface objects

6 January 2023 at 12:24
ada: Fix premature finalization of temporaries for interface objects

This restores the proper finalization of temporaries for interface objects
in the case where the initializing expression is not of an interface type.

It turns out that neither Is_Temporary_For_Interface_Object nor its previous
incarnation are sufficient to catch all the various cases, so it is replaced
by a small enhancement to Is_Aliased, which is more robust.

gcc/ada/

	* exp_util.adb (Is_Temporary_For_Interface_Object): Delete.
	(Is_Finalizable_Transient.Is_Aliased): Deal with the specific case
	of temporaries generated for interface objects.
  • [DBH] gcc/ada/exp_util.adb
  • 6 January 2023 at 12:24

ada: Update copyright years.

5 January 2023 at 10:38
ada: Update copyright years.

gcc/ada/

	* gcc-interface/Make-lang.in: Update copyright years.
	* gcc-interface/Makefile.in: Likewise.
	* gcc-interface/ada-builtin-types.def: Likewise.
	* gcc-interface/ada-builtins.def: Likewise.
	* gcc-interface/ada-tree.def: Likewise.
	* gcc-interface/ada-tree.h: Likewise.
	* gcc-interface/ada.h: Likewise.
	* gcc-interface/config-lang.in: Likewise.
	* gcc-interface/cuintp.cc: Likewise.
	* gcc-interface/decl.cc: Likewise.
	* gcc-interface/gadaint.h: Likewise.
	* gcc-interface/gigi.h: Likewise.
	* gcc-interface/lang-specs.h: Likewise.
	* gcc-interface/lang.opt: Likewise.
	* gcc-interface/misc.cc: Likewise.
	* gcc-interface/system.ads: Likewise.
	* gcc-interface/targtyps.cc: Likewise.
	* gcc-interface/trans.cc: Likewise.
	* gcc-interface/utils.cc: Likewise.
	* gcc-interface/utils2.cc: Likewise.
  • [DBH] gcc/ada/gcc-interface/Make-lang.in
  • [DBH] gcc/ada/gcc-interface/Makefile.in
  • [DBH] gcc/ada/gcc-interface/ada-builtin-types.def
  • [DBH] gcc/ada/gcc-interface/ada-builtins.def
  • [DBH] gcc/ada/gcc-interface/ada-tree.def
  • [DBH] gcc/ada/gcc-interface/ada-tree.h
  • [DBH] gcc/ada/gcc-interface/ada.h
  • [DBH] gcc/ada/gcc-interface/config-lang.in
  • [DBH] gcc/ada/gcc-interface/cuintp.cc
  • [DBH] gcc/ada/gcc-interface/decl.cc
  • [DBH] gcc/ada/gcc-interface/gadaint.h
  • [DBH] gcc/ada/gcc-interface/gigi.h
  • [DBH] gcc/ada/gcc-interface/lang-specs.h
  • [DBH] gcc/ada/gcc-interface/lang.opt
  • [DBH] gcc/ada/gcc-interface/misc.cc
  • [DBH] gcc/ada/gcc-interface/system.ads
  • [DBH] gcc/ada/gcc-interface/targtyps.cc
  • [DBH] gcc/ada/gcc-interface/trans.cc
  • [DBH] gcc/ada/gcc-interface/utils.cc
  • [DBH] gcc/ada/gcc-interface/utils2.cc
  • 5 January 2023 at 10:38

ada: Further optimize interface objects initialized with function calls

4 January 2023 at 07:41
ada: Further optimize interface objects initialized with function calls

This further optimizes the usual case of (class-wide) interface objects that
are initialized with calls to functions whose result type is the type of the
objects (this is not necessary as any result type implementing the interface
would do) by avoiding a back-and-forth displacement of the objects' address.

This exposed a latent issue whereby the displacement was missing in the case
of a simple return statement whose expression is a call to a function whose
result type is a specific tagged type that needs finalization.

And, in order to avoid pessimizing the expanded code, this in turn required
avoiding to create temporaries for allocators by calling Remove_Side_Effects
up front, in the common cases when they are not necessary.

gcc/ada/

	* exp_ch3.adb (Expand_N_Object_Declaration): Do not generate a back-
	and-forth displacement of the object's address when using a renaming
	for an interface object with an expression of the same type.
	* exp_ch4.adb (Expand_Allocator_Expression): Do not remove the side
	effects of the expression up front for the simple allocators. Do not
	call the Adjust primitive if the expression is a function call.
	* exp_ch6.adb (Expand_Ctrl_Function_Call): Do not expand the call
	unnecessarily for a special return object.
	(Expand_Simple_Function_Return): Restore the displacement of the
	return object's address in the case where the expression is the call
	to a function whose result type is a type that needs finalization.
	* exp_util.adb (Expand_Subtype_From_Expr): Do not remove the side
	effects of the expression before calling Make_Subtype_From_Expr.
	(Make_CW_Equivalent_Type): If the expression has the tag of its type
	and this type has a uniform size, use 'Object_Size of this type in
	lieu of 'Size of the expression to compute the expression's size.
  • [DBH] gcc/ada/exp_ch3.adb
  • [DBH] gcc/ada/exp_ch4.adb
  • [DBH] gcc/ada/exp_ch6.adb
  • [DBH] gcc/ada/exp_util.adb
  • 4 January 2023 at 07:41

ada: Lift restriction on optimization of aliased objects

2 January 2023 at 22:11
ada: Lift restriction on optimization of aliased objects

It turns out that the only blocking case is an aliased object whose nominal
subtype is an unconstrained array because the bounds must be allocated.

gcc/ada/

	* exp_ch3.adb (Expand_N_Object_Declaration): Also optimize aliased
	objects if their nominal subtype is not an unconstrained array.
  • [DBH] gcc/ada/exp_ch3.adb
  • 2 January 2023 at 22:11
โŒ
โŒ