aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-range.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-02-08 22:16:23 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-22 10:44:10 +0200
commiteed5c23c8bda7527ed6922dabc5de4d05d55d08b (patch)
tree8269a61629a5e58ce8d05511195f15aae5bc9348 /gcc/value-range.h
parent25e4024cd14057d2cac955acc7ad87dd83b6c844 (diff)
downloadgcc-eed5c23c8bda7527ed6922dabc5de4d05d55d08b.zip
gcc-eed5c23c8bda7527ed6922dabc5de4d05d55d08b.tar.gz
gcc-eed5c23c8bda7527ed6922dabc5de4d05d55d08b.tar.bz2
ada: Fix missing finalization in library-unit instance spec
This fixes the missing finalization of objects declared in the spec of package instances that are library units (and only them, i.e. not all library-level package instances) when the instances have a package body. The finalization is done when there is no package body, and supporting this case precisely broke the other case because of a thinko or a typo. This also requires a small adjustment to the routine writing ALI files. gcc/ada/ * exp_ch7.adb (Build_Finalizer): Reverse the test comparing the instantiation and declaration nodes of a package instance, and therefore bail out only when they are equal. Adjust comments. (Expand_N_Package_Declaration): Do not clear the Finalizer field. * lib-writ.adb: Add with and use clauses for Sem_Util. (Write_Unit_Information): Look at unit nodes to find finalizers. * sem_ch12.adb (Analyze_Package_Instantiation): Beef up the comment about the rewriting of the instantiation node into a declaration.
Diffstat (limited to 'gcc/value-range.h')
0 files changed, 0 insertions, 0 deletions