aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2024-03-29 13:29:54 +0100
committerMarc Poulhiès <poulhies@adacore.com>2024-05-20 09:47:06 +0200
commitefc7ba5f8f113565b47214d0ffdb27a6638ab8b6 (patch)
treeeda530b1ea6288cdf8307f8b09e898e2c3de38eb /gcc/tree-ssa-phiopt.cc
parentcee232f4bf2e7d6891ec68c0100ecc5063e3e748 (diff)
downloadgcc-efc7ba5f8f113565b47214d0ffdb27a6638ab8b6.zip
gcc-efc7ba5f8f113565b47214d0ffdb27a6638ab8b6.tar.gz
gcc-efc7ba5f8f113565b47214d0ffdb27a6638ab8b6.tar.bz2
ada: Get rid of secondary stack for indefinite record types with size clause
This change eliminates the use of the secondary stack for indefinite record types for which a valid (object) size clause is specified. In accordance with the RM, the compiler accepts (object) size clauses on such types only if all the components, including those of the variants of the variant part if any, have a size known at compile time, and only if the clauses specify a value that is at least as large as the largest possible size of objects of the types when all the variants are considered. However, it would still have used the secondary stack, despite valid (object) size clauses, before the change, as soon as a variant part was present in the types. gcc/ada/ * freeze.ads (Check_Compile_Time_Size): Remove obsolete description of usage for the Size_Known_At_Compile_Time flag. * freeze.adb (Check_Compile_Time_Size.Size_Known): In the case where a variant part is present, do not return False if Esize is known. * sem_util.adb (Needs_Secondary_Stack.Caller_Known_Size_Record): Add missing "Start of processing" comment. Return true if either a size clause or an object size clause has been given for the first subtype of the type.
Diffstat (limited to 'gcc/tree-ssa-phiopt.cc')
0 files changed, 0 insertions, 0 deletions