[Ada] Extend the applicability of Thread_Local_Storage to composite types
This patch allows the GNAT-specific Thread_Local_Storage to be applied
to variables of a composite type initiallized with an aggregate with
static components that requires no elaboration code.
2018-05-30 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* freeze.adb (Freeze_Object_Declaration): A pragma Thread_Local_Storage
is now legal on a variable of composite type initialized with an
aggregate that is fully static and requires no elaboration code.
* exp_aggr.adb (Convert_To_Positional): Recognize additional cases of
nested aggregates that are compile-time static, so they can be used to
initialize variables declared with Threqd_Local_Storage.
* doc/gnat_rm/implementation_defined_pragmas.rst: Add documentation on
Thread_Local_Storage.
* gnat_rm.texi: Regenerate.
gcc/testsuite/
* gnat.dg/tls1.adb, gnat.dg/tls1_pkg.ads: New testcase.
From-SVN: r260944