gcc/ada/
PR ada/32792
* sem_attr.adb (Analyze_Attribute, Attribute_Integer_Value clause):
Signal an error when attribute argument is a fixed-point value of
an unknown type.
gcc/testsuite/
PR ada/32792
* gnat.dg/specs/integer_value.ads: New test.
From-SVN: r130497
* snames.ads (Attribute_Class_Array): Moved from sem-attr.ads.
+ PR ada/32792
+ * sem_attr.adb (Analyze_Attribute, Attribute_Integer_Value clause):
+ Signal an error when attribute argument is a fixed-point value of
+ an unknown type.
+
2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
PR 34081/C++
Check_E1;
Check_Integer_Type;
Resolve (E1, Any_Fixed);
+
+ -- Signal an error if argument type is not a specific fixed-point
+ -- subtype. An error has been signalled already if the argument
+ -- was not of a fixed-point type.
+
+ if Etype (E1) = Any_Fixed and then not Error_Posted (E1) then
+ Error_Attr ("argument of % must be of a fixed-point type", E1);
+ end if;
+
Set_Etype (N, P_Base_Type);
-----------
PR ada/17317
* gnat.dg/specs/attribute_parsing.ads: New test.
+ PR ada/32792
+ * gnat.dg/specs/integer_value.ads: New test.
+
2007-11-28 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/34140
--- /dev/null
+-- { dg-do compile }
+package Integer_Value is
+ X : constant Integer :=
+ Integer'Integer_Value (12.8); -- { dg-error "fixed-point type" "" }
+end Integer_Value;