[Ada] Fix compiler crash for tagged private types
authorJavier Miranda <miranda@adacore.com>
Thu, 31 May 2018 10:45:51 +0000 (10:45 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 31 May 2018 10:45:51 +0000 (10:45 +0000)
commit59f7c7167a75bdb3992f2c7fb3b358124aea8404
tree198660b878b5f1653ab3ea397774c2c1676ced74
parent01f481c77e01414e75fc26adead0d143b27df85d
[Ada] Fix compiler crash for tagged private types

2018-05-31  Javier Miranda  <miranda@adacore.com>

gcc/ada/

* sem_util.ads, sem_util.adb (Find_Primitive_Eq): New subprogram.
* exp_ch4.adb (Expand_Composite_Equality): Use the new subprogram
Find_Primitive_Eq to search for the primitive of types whose underlying
type is a tagged type.

gcc/testsuite/

* gnat.dg/tagged1.adb, gnat.dg/tagged1.ads: New testcase.

From-SVN: r260997
gcc/ada/ChangeLog
gcc/ada/exp_ch4.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/tagged1.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/tagged1.ads [new file with mode: 0644]