re PR other/77421 (Bugs found in GCC with the help of PVS-Studio)
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 19 Sep 2016 21:57:46 +0000 (21:57 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Mon, 19 Sep 2016 21:57:46 +0000 (21:57 +0000)
2016-09-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR middle-end/77421
        * dwarf2out.c (output_loc_operands): Fix an assertion.

From-SVN: r240250

gcc/ChangeLog
gcc/dwarf2out.c

index 3b5fc9cb59b7d8bfda4ea972f1c757e4e388114c..5011595c5b94f551362e8a9436a1914a92868fc2 100644 (file)
@@ -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__]
index 434a2fc8b5a669c94e6fc3f0c58f3d6a6adf631f..10f8ba93a15ce53c6aadcdd8732ec7762af1ace2 100644 (file)
@@ -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);
       }