[Ada] Spurious error on default parameter in protected operation
commit5048305b36931a998b6510e1312ef6c83b7970ce
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jul 2018 09:56:21 +0000 (31 09:56 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 31 Jul 2018 09:56:21 +0000 (31 09:56 +0000)
treea9c4a33556cefd3b66bc8a316f84ce245d638003
parent5b3999d88d7ad52065483fa5477668b4ef969274
[Ada] Spurious error on default parameter in protected operation

This patch fixes a spurious compiler error on a call to a protected
operation whose profile includes a defaulted in-parameter that is a call
to another protected function of the same object.

2018-07-31  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* exp_ch6.adb (Expand_Protected_Subprogram_Call): Handle
properly a protected call that includes a default parameter that
is a call to a protected function of the same type.

gcc/testsuite/

* gnat.dg/prot5.adb, gnat.dg/prot5_pkg.adb,
gnat.dg/prot5_pkg.ads: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263101 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/exp_ch6.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/prot5.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/prot5_pkg.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/prot5_pkg.ads [new file with mode: 0644]