[Ada] Compiler crash on instance with overloaded actual and aspects
commitc14b424ec73738165d0031888b534562a7ce6438
authorEd Schonberg <schonberg@adacore.com>
Fri, 20 Mar 2020 13:24:49 +0000 (20 09:24 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 12 Jun 2020 08:29:12 +0000 (12 04:29 -0400)
treeba6456954bf520a8d0589f5faa2ebe664af88475
parentc324c77eeda3203bc9280b7aeefc9aea13503792
[Ada] Compiler crash on instance with overloaded actual and aspects

2020-06-12  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* sem_ch12.adb (Has_Contracts): New predicate to check whether a
formal subprogram carries an aspect specification for a pre- or
postcondition.
(Build_Subprogram_Wrappers): If actual is overloaded, create a
new name to be used in call inside wrapper body. This names
carries the interpretations of the actual, and is resolved when
the body is analyzed.
(Build_Subprogram_Body_Wrapper): Use this generated name in
call.
(Build_Subprogram_Decl_Wrapper): Build profile of wrapper from
the profile of formal, and reset type entities for subsequent
analysis.
gcc/ada/sem_ch12.adb