diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2007-11-28 20:48:10 +0000 |
---|---|---|
committer | Samuel Tardieu <sam@gcc.gnu.org> | 2007-11-28 20:48:10 +0000 |
commit | 7bde4677df0023c825bb74173edf1590d89378cb (patch) | |
tree | c06a4a590ed41cead072d30c539186bc583af1cf /gcc/ada | |
parent | 5a21849883efce34b55216109644da8ab8b16fcd (diff) | |
download | gcc-7bde4677df0023c825bb74173edf1590d89378cb.zip gcc-7bde4677df0023c825bb74173edf1590d89378cb.tar.gz gcc-7bde4677df0023c825bb74173edf1590d89378cb.tar.bz2 |
re PR ada/22559 (Bug box, Program_Error at sinput.adb:404, derived fixed-point type)
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.
From-SVN: r130498
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.adb | 2 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 5 |
3 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index c763515..b201afb 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 df61a8e..18670d3 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 6bddb20..5c61d00 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; |