* gcc-interface/decl.c (gnat_to_gnu_param): Minor tweak.
commit3d584d392fae52d0f15a6145172f712bbe02bbff
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 7 Jul 2018 10:06:08 +0000 (7 10:06 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 7 Jul 2018 10:06:08 +0000 (7 10:06 +0000)
tree570d31e7786608bb116879802c177ebeb03e7bd4
parent30b5769ff25f350407649f1a81b5c55888c4da36
* gcc-interface/decl.c (gnat_to_gnu_param): Minor tweak.
(gnat_to_gnu_subprog_type): New pure_flag local variable.  Set it for
a pure Ada function with a by-ref In parameter.  Propagate it onto the
function type by means of the TYPE_QUAL_RESTRICT flag.
* gcc-interface/utils.c (finish_subprog_decl): Set DECL_PURE_P if the
function type has the TYPE_QUAL_RESTRICT flag set.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262495 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/utils.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/pure_function3_pkg.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/pure_function3a.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/pure_function3b.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/pure_function3c.adb [new file with mode: 0644]