diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-10-25 12:20:33 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2022-10-25 12:23:55 +0200 |
commit | cb21297f9259ceedd5f5dd7c3973535f14124d6d (patch) | |
tree | 51a2754875a1ca865c07f5a162bded1a09d24965 /gcc/testsuite/gnat.dg | |
parent | 3ee675724cb27eb2e8cfd82f6e234edc4a63f6be (diff) | |
download | gcc-cb21297f9259ceedd5f5dd7c3973535f14124d6d.zip gcc-cb21297f9259ceedd5f5dd7c3973535f14124d6d.tar.gz gcc-cb21297f9259ceedd5f5dd7c3973535f14124d6d.tar.bz2 |
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.
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r-- | gcc/testsuite/gnat.dg/specs/coverage1.ads | 10 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/specs/variant_part.ads | 1 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/specs/weak1.ads | 2 |
3 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/specs/coverage1.ads b/gcc/testsuite/gnat.dg/specs/coverage1.ads new file mode 100644 index 0000000..af7b61c --- /dev/null +++ b/gcc/testsuite/gnat.dg/specs/coverage1.ads @@ -0,0 +1,10 @@ +-- { dg-do compile } +-- { dg-options "-ftest-coverage" } + +package Coverage1 is + + type Rec is record + I : Integer := 0; + end record; + +end Coverage1; diff --git a/gcc/testsuite/gnat.dg/specs/variant_part.ads b/gcc/testsuite/gnat.dg/specs/variant_part.ads index afc92cd..72da410 100644 --- a/gcc/testsuite/gnat.dg/specs/variant_part.ads +++ b/gcc/testsuite/gnat.dg/specs/variant_part.ads @@ -1,4 +1,5 @@ -- { dg-do compile } + package Variant_Part is type T1(b: boolean) is record case (b) is -- { dg-error "discriminant name may not be parenthesized" } diff --git a/gcc/testsuite/gnat.dg/specs/weak1.ads b/gcc/testsuite/gnat.dg/specs/weak1.ads index 82cddc0..ece05ea 100644 --- a/gcc/testsuite/gnat.dg/specs/weak1.ads +++ b/gcc/testsuite/gnat.dg/specs/weak1.ads @@ -1,3 +1,5 @@ +-- { dg-do compile } + package Weak1 is Myconst : constant Integer := 1234; |