summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorsam <sam@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-28 20:48:10 +0000
committersam <sam@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-28 20:48:10 +0000
commit1ee27c6314b6482506ed536b55e4bef747083ebe (patch)
treec06a4a590ed41cead072d30c539186bc583af1cf /gcc/ada
parent30364cca1cb2792d41eacb2094fcd3b5f41e0570 (diff)
downloadgcc-1ee27c6314b6482506ed536b55e4bef747083ebe.tar.gz
gcc/ada/
PR ada/22559 * sem_ch3.adb (Build_Derived_Numeric_Type): Do not set RM_Size on a derived ordinary fixed point type. * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Recompute RM_Size when a Small clause is found. gcc/testsuite/ PR ada/22559 * gnat.dg/specs/delta_small.ads: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130498 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog7
-rw-r--r--gcc/ada/sem_ch13.adb2
-rw-r--r--gcc/ada/sem_ch3.adb5
3 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index c7635154fd8..b201afb7376 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -22,6 +22,13 @@
Signal an error when attribute argument is a fixed-point value of
an unknown type.
+ PR ada/22559
+ * sem_ch3.adb (Build_Derived_Numeric_Type): Do not set RM_Size on
+ a derived ordinary fixed point type.
+
+ * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Recompute
+ RM_Size when a Small clause is found.
+
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index df61a8e7cc0..18670d3941e 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -29,6 +29,7 @@ with Einfo; use Einfo;
with Errout; use Errout;
with Exp_Tss; use Exp_Tss;
with Exp_Util; use Exp_Util;
+with Layout; use Layout;
with Lib; use Lib;
with Lib.Xref; use Lib.Xref;
with Namet; use Namet;
@@ -1375,6 +1376,7 @@ package body Sem_Ch13 is
Set_Has_Small_Clause (U_Ent);
Set_Has_Small_Clause (Implicit_Base);
Set_Has_Non_Standard_Rep (Implicit_Base);
+ Set_Discrete_RM_Size (U_Ent);
end if;
end Small;
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 6bddb202db9..5c61d00943f 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -4950,11 +4950,12 @@ package body Sem_Ch3 is
Set_Etype (Implicit_Base, Parent_Base);
Set_Ekind (Implicit_Base, Ekind (Parent_Base));
Set_Size_Info (Implicit_Base, Parent_Base);
- Set_RM_Size (Implicit_Base, RM_Size (Parent_Base));
Set_First_Rep_Item (Implicit_Base, First_Rep_Item (Parent_Base));
Set_Parent (Implicit_Base, Parent (Derived_Type));
- if Is_Discrete_Or_Fixed_Point_Type (Parent_Base) then
+ if Is_Discrete_Type (Parent_Base) or else
+ Is_Decimal_Fixed_Point_Type (Parent_Base)
+ then
Set_RM_Size (Implicit_Base, RM_Size (Parent_Base));
end if;