aboutsummaryrefslogtreecommitdiff
path: root/libcpp/macro.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2018-10-09 15:06:35 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-10-09 15:06:35 +0000
commite693ddbec3e38aeff2e229785b9037ba0caa17c8 (patch)
treec2982d7ce8279b96ff13045aa674032b22d111e4 /libcpp/macro.c
parent38c2f655ffa5cf2f335c2772ec484702d891a7c3 (diff)
downloadgcc-e693ddbec3e38aeff2e229785b9037ba0caa17c8.zip
gcc-e693ddbec3e38aeff2e229785b9037ba0caa17c8.tar.gz
gcc-e693ddbec3e38aeff2e229785b9037ba0caa17c8.tar.bz2
[Ada] Fix spurious error on derived record passed as Out parameter
This fixlet gets rid of a spurious error issued in the specific case of a call to a subprogram taking an Out parameter of a discriminated record type without default discriminants, if the actual parameter is the result of the conversion to the record type of a variable whose type is derived from the record and has a representation clause. The compiler was failing to initialize the temporary made around the call because of the representation clause, but this is required for a type with discriminants because discriminants may be read by the called subprogram. 2018-10-09 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_ch6.adb (Add_Call_By_Copy_Code): Initialize the temporary made for an Out parameter if the formal type has discriminants. gcc/testsuite/ * gnat.dg/derived_type5.adb, gnat.dg/derived_type5_pkg.ads: New testcase. From-SVN: r264980
Diffstat (limited to 'libcpp/macro.c')
0 files changed, 0 insertions, 0 deletions