diff options
author | Gary Dismukes <dismukes@adacore.com> | 2020-06-24 17:22:58 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-10-16 03:31:18 -0400 |
commit | 057469588864b2566f89e3a548a80d7517b34c98 (patch) | |
tree | fb7e401d915d75f160e107b5f54595e7f00045aa /gcc/ada/switch-c.adb | |
parent | 6f238680dd3091f7431f3e1b571ea3c51f8ce2b4 (diff) | |
download | gcc-057469588864b2566f89e3a548a80d7517b34c98.zip gcc-057469588864b2566f89e3a548a80d7517b34c98.tar.gz gcc-057469588864b2566f89e3a548a80d7517b34c98.tar.bz2 |
[Ada] GNAT-LLVM unnesting issues in elaboration code
gcc/ada/
* exp_ch7.adb (Check_Unnesting_In_Decls_Or_Stmts): In the case
of an if-statement, call Unnest_If_Statement to determine
whether there are nested subprograms in any of the statement
lists of the "if" parts that require a wrapping procedure to
handle possible up-level refeferences.
(Unnest_Block): Call Check_Unnesting_In_Handlers to do unnesting
of subprograms in exception handlers of the block statement.
(Unnest_If_Statement): New procedure to traverse the parts of an
if-statement and create wrapper procedures as needed to
encapsulate nested subprograms that may make up-level
references.
(Check_Stmts_For_Subp_Unnesting): New support procedure in
Unnest_If_Statement to traverse a statement list looking for
top-level subprogram bodies that require wrapping inside a
procedure (via Unnest_Statement_List) as well as possibly having
other statements (block, loop, if) that may themselves require
an unnesting transformation (via
Check_Unnesting_In_Decls_Or_Stmts).
(Unnest_Statement_List): New support procedure to traverse the
statements of a statement list that contains subprogram bodies
at the top level and replace the statement list with a wrapper
procedure body encapsulating the statements and a call to the
procedure.
Diffstat (limited to 'gcc/ada/switch-c.adb')
0 files changed, 0 insertions, 0 deletions