diff options
author | Tristan Gingold | 2014-01-17 02:57:06 +0100 |
---|---|---|
committer | Tristan Gingold | 2014-01-17 02:57:06 +0100 |
commit | 6a7003f0c7f1afcb1198fdc18e0db0afbff7ac87 (patch) | |
tree | 06fc4ab4336f70e0bac0e2d9397d1d89a195a760 /ortho/debug | |
parent | 6dd41d6791e97118165c8e4af6f178188ab2bb45 (diff) | |
download | ghdl-6a7003f0c7f1afcb1198fdc18e0db0afbff7ac87.tar.gz ghdl-6a7003f0c7f1afcb1198fdc18e0db0afbff7ac87.tar.bz2 ghdl-6a7003f0c7f1afcb1198fdc18e0db0afbff7ac87.zip |
Fix bug21497: do not create an indirection for access to complex type.
Add a type check in mcode for New_Address.
Diffstat (limited to 'ortho/debug')
-rw-r--r-- | ortho/debug/ortho_debug.adb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ortho/debug/ortho_debug.adb b/ortho/debug/ortho_debug.adb index 723fe3c..bed2e72 100644 --- a/ortho/debug/ortho_debug.adb +++ b/ortho/debug/ortho_debug.adb @@ -19,6 +19,9 @@ with Ada.Unchecked_Deallocation; package body Ortho_Debug is + -- If True, disable some checks so that the output can be generated. + Disable_Checks : constant Boolean := False; + -- Metrics: -- Alignment and size for an address. Metric_Access_Align : constant Natural := 2; @@ -844,7 +847,6 @@ package body Ortho_Debug is end case; end Get_Base_Type; - procedure Start_Record_Aggr (List : out O_Record_Aggr_List; Atype : O_Tnode) is subtype O_Cnode_Aggregate is O_Cnode_Type (OC_Aggregate); @@ -1118,7 +1120,9 @@ package body Ortho_Debug is raise Type_Error; end if; if Get_Base_Type (Lvalue.Rtype) /= Get_Base_Type (Atype.D_Type) then - raise Type_Error; + if not Disable_Checks then + raise Type_Error; + end if; end if; return new O_Enode_Address'(Kind => OE_Address, Rtype => Atype, |