trans.c (Attribute_to_gnu): Do not convert the result.
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 7 Apr 2009 10:21:45 +0000 (10:21 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 7 Apr 2009 10:21:45 +0000 (10:21 +0000)
2009-04-07  Eric Botcazou  <ebotcazou@adacore.com>

* gcc-interface/trans.c (Attribute_to_gnu) <Max_Size_In_Storage_Elmts>:
Do not convert the result.  Remove obsolete comment.

From-SVN: r145662

gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c

index 07590027b671d9eb7b3db6210e4290d4ab63df79..d0a953d6146b4d80e149dc7a800cfb252fffdeda 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-07  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc-interface/trans.c (Attribute_to_gnu) <Max_Size_In_Storage_Elmts>:
+       Do not convert the result.  Remove obsolete comment.
+
 2009-04-07  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Clear
index ec3ec31274ab629ee122cf8e76797ce176bba064..b505c887b6cf47ecae6cc17984e05a4384be9b1a 100644 (file)
@@ -1390,16 +1390,9 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute)
 
       gnu_result_type = get_unpadded_type (Etype (gnat_node));
 
-      /* Always perform division using unsigned arithmetic as the size cannot
-        be negative, but may be an overflowed positive value. This provides
-        correct results for sizes up to 512 MB.
-
-        ??? Size should be calculated in storage elements directly.  */
-
       if (attribute == Attr_Max_Size_In_Storage_Elements)
-       gnu_result = convert (sizetype,
-                             fold_build2 (CEIL_DIV_EXPR, bitsizetype,
-                                          gnu_result, bitsize_unit_node));
+       gnu_result = fold_build2 (CEIL_DIV_EXPR, bitsizetype,
+                                 gnu_result, bitsize_unit_node);
       break;
 
     case Attr_Alignment: