r273690 - in /trunk/gcc: ada/ChangeLog ada/sem_...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Mon Jul 22 13:58:00 GMT 2019


Author: pmderodat
Date: Mon Jul 22 13:58:09 2019
New Revision: 273690

URL: https://gcc.gnu.org/viewcvs?rev=273690&root=gcc&view=rev
Log:
[Ada] Spurious error passing access to class-wide interface type

The compiler reports an spurious error when the formal parameter of a
subprogram is an access to a class wide interface type and the actual
parameter is an allocator of an object covering such interface type.

2019-07-22  Javier Miranda  <miranda@adacore.com>

gcc/ada/

	* sem_res.adb (Resolve_Actuals): Replace code that displaces the
	pointer to an allocated object to reference its secondary
	dispatch table by a type conversion (which takes care of
	handling all cases).

gcc/testsuite/

	* gnat.dg/class_wide5.adb: New testcase.

Added:
    trunk/gcc/testsuite/gnat.dg/class_wide5.adb
Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_res.adb
    trunk/gcc/testsuite/ChangeLog



More information about the Gcc-cvs mailing list