decl.c (gnat_to_gnu_entity, [...]): When constructing a ref to variable...
authorOlivier Hainque <hainque@adacore.com>
Tue, 6 Jan 2015 09:49:00 +0000 (09:49 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 6 Jan 2015 09:49:00 +0000 (10:49 +0100)
2015-01-06  Olivier Hainque  <hainque@adacore.com>

* gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
constructing a ref to variable, update inner_const_flag from the
variable TREE_READONLY attribute.
* gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
definition.
(get_target_float_size): Remove.
(get_target_double_size): Remove.
(get_target_long_double_size): Remove.

From-SVN: r219239

gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/targtyps.c

index 6afb823f9e99bf756c8304f0e1e1c847b5f57114..c6159e6b50114e9521fcf54d2a4e3b392473186d 100644 (file)
@@ -1,3 +1,14 @@
+2015-01-06  Olivier Hainque  <hainque@adacore.com>
+
+        * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
+        constructing a ref to variable, update inner_const_flag from the
+        variable TREE_READONLY attribute.
+        * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
+        definition.
+        (get_target_float_size): Remove.
+        (get_target_double_size): Remove.
+        (get_target_long_double_size): Remove.
+
 2015-01-06  Pascal Obry  <obry@adacore.com>
 
        * adaint.c (ProcListEvt): Set to NULL.
index fda3f0cc63e4a3647c0b4e9cd2831ef379c87e4f..b6df1ae79ef3bc87af147e4c58ca52dd1e0fa9a6 100644 (file)
@@ -1415,6 +1415,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
 
                gnu_size = NULL_TREE;
                used_by_ref = true;
+               inner_const_flag = TREE_READONLY (gnu_unc_var);
                const_flag = true;
              }
 
index cfc45e7fe16fa7abd9345f980ef2ed1513e1bc3b..851d5f7e37451d0f8a47d46e76fc828d47be2eba 100644 (file)
@@ -6,7 +6,7 @@
  *                                                                          *
  *                                  Body                                    *
  *                                                                          *
- *          Copyright (C) 1992-2012, Free Software Foundation, Inc.         *
+ *          Copyright (C) 1992-2014, Free Software Foundation, Inc.         *
  *                                                                          *
  * GNAT is free software;  you can  redistribute it  and/or modify it under *
  * terms of the  GNU General Public License as published  by the Free Soft- *
 #define ADA_LONG_TYPE_SIZE LONG_TYPE_SIZE
 #endif
 
-/* If we don't have a target definition of WIDEST_HARDWARE_FP_SIZE, assume
-   DOUBLE_TYPE_SIZE.  We used to default to LONG_DOUBLE_TYPE_SIZE, which now
-   most often maps 128 bits implemented with very inefficient software
-   emulations so is incorrect as a hardware size estimate.  */
-
-#ifndef WIDEST_HARDWARE_FP_SIZE
-#define WIDEST_HARDWARE_FP_SIZE DOUBLE_TYPE_SIZE
-#endif
-
 /* The following provide a functional interface for the front end Ada code
    to determine the sizes that are used for various C types. */
 
@@ -115,24 +106,6 @@ get_target_long_long_size (void)
   return LONG_LONG_TYPE_SIZE;
 }
 
-Pos
-get_target_float_size (void)
-{
-  return fp_prec_to_size (FLOAT_TYPE_SIZE);
-}
-
-Pos
-get_target_double_size (void)
-{
-  return fp_prec_to_size (DOUBLE_TYPE_SIZE);
-}
-
-Pos
-get_target_long_double_size (void)
-{
-  return fp_prec_to_size (WIDEST_HARDWARE_FP_SIZE);
-}
-
 Pos
 get_target_pointer_size (void)
 {