]> git.ipfire.org Git - thirdparty/gcc.git/commit
Relax assertion in profiler
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 25 Oct 2022 10:20:33 +0000 (12:20 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Tue, 25 Oct 2022 10:25:19 +0000 (12:25 +0200)
commitda1f6e5260dbcce59372cb522e1af763f25eed6b
tree3dd8c099f97d87fb92e91a0f502348fca0d36278
parent0737125ec0e9102e139f8f49130b4666be4cc626
Relax assertion in profiler

This assertion in branch_prob:

  if (bb == ENTRY_BLOCK_PTR_FOR_FN (cfun)->next_bb)
    {
      location_t loc = DECL_SOURCE_LOCATION (current_function_decl);
      gcc_checking_assert (!RESERVED_LOCATION_P (loc));

had been correct until the fix for PR debug/101598 was installed.

gcc/
* profile.cc (branch_prob): Be prepared for ignored functions with
DECL_SOURCE_LOCATION set to UNKNOWN_LOCATION.

gcc/testsuite:
* gnat.dg/specs/coverage1.ads: New test.
* gnat.dg/specs/variant_part.ads: Minor tweak.
* gnat.dg/specs/weak1.ads: Add dg directive.
gcc/profile.cc
gcc/testsuite/gnat.dg/specs/coverage1.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/specs/variant_part.ads
gcc/testsuite/gnat.dg/specs/weak1.ads