]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Missing diagnostic of categorization dependency
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jan 2018 08:54:26 +0000 (08:54 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Jan 2018 08:54:26 +0000 (08:54 +0000)
commit5af8e389b0e0123e4bd101bbe6a8ceb28aa21b7e
tree9b8d4fcb251784a5801cf49533fcb736cd9f87fe
parent854e93fdd6431dfbd2b0869fc52e8b2793aa0173
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256516 138bc75d-0d04-0410-961f-82ee72b054a4
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]