diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-02-20 12:38:17 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-02-20 12:38:17 +0100 |
commit | 07aff4e355ed0d2c6a360a4d587855f4cec530de (patch) | |
tree | f949f270940fedf57d0de3d633bad5211ddc494e /gcc/ada/gcc-interface/decl.c | |
parent | 6b9861b12d076b262b86c69b1b5c30d779554384 (diff) | |
download | gcc-07aff4e355ed0d2c6a360a4d587855f4cec530de.zip gcc-07aff4e355ed0d2c6a360a4d587855f4cec530de.tar.gz gcc-07aff4e355ed0d2c6a360a4d587855f4cec530de.tar.bz2 |
[multiple changes]
2015-02-20 Yannick Moy <moy@adacore.com>
* sem_prag.ads: Minor typo in comment.
2015-02-20 Pascal Obry <obry@adacore.com>
* s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
2015-02-20 Vincent Celier <celier@adacore.com>
* makeutl.adb (Get_Directories.Add_Dir): Add a directory only
if it exists.
2015-02-20 Robert Dewar <dewar@adacore.com>
* sem_eval.ads: Minor reformatting.
2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
* freeze.adb (Size_Known): Do not set the packed size for
independent type or component.
(Freeze_Array_Type): Check for Independent[_Components] with packing
or explicit component size clause.
* gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
of independence pragmas only for non-GCC back-ends.
* sem_ch13.adb (Initialize): Likewise for the initialization.
* sem_prag.adb (Record_Independence_Check): New procedure to record an
independence check in the table.
(Analyze_Pragma): Use it throughout instead of doing it manually.
* gcc-interface/decl.c (gnat_to_gnu_field): Add support for
independent type or component.
2015-02-20 Thomas Quinot <quinot@adacore.com>
* adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
struct direct and readdir. This is required for NFS filesystems
mounted from servers that use 64-bit cookies.
2015-02-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
Build_Subprogram_Renaming, to create renaming of subprogram
instance in the the declaration of the wrapper package rather
than in its body, so that it is available for analysis of aspects
propagated from generic to instantiation.
(Check_Mismatch): An actual for a formal package that is an
incomplete type matches a formal type that is incomplete.
(Instantiate_Package_Body): Move code that builds subprogram
renaming to Analyze_Subprogram_Instantiation.
(Instantiate_Type): The generated subtype is a limited view if
the actual is a limited view.
(Load_Parent_Of_Generic): Retrieve instance declaration from
its new position within wrapper package.
2015-02-20 Arnaud Charlet <charlet@adacore.com>
* s-parame-vxworks.adb, s-os_lib.ads: Update comments.
2015-02-20 Robert Dewar <dewar@adacore.com>
* s-osinte-vxworks.ads (To_Timespec): Add comment about the
issue of negative arguments.
From-SVN: r220850
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 94043b6..c0ca2f3 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -6427,17 +6427,22 @@ gnat_to_gnu_field (Entity_Id gnat_field, tree gnu_record_type, int packed, bool definition, bool debug_info_p) { const Entity_Id gnat_field_type = Etype (gnat_field); - tree gnu_field_type = gnat_to_gnu_type (gnat_field_type); - tree gnu_field_id = get_entity_name (gnat_field); - tree gnu_field, gnu_size, gnu_pos; - bool is_aliased + const bool is_aliased = Is_Aliased (gnat_field); - bool is_atomic + const bool is_atomic = (Is_Atomic (gnat_field) || Is_Atomic (gnat_field_type)); - bool is_volatile + const bool is_independent + = (Is_Independent (gnat_field) || Is_Independent (gnat_field_type)); + const bool is_volatile = (Treat_As_Volatile (gnat_field) || Treat_As_Volatile (gnat_field_type)); - bool needs_strict_alignment - = (is_aliased || is_volatile || Strict_Alignment (gnat_field_type)); + const bool needs_strict_alignment + = (is_aliased + || is_independent + || is_volatile + || Strict_Alignment (gnat_field_type)); + tree gnu_field_type = gnat_to_gnu_type (gnat_field_type); + tree gnu_field_id = get_entity_name (gnat_field); + tree gnu_field, gnu_size, gnu_pos; /* If this field requires strict alignment, we cannot pack it because it would very likely be under-aligned in the record. */ @@ -6555,6 +6560,8 @@ gnat_to_gnu_field (Entity_Id gnat_field, tree gnu_record_type, int packed, s = "position of atomic field& must be multiple of ^ bits"; else if (is_aliased) s = "position of aliased field& must be multiple of ^ bits"; + else if (is_independent) + s = "position of independent field& must be multiple of ^ bits"; else if (is_volatile) s = "position of volatile field& must be multiple of ^ bits"; else if (Strict_Alignment (gnat_field_type)) @@ -6583,6 +6590,8 @@ gnat_to_gnu_field (Entity_Id gnat_field, tree gnu_record_type, int packed, s = "size of atomic field& must be ^ bits"; else if (is_aliased) s = "size of aliased field& must be ^ bits"; + else if (is_independent) + s = "size of independent field& must be at least ^ bits"; else if (is_volatile) s = "size of volatile field& must be at least ^ bits"; else if (Strict_Alignment (gnat_field_type)) @@ -6602,7 +6611,10 @@ gnat_to_gnu_field (Entity_Id gnat_field, tree gnu_record_type, int packed, { const char *s; - if (is_volatile) + if (is_independent) + s = "size of independent field& must be multiple of" + " Storage_Unit"; + else if (is_volatile) s = "size of volatile field& must be multiple of" " Storage_Unit"; else if (Strict_Alignment (gnat_field_type)) |