aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-12-07 00:56:43 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-01-03 10:29:53 +0100
commit7caa68418199bf2116467780d68ba21d49c45cdb (patch)
treecbf01c8d5ab9af464d90543a754051d2b499397c /gcc/fold-const.cc
parent7512dcc94236d247ceef8cef6d36392a86e271a0 (diff)
downloadgcc-7caa68418199bf2116467780d68ba21d49c45cdb.zip
gcc-7caa68418199bf2116467780d68ba21d49c45cdb.tar.gz
gcc-7caa68418199bf2116467780d68ba21d49c45cdb.tar.bz2
ada: Fix detection of function calls in object declarations
The current code has relied on Original_Node to detect rewritten function calls in object declarations but that's not robust enough in the presence of function calls written in object notation. gcc/ada/ * exp_util.ads (Is_Captured_Function_Call): Declare. * exp_util.adb (Is_Captured_Function_Call): New predicate. * exp_ch3.adb (Expand_N_Object_Declaration): Use it to detect a rewritten function call as the initializing expression. * exp_ch6.adb (Expand_Simple_Function_Return): Use it to detect a rewritten function call as the returned expression.
Diffstat (limited to 'gcc/fold-const.cc')
0 files changed, 0 insertions, 0 deletions