[Ada] Missing diagnostic of categorization dependency
authorHristian Kirtchev <kirtchev@adacore.com>
Thu, 11 Jan 2018 08:54:26 +0000 (08:54 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 11 Jan 2018 08:54:26 +0000 (08:54 +0000)
commited27b86ba18a1ffed8ae002412250f0765ab3e72
tree9b8d4fcb251784a5801cf49533fcb736cd9f87fe
parent715a5d519184ef4251d590ef874e2ef493e92ffe
[Ada] Missing diagnostic of categorization dependency

This patch modifies the analysis of subprogram bodies to catch a case where a
pure subprogram body unit depends on non-pure units.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
categorization of a subprogram body which does not complete a previous
declaration.

gcc/testsuite/

* gnat.dg/pure_subp_body.adb, gnat.dg/pure_subp_body_pkg.ads: New
testcase.

From-SVN: r256516
gcc/ada/ChangeLog
gcc/ada/sem_ch6.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/pure_subp_body.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/pure_subp_body_pkg.ads [new file with mode: 0644]