From a52fcfac0a9621e4ee5345272873d96f55ad3d18 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Fri, 4 Jan 2019 10:42:12 +0000 Subject: [PATCH] re PR fortran/48543 (Collapse identical strings) 2019-01-04 Thomas Koenig PR fortran/48543 * gfortran.dg/const_chararacter_merge.f90: Actually remove. * gfortran.dg/merge_char_const.f90: Restore. From-SVN: r267572 --- gcc/testsuite/ChangeLog | 6 ++++++ .../gfortran.dg/const_chararacter_merge.f90 | 11 ----------- gcc/testsuite/gfortran.dg/merge_char_const.f90 | 13 +++++++++++++ 3 files changed, 19 insertions(+), 11 deletions(-) delete mode 100644 gcc/testsuite/gfortran.dg/const_chararacter_merge.f90 create mode 100644 gcc/testsuite/gfortran.dg/merge_char_const.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 47fabcce520..a86473e5299 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-01-04 Thomas Koenig + + PR fortran/48543 + * gfortran.dg/const_chararacter_merge.f90: Actually remove. + * gfortran.dg/merge_char_const.f90: Restore. + 2019-01-04 Jakub Jelinek 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 index 47df5626d4a..00000000000 --- a/gcc/testsuite/gfortran.dg/const_chararacter_merge.f90 +++ /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 index 00000000000..32c87f51000 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/merge_char_const.f90 @@ -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 +! + integer, dimension(6) :: i = (/1,0,0,1,1,0/) + print '(6a1)', Merge ("a", "b", i == 1) ! { dg-output "abbaab" } + end + + -- 2.30.2