diff options
-rw-r--r-- | gcc/profile.cc | 12 | ||||
-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 |
4 files changed, 20 insertions, 5 deletions
diff --git a/gcc/profile.cc b/gcc/profile.cc index 96121d6..1527a04 100644 --- a/gcc/profile.cc +++ b/gcc/profile.cc @@ -1457,11 +1457,13 @@ branch_prob (bool thunk) 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)); - seen_locations.add (loc); - expanded_location curr_location = expand_location (loc); - output_location (&streamed_locations, curr_location.file, - MAX (1, curr_location.line), &offset, bb); + if (!RESERVED_LOCATION_P (loc)) + { + seen_locations.add (loc); + expanded_location curr_location = expand_location (loc); + output_location (&streamed_locations, curr_location.file, + MAX (1, curr_location.line), &offset, bb); + } } for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) 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; |