aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2022-01-12 12:04:58 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-09 09:27:34 +0000
commit09cca56d660042991a7267b568641e16e77d0ba1 (patch)
tree6074de193925edbd787e6d8e851b77e0a2cb5f8d /gcc/system.h
parent692a4bf88c5a4743bb5dca47b59a73a83add0fae (diff)
downloadgcc-09cca56d660042991a7267b568641e16e77d0ba1.zip
gcc-09cca56d660042991a7267b568641e16e77d0ba1.tar.gz
gcc-09cca56d660042991a7267b568641e16e77d0ba1.tar.bz2
[Ada] Fix package installation for private array type of private element
The problem comes from the construction of Stream operations, which happens at the point a tagged type is frozen. Streams need to see the full view of types, so that for example the Read attribute for an array can be expanded into a loop over the Read attribute for the component type. Now if during that expansion we have a private type we may need to retrieve the full view of the type to find its structure. And the corresponding tree must be compiled in the context of the package that defines the type, which might not be the current package. The problem arises when both array and component types are private, then the described mechanism is invoked twice. gcc/ada/ * exp_attr.adb (Compile_Stream_Body_In_Scope): Do not install package if array type and element type come from the same package, and the original array type is private.
Diffstat (limited to 'gcc/system.h')
0 files changed, 0 insertions, 0 deletions