From d972bae09cb9737f86d48ea57c4b50d470edad85 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 16 May 2016 11:33:01 +0000 Subject: [PATCH] decl.c (gnat_to_gnu_entity): Do not build a specific type for the object if it is deemed a constant. * gcc-interface/decl.c (gnat_to_gnu_entity) : Do not build a specific type for the object if it is deemed a constant. From-SVN: r236283 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/gcc-interface/decl.c | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 246c770..49c463a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 2016-05-16 Eric Botcazou + * gcc-interface/decl.c (gnat_to_gnu_entity) : Do not build + a specific type for the object if it is deemed a constant. + +2016-05-16 Eric Botcazou + * freeze.adb (Freeze_Record_Type): Extend pragma Implicit_Packing to components of any elementary types and of composite types. diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 8f2be23..b51200f 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -1437,9 +1437,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) = build_reference_type (TYPE_OBJECT_RECORD_TYPE (gnu_array)); } - if (const_flag) - gnu_type = change_qualified_type (gnu_type, TYPE_QUAL_CONST); - /* Convert the expression to the type of the object if need be. */ if (gnu_expr && initial_value_needs_conversion (gnu_type, gnu_expr)) gnu_expr = convert (gnu_type, gnu_expr); -- 2.7.4