From 04b041be9062db340a648f5ed0f0788ac25c7290 Mon Sep 17 00:00:00 2001 From: Brian Drummond Date: Sat, 7 Dec 2013 15:04:30 +0000 Subject: Patch ortho-lang.c to fix gcc failure in optimisation passes; patch others to allow debug backend and oread to build with gcc4.8 --- ortho/debug/ortho_debug.adb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'ortho/debug') diff --git a/ortho/debug/ortho_debug.adb b/ortho/debug/ortho_debug.adb index e61886ef2..633fe7012 100644 --- a/ortho/debug/ortho_debug.adb +++ b/ortho/debug/ortho_debug.adb @@ -1311,9 +1311,8 @@ package body Ortho_Debug is is subtype O_Dnode_Const_Value is O_Dnode_Type (ON_Const_Value); N : O_Dnode; + Temp : constant O_Dnode := Const; begin - Const := Const; - if Const.Const_Value /= O_Dnode_Null then -- Constant already has a value. raise Syntax_Error; @@ -1335,14 +1334,15 @@ package body Ortho_Debug is Lineno => 0, Const_Decl => Const, Value => O_Cnode_Null); - Const.Const_Value := N; + Temp.Const_Value := N; + Const := Temp; Add_Decl (N, False); end Start_Const_Value; procedure Finish_Const_Value (Const : in out O_Dnode; Val : O_Cnode) is + Temp : constant O_Dnode := Const; begin - Const := Const; if Const.Const_Value = O_Dnode_Null then -- Start_Const_Value not called. @@ -1357,7 +1357,8 @@ package body Ortho_Debug is raise Type_Error; end if; Check_Type (Val.Ctype, Const.Dtype); - Const.Const_Value.Value := Val; + Temp.Const_Value.Value := Val; + Const := Temp; end Finish_Const_Value; procedure New_Var_Decl -- cgit v1.2.3