aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/self_aggregate_with_array.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gnat.dg/self_aggregate_with_array.adb')
-rw-r--r--gcc-4.9/gcc/testsuite/gnat.dg/self_aggregate_with_array.adb21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gnat.dg/self_aggregate_with_array.adb b/gcc-4.9/gcc/testsuite/gnat.dg/self_aggregate_with_array.adb
new file mode 100644
index 000000000..850e5deff
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gnat.dg/self_aggregate_with_array.adb
@@ -0,0 +1,21 @@
+-- { dg-do run }
+
+procedure self_aggregate_with_array is
+
+ type Value_Bounds is array (1 .. 2) of Natural;
+
+ type Sensor is record
+ Value : Natural;
+ Bounds : Value_Bounds;
+ end record;
+
+ Pressure : Sensor;
+
+begin
+ Pressure.Value := 256;
+ Pressure := (Value => Pressure.Value, Bounds => (1, 2));
+
+ if Pressure.Value /= 256 then
+ raise Program_Error;
+ end if;
+end;