aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2018-07-31 09:56:10 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-07-31 09:56:10 +0000
commita6ed513cb809e1c0da0d021f35835ce0924954ca (patch)
tree2dec18cce2072a237168c7f6b152e200dc33f852 /gcc/ada
parenta7576e13569b4d6bce28c54ddb139a9119a713d8 (diff)
downloadgcc-a6ed513cb809e1c0da0d021f35835ce0924954ca.zip
gcc-a6ed513cb809e1c0da0d021f35835ce0924954ca.tar.gz
gcc-a6ed513cb809e1c0da0d021f35835ce0924954ca.tar.bz2
[Ada] Fix alignment of mutex_t and cond_t type on 32-bit SPARC/Solaris
The alignment of the couple of types from System.OS_Interface was wrongly set to 4 (32-bit) instead of 8 (64-bit) in 32-bit mode. 2018-07-31 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * libgnarl/s-osinte__solaris.ads (upad64_t): New private type. (mutex_t): Use it for 'lock' and 'data' components. (cond_t): Likewise for 'data' and use single 'flags' component. From-SVN: r263099
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/libgnarl/s-osinte__solaris.ads11
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 0d26bb5..eab50c1 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2018-07-31 Eric Botcazou <ebotcazou@adacore.com>
+
+ * libgnarl/s-osinte__solaris.ads (upad64_t): New private type.
+ (mutex_t): Use it for 'lock' and 'data' components.
+ (cond_t): Likewise for 'data' and use single 'flags' component.
+
2018-07-31 Justin Squirek <squirek@adacore.com>
* exp_ch5.adb (Make_Field_Assign): Force temporarily generated
diff --git a/gcc/ada/libgnarl/s-osinte__solaris.ads b/gcc/ada/libgnarl/s-osinte__solaris.ads
index 57d1d5c..8d53d63 100644
--- a/gcc/ada/libgnarl/s-osinte__solaris.ads
+++ b/gcc/ada/libgnarl/s-osinte__solaris.ads
@@ -536,17 +536,18 @@ private
end record;
pragma Convention (C, record_type_3);
+ type upad64_t is new Interfaces.Unsigned_64;
+
type mutex_t is record
flags : record_type_3;
- lock : String (1 .. 8);
- data : String (1 .. 8);
+ lock : upad64_t;
+ data : upad64_t;
end record;
pragma Convention (C, mutex_t);
type cond_t is record
- flag : array_type_9;
- Xtype : unsigned_long;
- data : String (1 .. 8);
+ flags : record_type_3;
+ data : upad64_t;
end record;
pragma Convention (C, cond_t);