]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Crash on return of raise expression
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 May 2018 13:05:32 +0000 (13:05 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 May 2018 13:05:32 +0000 (13:05 +0000)
commitf68111462bcd53cb86a131357c0fe2b9a9829889
tree9737fecf2ea356b3edff25e5d218e47d3f7f82d1
parent3a47bf76030f68bd3f48737b477e2e2dbce23f07
[Ada] Crash on return of raise expression

This patch fixes an issue whereby the compiler regarded assignments to limited
that consisted of raise expressions to be a compile-time error during
expansion.

2018-05-24  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
expansion for limited tagged types when the node to be expanded is a
raise expression due to it not representing a valid object.
* exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
message regarding assignments to limited types to ignore genereated
code.

gcc/testsuite/

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

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