]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Fix crash on frontend inlining of functions with single returns
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 5 Jul 2022 21:41:43 +0000 (23:41 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 13 Jul 2022 10:01:16 +0000 (10:01 +0000)
commitd03a7f8c247d73258b80891c79358b745c379992
tree21d67e9cf0fa330ba4ed675e86568d4c4e943b11
parent05e91ac1f89dc0b4757ac7e8ffaacd65bcdc4794
[Ada] Fix crash on frontend inlining of functions with single returns

When examining expression of the first declaration of the inlined body
make sure that this declaration is in fact an object declaration.

gcc/ada/

* inline.adb (Has_Single_Return): Add guard for the subsequent
call to Expression.
gcc/ada/inline.adb