aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2020-05-25 09:18:03 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2020-05-25 09:25:57 +0200
commit5dce843f32edfd998ae4844d8115a9c9b9c394bc (patch)
treea8057058326d856b8ee25828bb2fa8e40e7192f6 /gcc/ada/gcc-interface/utils.c
parent94c0409717bf8bf783963c1d50bb8f4a4732dce7 (diff)
downloadgcc-5dce843f32edfd998ae4844d8115a9c9b9c394bc.zip
gcc-5dce843f32edfd998ae4844d8115a9c9b9c394bc.tar.gz
gcc-5dce843f32edfd998ae4844d8115a9c9b9c394bc.tar.bz2
Fix wrong assignment to mutable Out parameter of task entry
Under very specific circumstances the compiler can generate a wrong assignment to a mutable record object which contains an array component, because it does not correctly handle the update of the discriminant. gcc/ada/ChangeLog * gcc-interface/gigi.h (operand_type): New static inline function. * gcc-interface/trans.c (gnat_to_gnu): Do not suppress conversion to the resulty type at the end for array types. * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Do not remove conversions between array types on the LHS. gcc/testsuite/ChangeLog * gnat.dg/array39.adb: New test. * gnat.dg/array39_pkg.ads: New helper. * gnat.dg/array39_pkg.adb: Likewise.
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
0 files changed, 0 insertions, 0 deletions