Commit 402e89f5 by Pierre-Marie de Rodat Committed by Pierre-Marie de Rodat

Fix a typo in dwarf2out.c:resolve_args_picking_1

Under specific circumstances for Ada programs, such as in the testcase
this change adds, the DWARF back-end currently crashes because of
inconsistent internal state. This is due to a typo: a local variable is
called frame_offset_ but resolve_args_picking_1 wrongly modifies
emit-rtl.h's frame_offset instead.

This change fixes this typo.

gcc/
	* dwarf2out.c (resolve_args_picking_1): Replace the frame_offset
	occurence with frame_offset_ ones.

gcc/testsuite/
	* gnat.dg/debug5.adb: New testcase.

From-SVN: r235830
parent 67647f92
2016-05-03 Pierre-Marie de Rodat <derodat@adacore.com>
* dwarf2out.c (resolve_args_picking_1): Replace the frame_offset
occurence with frame_offset_ ones.
2016-05-03 Alan Modra <amodra@gmail.com> 2016-05-03 Alan Modra <amodra@gmail.com>
PR rtl-optimization/70890 PR rtl-optimization/70890
......
...@@ -15571,7 +15571,7 @@ resolve_args_picking_1 (dw_loc_descr_ref loc, unsigned initial_frame_offset, ...@@ -15571,7 +15571,7 @@ resolve_args_picking_1 (dw_loc_descr_ref loc, unsigned initial_frame_offset,
if (stack_usage == NULL) if (stack_usage == NULL)
return false; return false;
frame_offset += *stack_usage; frame_offset_ += *stack_usage;
break; break;
} }
......
2016-05-03 Pierre-Marie de Rodat <derodat@adacore.com>
* gnat.dg/debug5.adb: New testcase.
2016-05-03 Dominik Vogt <vogt@linux.vnet.ibm.com> 2016-05-03 Dominik Vogt <vogt@linux.vnet.ibm.com>
* gcc.target/s390/md/rXsbg_mode_sXl.c: New test. * gcc.target/s390/md/rXsbg_mode_sXl.c: New test.
......
-- { dg-do compile }
-- { dg-options "-g" }
procedure Debug5 is
type Record_Type (L1, L2 : Natural) is record
S1 : String (1 .. L1);
case L2 is
when 0 => null;
when others => S2 : String (L1 .. L2);
end case;
end record;
procedure Discard (R : Record_Type) is
begin
null;
end Discard;
R : constant Record_Type := (0, 0, others => <>);
begin
Discard (R);
end Debug5;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment