[Ada] Arrange not to set DECL_ARTIFICIAL on elab procs
Unlike, say, clones created internally by the compiler, elab procs materialize specific user code and flagging them artificial now takes elab code away from gcov's analysis, a regression compared to previous releases. On the testcase below: package Gcov_Q is function F (X : Integer) return Integer is (X + 1); end; with Gcov_Q; package Gcov_P is Y : Integer := Gcov_Q.F (X => 1); end; with Gcov_P; procedure Gcov_Test is begin if Gcov_P.Y /= 2 then raise Program_Error; end if; end; After compiling with: gnatmake -f -g gcov_test.adb \ -cargs -ftest-coverage -fprofile-arcs \ -largs -fprofile-generate and executing with ./gcov_test We expect gcov gcov_p to produce a gcov_p.ads.gcov report. 2019-07-08 Olivier Hainque <hainque@adacore.com> gcc/ada/ * gcc-interface/trans.c (Compilation_Unit_to_gnu): Don't request DECL_ARTIFICIAL_P on elab proc declarations. From-SVN: r273207
Showing
Please
register
or
sign in
to comment