From a395b236c9161c7c85707491f978157dfeddf04c Mon Sep 17 00:00:00 2001 From: Peter O'Gorman Date: Tue, 4 Jul 2006 20:28:07 +0000 Subject: [PATCH] ltconfig: chmod 644 before ranlib during install. ChangeLog: * ltconfig: chmod 644 before ranlib during install. libiberty/ChangeLog: * Makefile.in: chmod 644 before ranlib during install. gcc/ChangeLog: * mklibgcc.in: chmod 644 before ranlib during install. From-SVN: r115185 --- ChangeLog | 4 ++ gcc/ChangeLog | 4 ++ gcc/mklibgcc.in | 4 ++ .../actual_array_constructor_2.f90 | 34 ++++++++++++++ .../gfortran.dg/actual_array_substr_2.f90 | 44 +++++++++++++++++++ libiberty/ChangeLog | 4 ++ libiberty/Makefile.in | 4 +- ltconfig | 2 +- 8 files changed, 97 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/actual_array_constructor_2.f90 create mode 100644 gcc/testsuite/gfortran.dg/actual_array_substr_2.f90 diff --git a/ChangeLog b/ChangeLog index 5825fe64bc5f..22012362cda0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-07-04 Peter O'Gorman + + * ltconfig: chmod 644 before ranlib during install. + 2006-04-04 Alex Deiter PR bootstrap/27023 diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 457ca8216932..e1aeae105526 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2006-07-04 Peter O'Gorman + + * mklibgcc.in: chmod 644 before ranlib during install. + 2006-07-02 Roger Sayle PR middle-end/27428 diff --git a/gcc/mklibgcc.in b/gcc/mklibgcc.in index 9146aa5bf465..de109dffefdd 100644 --- a/gcc/mklibgcc.in +++ b/gcc/mklibgcc.in @@ -795,12 +795,15 @@ for ml in $MULTILIBS; do ldir='$(DESTDIR)$(libsubdir)' fi echo ' $(INSTALL_DATA)' ${dir}/libgcc.a ${ldir}/ + echo ' chmod 644' ${ldir}/libgcc.a echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc.a echo ' $(INSTALL_DATA)' ${dir}/libgcov.a ${ldir}/ + echo ' chmod 644' ${ldir}/libgcov.a echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcov.a if [ "$SHLIB_LINK" ]; then echo ' $(INSTALL_DATA)' ${dir}/libgcc_eh.a ${ldir}/ + echo ' chmod 644' ${ldir}/libgcc_eh.a echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a shlib_slibdir_qual= @@ -819,6 +822,7 @@ for ml in $MULTILIBS; do -e "s%@shlib_slibdir_qual@%$shlib_slibdir_qual%g" libunwinddir='$(DESTDIR)$(slibdir)$(shlib_slibdir_qual)/$(shlib_dir)' echo ' $(INSTALL_DATA)' ${dir}/libunwind.a ${libunwinddir}/ + echo ' chmod 644' ${dir}/libunwind.a echo ' $(RANLIB_FOR_TARGET)' ${libunwinddir}/libunwind.a fi fi diff --git a/gcc/testsuite/gfortran.dg/actual_array_constructor_2.f90 b/gcc/testsuite/gfortran.dg/actual_array_constructor_2.f90 new file mode 100644 index 000000000000..0a86b70d7bf1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/actual_array_constructor_2.f90 @@ -0,0 +1,34 @@ +! { dg-do run } +! Tests the fix for pr28167, in which character array constructors +! with an implied do loop would cause an ICE, when used as actual +! arguments. +! +! Based on the testscase by Harald Anlauf +! + character(4), dimension(4) :: c1, c2 + integer m + m = 4 +! Test the original problem + call foo ((/( 'abcd',i=1,m )/), c2) + if (any(c2(:) .ne. (/'abcd','abcd', & + 'abcd','abcd'/))) call abort () + +! Now get a bit smarter + call foo ((/"abcd", "efgh", "ijkl", "mnop"/), c1) ! worked previously + call foo ((/(c1(i), i = m,1,-1)/), c2) ! was broken + if (any(c2(4:1:-1) .ne. c1)) call abort () + +! gfc_todo: Not Implemented: complex character array constructors + 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 () + +! Check functions in the constructor + call foo ((/(achar(64+i)//achar(68+i)//achar(72+i)// & + achar(76+i),i=1,4 )/), c1) ! was broken + if (any (c1 .ne. (/"AEIM","BFJN","CGKO","DHLP"/))) call abort () +contains + subroutine foo (chr1, chr2) + character(*), dimension(:) :: chr1, chr2 + chr2 = chr1 + end subroutine foo +end \ No newline at end of file diff --git a/gcc/testsuite/gfortran.dg/actual_array_substr_2.f90 b/gcc/testsuite/gfortran.dg/actual_array_substr_2.f90 new file mode 100644 index 000000000000..365557d6f57d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/actual_array_substr_2.f90 @@ -0,0 +1,44 @@ +! { 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 +! +program pr28174 + implicit none + character(len=12) :: teststring(2) = (/ "abc def ghij", & + "klm nop qrst" /) + character(len=12) :: a(2), b(2), c(2), d(2) + integer :: m = 7, n + a = teststring + b = a + c = a + d = a + n = m - 4 + +! Make sure that variable substring references work. + call foo (a(:)(m:m+5), c(:)(n:m+2), d(:)(5:9)) + 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 () +contains + subroutine foo (w, x, y) + character(len=*), intent(in) :: w(:) + character(len=*), intent(inOUT) :: x(:) + 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. +! if (all (x(:)(3:7) .eq. y)) call abort () + x = foostring (:)(5 : 4 + len (x)) + y = foostring (:)(3 : 2 + len (y)) + end subroutine foo +end program pr28174 + diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 1e23c929b242..c0f530990339 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,7 @@ +2006-07-04 Peter O'Gorman + + * Makefile.in: chmod 644 before ranlib during install. + 2006-03-09 Release Manager * GCC 4.0.3 released. diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in index b157eb648bb7..11c4746c2056 100644 --- a/libiberty/Makefile.in +++ b/libiberty/Makefile.in @@ -275,7 +275,7 @@ install: install_to_$(INSTALL_DEST) install-subdir install_to_libdir: all ${mkinstalldirs} $(DESTDIR)$(libdir)$(MULTISUBDIR) $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n - ( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n ) + ( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ) mv -f $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB) if test -n "${target_header_dir}"; then \ case "${target_header_dir}" in \ @@ -297,7 +297,7 @@ MULTIOSDIR = `$(CC) $(LIBCFLAGS) -print-multi-os-directory` install_to_tooldir: all ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n - ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; $(RANLIB) $(TARGETLIB)n ) + ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n; $(RANLIB) $(TARGETLIB)n ) mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB) @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install diff --git a/ltconfig b/ltconfig index 53eb9421eab3..79bdbad23edb 100755 --- a/ltconfig +++ b/ltconfig @@ -626,7 +626,7 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + old_postinstall_cmds="~$old_postinstall_cmds~\$RANLIB \$oldlib" fi # Source the script associated with the $tagname tag configuration. -- 2.47.2