r236087 - in /trunk/gcc: ChangeLog dwarf2out.c ...
pmderodat@gcc.gnu.org
pmderodat@gcc.gnu.org
Tue May 10 15:57:00 GMT 2016
Author: pmderodat
Date: Tue May 10 15:57:37 2016
New Revision: 236087
URL: https://gcc.gnu.org/viewcvs?rev=236087&root=gcc&view=rev
Log:
DWARF: fix stack usage assessment for DW_OP_neg
When the DWARF back-end generates DW_OP_neg operations in DWARF
procedures, we get an ICE because of inconsistent stack usage
computation for the embedding expression. This is because
resolve_args_picking_1 thinks DW_OP_neg is a binary operation (pops 2
stack slots, pushes 1) whereas it really is an unary one (one pop, one
push).
This change fixes resolve_args_picking_1 and adds a regression testcase
(which crashes with the current trunk). Bootstrapped and regtested
without regression on x86_64-linux.
gcc/
* dwarf2out.c (resolve_args_picking_1): Consider DW_OP_neg as an
unary operation, not a binary one.
gcc/testsuite/
* gnat.dg/debug6.adb, gnat.dg/debug6_pkg.ads: New testcase.
Added:
trunk/gcc/testsuite/gnat.dg/debug6.adb
trunk/gcc/testsuite/gnat.dg/debug6_pkg.ads
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list