+2007-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ PR fortran/30399
+ * actual_array_constructor_2.f90 actual_array_substr_2.f90: Revert
+ accidental checkin of these testcases.
+
2006-12-03 Lee Millward <lee.millward@codesourcery.com>
PR c++/29022
+++ /dev/null
-! { dg-do run }
-! Tests the fix for pr28167, in which character array constructors\r
-! with an implied do loop would cause an ICE, when used as actual\r
-! arguments.
-!
-! Based on the testscase by Harald Anlauf <anlauf@gmx.de>
-!
- character(4), dimension(4) :: c1, c2\r
- integer m\r
- m = 4\r
-! Test the original problem\r
- call foo ((/( 'abcd',i=1,m )/), c2)\r
- if (any(c2(:) .ne. (/'abcd','abcd', &\r
- 'abcd','abcd'/))) call abort ()\r
-\r
-! Now get a bit smarter\r
- call foo ((/"abcd", "efgh", "ijkl", "mnop"/), c1) ! worked previously\r
- call foo ((/(c1(i), i = m,1,-1)/), c2) ! was broken\r
- if (any(c2(4:1:-1) .ne. c1)) call abort ()\r
-\r
-! gfc_todo: Not Implemented: complex character array constructors\r
- call foo ((/(c1(i)(i/2+1:i/2+2), i = 1,4)/), c2) ! Ha! take that..!
- if (any (c2 .ne. (/"ab ","fg ","jk ","op "/))) call abort ()
-\r
-! Check functions in the constructor\r
- call foo ((/(achar(64+i)//achar(68+i)//achar(72+i)// &\r
- achar(76+i),i=1,4 )/), c1) ! was broken\r
- if (any (c1 .ne. (/"AEIM","BFJN","CGKO","DHLP"/))) call abort ()\r
-contains\r
- subroutine foo (chr1, chr2)\r
- character(*), dimension(:) :: chr1, chr2\r
- chr2 = chr1\r
- end subroutine foo\r
-end
\ No newline at end of file
+++ /dev/null
-! { dg-do run }
-! Tests the fix for pr28174, in which the fix for pr28118 was
-! corrupting the character lengths of arrays that shared a
-! character length structure. In addition, in developing the
-! fix, it was noted that intent(out/inout) arguments were not
-! getting written back to the calling scope.
-!
-! Based on the testscase by Harald Anlauf <anlauf@gmx.de>
-!
-program pr28174\r
- implicit none\r
- character(len=12) :: teststring(2) = (/ "abc def ghij", &
- "klm nop qrst" /)\r
- character(len=12) :: a(2), b(2), c(2), d(2)
- integer :: m = 7, n\r
- a = teststring\r
- b = a\r
- c = a\r
- d = a
- n = m - 4
-
-! Make sure that variable substring references work.\r
- call foo (a(:)(m:m+5), c(:)(n:m+2), d(:)(5:9))\r
- if (any (a .ne. teststring)) call abort ()
- if (any (b .ne. teststring)) call abort ()
- if (any (c .ne. (/"ab456789#hij", &
- "kl7654321rst"/))) call abort ()
- if (any (d .ne. (/"abc 23456hij", &
- "klm 98765rst"/))) call abort ()\r
-contains\r
- subroutine foo (w, x, y)\r
- character(len=*), intent(in) :: w(:)\r
- character(len=*), intent(inOUT) :: x(:)\r
- character(len=*), intent(OUT) :: y(:)
- character(len=12) :: foostring(2) = (/"0123456789#$" , &
- "$#9876543210"/)
-! This next is not required by the standard but tests the
-! functioning of the gfortran implementation.\r
-! if (all (x(:)(3:7) .eq. y)) call abort ()
- x = foostring (:)(5 : 4 + len (x))
- y = foostring (:)(3 : 2 + len (y))
- end subroutine foo\r
-end program pr28174\r
-\r