Commit c7e3d069 by Arnaud Charlet Committed by Pierre-Marie de Rodat

[Ada] Fix uninitialized out parameter in s-regpat.adb

2019-12-18  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* libgnat/s-regpat.adb (Parse_Literal, Parse_Piece): Ensure
	Expr_Flags is always fully initialized.

From-SVN: r279517
parent 19f0436b
2019-12-18 Arnaud Charlet <charlet@adacore.com>
* libgnat/s-regpat.adb (Parse_Literal, Parse_Piece): Ensure
Expr_Flags is always fully initialized.
2019-12-18 Arnaud Charlet <charlet@adacore.com>
* libgnat/s-atopar.ads, libgnat/s-atopex.ads (Atomic_Type): Can
now be marked Atomic. This requires marking the unit Ada 202x.
......
......@@ -1558,7 +1558,8 @@ package body System.Regpat is
Has_Special_Operator : Boolean := False;
begin
Parse_Pos := Parse_Pos - 1; -- Look at current character
Expr_Flags := Worst_Expression; -- Ensure Expr_Flags is initialized
Parse_Pos := Parse_Pos - 1; -- Look at current character
IP :=
Emit_Node
......@@ -1684,11 +1685,8 @@ package body System.Regpat is
begin
Parse_Atom (New_Flags, IP);
if IP = 0 then
return;
end if;
if Parse_Pos > Parse_End
if IP = 0
or else Parse_Pos > Parse_End
or else not Is_Mult (Parse_Pos)
then
Expr_Flags := New_Flags;
......
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