aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sinfo.adb
diff options
context:
space:
mode:
authorPatrick Bernardi <bernardi@adacore.com>2018-01-11 08:50:43 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-01-11 08:50:43 +0000
commita40d994753b00e453f5b97686bebed73e7de6692 (patch)
treee13f9e3d64bf886a2083351b8ee6e44d4e9221fd /gcc/ada/sinfo.adb
parent6b199a185b21857c2c26b470f8241d95d767c8c9 (diff)
downloadgcc-a40d994753b00e453f5b97686bebed73e7de6692.zip
gcc-a40d994753b00e453f5b97686bebed73e7de6692.tar.gz
gcc-a40d994753b00e453f5b97686bebed73e7de6692.tar.bz2
[Ada] Aspect/pragma Secondary_Stack_Size can evaluate non-literals as zero
This patch fixes the problem of aspect/pragma Secondary_Stack_Size expressions with non-literals evaluating as zero in static secondary stacks allocations. The aspect Secondary_Stack_Size is now converted to a pragma instead of an attribute as the attribute does not have visibility on the discriminant. Additionally, the discriminant of the corresponding record type is now referenced if the pragma expression contains a discriminant. No simple test available as the problem only impacts programs when System.Parameters.Sec_Stack_Dynamic = False 2018-01-11 Patrick Bernardi <bernardi@adacore.com> gcc/ada/ * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified Secondary_Stack_Size handling as a pragma is now generated for the corresponding aspect instead of an attribute. Pragma expression is relocated instead of evaluated. Discriminant of the corresponding record type is referenced rather than the type discriminant. (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update Secondary_Stack_Size rep item checks to only look for the pragma rep. * sem_ch13.adb (Analyze_One_Aspect): Transform Aspect_Secondary_Stack_Size into a pragma instead of an attribute because the attribute does not have visibility on a task type's discriminants when the type's definition is expanded. (Analyze_Attribute_Definition_Clause): Remove handling of Attribute_Secondary_Stack_Size. * snames.adb-tmpl, snames.ads-tmpl: Remove Attribute_Secondary_Stack_Size, no longer used. From-SVN: r256488
Diffstat (limited to 'gcc/ada/sinfo.adb')
0 files changed, 0 insertions, 0 deletions