From: Thomas Koenig Date: Sun, 5 May 2019 13:53:24 +0000 (+0000) Subject: re PR fortran/90344 (small code that compiles and runs in 7.3.0 but not 7.4.1) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=89d1f77616cd3804969427b8a859d9cfd4bdb27c;p=gcc.git re PR fortran/90344 (small code that compiles and runs in 7.3.0 but not 7.4.1) 2019-05-05 Thomas Koenig PR fortran/90344 * gfortran.dg/pr90344.f90: New test. From-SVN: r270882 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7dbb8503981..19d593edef3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-05-05 Thomas Koenig + + PR fortran/90344 + * gfortran.dg/pr90344.f90: New test + 2019-05-03 Marc Glisse PR tree-optimization/90269 diff --git a/gcc/testsuite/gfortran.dg/pr90344.f90 b/gcc/testsuite/gfortran.dg/pr90344.f90 new file mode 100644 index 00000000000..9d74a402774 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr90344.f90 @@ -0,0 +1,25 @@ +! { dg-do compile } +! { dg-additional-options "-ffrontend-optimize" } +! PR 90344 - this used to ICE. +! Test case by Urban Jost. +module M_xterm +contains + elemental function func1(ch) result(res) + character,intent(in) :: ch + logical :: res + res=.true. + end function func1 + elemental function func2(ch) result(res) + character,intent(in) :: ch + logical :: res + res=.false. + end function func2 + pure function s2a(string) RESULT (array) + character(len=*),intent(in) :: string + character(len=1) :: array(len(string)) + forall(i=1:len(string)) array(i) = string(i:i) + end function s2a + subroutine sub1() + write(*,*)all(func1(s2a('ABCDEFG')).or.func2(s2a('ABCDEFG'))) + end subroutine sub1 +end module M_xterm