diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2016-09-19 21:57:46 +0000 |
---|---|---|
committer | Bernd Edlinger <edlinger@gcc.gnu.org> | 2016-09-19 21:57:46 +0000 |
commit | 3385d437fe1e17b7ba4735b5b6869e2153bfb506 (patch) | |
tree | 9c06f9f225f9d2321cbe36568b58578b2c6fb145 /gcc | |
parent | 1f2071fafdcde5ae2cbff7336b28f43510d78419 (diff) | |
download | gcc-3385d437fe1e17b7ba4735b5b6869e2153bfb506.zip gcc-3385d437fe1e17b7ba4735b5b6869e2153bfb506.tar.gz gcc-3385d437fe1e17b7ba4735b5b6869e2153bfb506.tar.bz2 |
re PR other/77421 (Bugs found in GCC with the help of PVS-Studio)
2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR middle-end/77421
* dwarf2out.c (output_loc_operands): Fix an assertion.
From-SVN: r240250
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3b5fc9c..5011595 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de> + + PR middle-end/77421 + * dwarf2out.c (output_loc_operands): Fix an assertion. + 2016-09-19 Joseph Myers <joseph@codesourcery.com> * ginclude/float.h [__STDC_WANT_IEC_60559_BFP_EXT__] diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 434a2fc..10f8ba9 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -2051,9 +2051,9 @@ output_loc_operands (dw_loc_descr_ref loc, int for_eh_or_skip) /* Make sure the offset has been computed and that we can encode it as an operand. */ gcc_assert (die_offset > 0 - && die_offset <= (loc->dw_loc_opc == DW_OP_call2) + && die_offset <= (loc->dw_loc_opc == DW_OP_call2 ? 0xffff - : 0xffffffff); + : 0xffffffff)); dw2_asm_output_data ((loc->dw_loc_opc == DW_OP_call2) ? 2 : 4, die_offset, NULL); } |