aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2018-05-31 10:47:03 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-31 10:47:03 +0000
commit6ae40af30c0d2db1fe3d9610ade37004ee0c1d38 (patch)
tree28d48163113af5be6ce2267c4849a6b183819ed1 /libgo
parentc9f357688263239dee41cef4762f0ad78c1bb442 (diff)
downloadgcc-6ae40af30c0d2db1fe3d9610ade37004ee0c1d38.zip
gcc-6ae40af30c0d2db1fe3d9610ade37004ee0c1d38.tar.gz
gcc-6ae40af30c0d2db1fe3d9610ade37004ee0c1d38.tar.bz2
[Ada] Illegal copy of limited object
This patch fixes a spurious copy of a limited object, when that object is a discriminated record component of a limited type LT, and the enclosing record is initialized by means of an aggregate, one of whose components is a call to a build-in-place function that returns an unconstrained object of type T. 2018-05-31 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * checks.adb (Apply_Discriminant_Check): Do not apply discriminant check to a call to a build-in-place function, given that the return object is limited and cannot be copied. gcc/testsuite/ * gnat.dg/limited1.adb, gnat.dg/limited1_inner.adb, gnat.dg/limited1_inner.ads, gnat.dg/limited1_outer.adb, gnat.dg/limited1_outer.ads: New testcase. From-SVN: r261009
Diffstat (limited to 'libgo')
0 files changed, 0 insertions, 0 deletions