aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-12-09 16:41:30 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2019-12-09 16:41:30 +0000
commit43c2de7a5720e0d6fbc5df8fc6fb03f2dbf164ff (patch)
tree2e8a6937054d054b20ce6263b5b6ca97962bdc3a /gcc/testsuite/gnat.dg
parent9b4c16f2c93a089d81c9e6f3ea6d1abc36fd1ad1 (diff)
downloadgcc-43c2de7a5720e0d6fbc5df8fc6fb03f2dbf164ff.zip
gcc-43c2de7a5720e0d6fbc5df8fc6fb03f2dbf164ff.tar.gz
gcc-43c2de7a5720e0d6fbc5df8fc6fb03f2dbf164ff.tar.bz2
tree.c (build_array_type_1): Add SET_CANONICAL parameter and compute TYPE_CANONICAL from the element type...
* tree.c (build_array_type_1): Add SET_CANONICAL parameter and compute TYPE_CANONICAL from the element type only if it is true. Remove a few obsolete lines and adjust recursive call. (fld_process_array_type): Adjust call to build_array_type_1. (build_array_type): Likewise. (build_nonshared_array_type): Likewise. From-SVN: r279133
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r--gcc/testsuite/gnat.dg/lto23.adb20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/lto23.adb b/gcc/testsuite/gnat.dg/lto23.adb
new file mode 100644
index 0000000..88615c9
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/lto23.adb
@@ -0,0 +1,20 @@
+-- { dg-do compile }
+-- { dg-options "-flto" { target lto } }
+
+procedure Lto23 (N : Natural) is
+
+ type Root is tagged null record;
+
+ type Vec is array (Positive range <>) of Root;
+
+ type Rec is record
+ V : Vec (1 .. N);
+ end record;
+
+ type Arr is array (Positive range <>) of Rec;
+
+ A : Arr (1 .. 4);
+
+begin
+ null;
+end;