aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2017-11-10 08:21:05 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2017-11-10 08:21:05 +0000
commit4896b86556f8d2149fae8e8dc27a93332b9482e2 (patch)
tree9fa6c392e31b8c052f90d7b9aa005e493870b47d /gcc/testsuite
parent35b9d8e7695aa37563293217aefb3a606b72f131 (diff)
downloadgcc-4896b86556f8d2149fae8e8dc27a93332b9482e2.zip
gcc-4896b86556f8d2149fae8e8dc27a93332b9482e2.tar.gz
gcc-4896b86556f8d2149fae8e8dc27a93332b9482e2.tar.bz2
utils.c (convert): Add comment and do not fall through to the next case.
* gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do not fall through to the next case. <ARRAY_TYPE>: Deal specially with a dereference from another array type with the same element type. From-SVN: r254618
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gnat.dg/opt69.adb28
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f50bee7..0de4f7b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2017-11-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt69.adb: New test.
+
2017-11-10 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/82913
diff --git a/gcc/testsuite/gnat.dg/opt69.adb b/gcc/testsuite/gnat.dg/opt69.adb
new file mode 100644
index 0000000..e8c94da
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt69.adb
@@ -0,0 +1,28 @@
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+with Ada.Text_IO;
+
+procedure Opt69 is
+
+ procedure Inner
+ (A : String := (1 .. 15 => ASCII.NUL);
+ B : String := (1 .. 5 => ASCII.NUL);
+ C : String := (1 .. 5 => ASCII.NUL))
+ is
+ Aa : String (1 .. 15);
+ Bb : String (1 .. 5);
+ Cc : String (1 .. 5);
+ begin
+ Aa := A;
+ Bb := B;
+ Cc := C;
+
+ Ada.Text_IO.Put_Line (Aa);
+ Ada.Text_IO.Put_Line (Bb);
+ Ada.Text_IO.Put_Line (Cc);
+ end;
+
+begin
+ Inner;
+end;