aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/misc.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2020-09-10 17:47:32 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2020-09-10 18:00:57 +0200
commit71465223b95af43951c423ad77391e706f02901d (patch)
tree708ff979248ddb6daebc0a49eed834903174c78a /gcc/ada/gcc-interface/misc.c
parent66a204a6567385638f633732bb61e2ac26b2eb02 (diff)
downloadgcc-71465223b95af43951c423ad77391e706f02901d.zip
gcc-71465223b95af43951c423ad77391e706f02901d.tar.gz
gcc-71465223b95af43951c423ad77391e706f02901d.tar.bz2
Fix uninitialized variable with nested variant record types
This fixes a wrong code issue with nested variant record types: the compiler generates move instructions that depend on an uninitialized variable, which was initially a SAVE_EXPR not instantiated early enough. gcc/ada/ChangeLog: * gcc-interface/decl.c (build_subst_list): For a definition, make sure to instantiate the SAVE_EXPRs generated by the elaboration of the constraints in front of the elaboration of the type itself. gcc/testsuite/ChangeLog: * gnat.dg/discr59.adb: New test. * gnat.dg/discr59_pkg1.ads: New helper. * gnat.dg/discr59_pkg2.ads: Likewise.
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
0 files changed, 0 insertions, 0 deletions