diff options
author | Brian Drummond | 2013-12-07 15:04:30 +0000 |
---|---|---|
committer | Brian Drummond | 2013-12-07 15:04:30 +0000 |
commit | 04b041be9062db340a648f5ed0f0788ac25c7290 (patch) | |
tree | aec835ddea47847cdad443d7b372fff07412b80f /ortho/debug | |
parent | df660489af69e9fbfa6ede69790777b7b07401a5 (diff) | |
download | ghdl-04b041be9062db340a648f5ed0f0788ac25c7290.tar.gz ghdl-04b041be9062db340a648f5ed0f0788ac25c7290.tar.bz2 ghdl-04b041be9062db340a648f5ed0f0788ac25c7290.zip |
Patch ortho-lang.c to fix gcc failure in optimisation passes; patch others to allow debug backend and oread to build with gcc4.8
Diffstat (limited to 'ortho/debug')
-rw-r--r-- | ortho/debug/ortho_debug.adb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ortho/debug/ortho_debug.adb b/ortho/debug/ortho_debug.adb index e61886e..633fe70 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 |