re PR fortran/48543 (Collapse identical strings)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 4 Jan 2019 10:42:12 +0000 (10:42 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 4 Jan 2019 10:42:12 +0000 (10:42 +0000)
2019-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/48543
    * gfortran.dg/const_chararacter_merge.f90: Actually remove.
    * gfortran.dg/merge_char_const.f90: Restore.

From-SVN: r267572

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/const_chararacter_merge.f90 [deleted file]
gcc/testsuite/gfortran.dg/merge_char_const.f90 [new file with mode: 0644]

index 47fabcce52045189f7edbd79e82b4947a67995ba..a86473e52997d484beeabbaa146a6a3e8158eb65 100644 (file)
@@ -1,3 +1,9 @@
+2019-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       PR fortran/48543
+       * gfortran.dg/const_chararacter_merge.f90: Actually remove.
+       * gfortran.dg/merge_char_const.f90: Restore.
+
 2019-01-04  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/88594
diff --git a/gcc/testsuite/gfortran.dg/const_chararacter_merge.f90 b/gcc/testsuite/gfortran.dg/const_chararacter_merge.f90
deleted file mode 100644 (file)
index 47df562..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-! { dg-do compile }
-! { dg-options "-Os" }
-! PR 48543
-program main
-  character(len=17) :: a
-  character(len=34) :: b
-  a = 'Supercalifragilis'
-  b = 'Supercalifragilisticexpialidocious'
-  print *,a," ",b
-end program main
-! { dg-final { scan-assembler-times "Supercalifragilis" 1 } }
diff --git a/gcc/testsuite/gfortran.dg/merge_char_const.f90 b/gcc/testsuite/gfortran.dg/merge_char_const.f90
new file mode 100644 (file)
index 0000000..32c87f5
--- /dev/null
@@ -0,0 +1,13 @@
+! { dg-do run }
+! { dg-options "-O0" }
+! This tests the patch for PR24311 in which the PRINT statement would
+! ICE on trying to print a MERGE statement with character constants
+! for the first two arguments.
+!
+! Contributed by Paul Thomas <pault@gcc.gnu.org>
+!
+  integer, dimension(6) :: i = (/1,0,0,1,1,0/)
+  print '(6a1)', Merge ("a", "b", i  == 1) ! { dg-output "abbaab" }
+  end
+
+