aboutsummaryrefslogtreecommitdiff
path: root/libcpp/line-map.c
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2019-07-09 07:55:38 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-09 07:55:38 +0000
commit5e0f7ab2fb33372f298ad9333dd2dd2e44cf01cc (patch)
treece93a484c8270a63ed5a2a499fd930e8c764db03 /libcpp/line-map.c
parent924e3532dcdabde43f5b49f1ef1a95656f4e37dc (diff)
downloadgcc-5e0f7ab2fb33372f298ad9333dd2dd2e44cf01cc.zip
gcc-5e0f7ab2fb33372f298ad9333dd2dd2e44cf01cc.tar.gz
gcc-5e0f7ab2fb33372f298ad9333dd2dd2e44cf01cc.tar.bz2
[Ada] Access to uninitialized memory by predicate check
This patch fixes an exception or erroneous execution, when the declaration for an object of a composite type that has a dynanic predicate is initialized with an aggregate that requires expansion into individual components. Prior to this patch the predicate check for the object appeared before intialization was performed, thus accessing uninitialized memory. 2019-07-09 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch3.adb (Analyze_Object_Declaration): If the object type is a composite type that has a dynamic predicate and, the expression in the declaration is an aggregate, the generated predicate check must appear after the expanded code for the aggregate, which will appear after the rewritten object declarastion. gcc/testsuite/ * gnat.dg/predicate10.adb, gnat.dg/predicate10_pkg.adb, gnat.dg/predicate10_pkg.ads: New testcase. From-SVN: r273293
Diffstat (limited to 'libcpp/line-map.c')
0 files changed, 0 insertions, 0 deletions