]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ltconfig: chmod 644 before ranlib during install.
authorPeter O'Gorman <peter@pogma.com>
Tue, 4 Jul 2006 20:28:07 +0000 (20:28 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Tue, 4 Jul 2006 20:28:07 +0000 (20:28 +0000)
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
gcc/ChangeLog
gcc/mklibgcc.in
gcc/testsuite/gfortran.dg/actual_array_constructor_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/actual_array_substr_2.f90 [new file with mode: 0644]
libiberty/ChangeLog
libiberty/Makefile.in
ltconfig

index 5825fe64bc5f1721945d8d4a8334f7325d81c02d..22012362cda0a72c827b9c1bd468ee307f3397b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-07-04  Peter O'Gorman  <peter@pogma.com>
+
+       * ltconfig: chmod 644 before ranlib during install.
+
 2006-04-04  Alex Deiter  <tiamat@komi.mts.ru>
 
        PR bootstrap/27023
index 457ca82169325023a64c370e4f4ca12936ecf1bc..e1aeae105526d7e00922d7830ed8bc5974f33294 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-04  Peter O'Gorman  <peter@pogma.com>
+
+       * mklibgcc.in: chmod 644 before ranlib during install.
+
 2006-07-02  Roger Sayle  <roger@eyesopen.com>
 
        PR middle-end/27428
index 9146aa5bf4657124626bceefff9106ac1aba5eb3..de109dffefdd174b59b83eab8e4c581d75801886 100644 (file)
@@ -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 (file)
index 0000000..0a86b70
--- /dev/null
@@ -0,0 +1,34 @@
+! { 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
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 (file)
index 0000000..365557d
--- /dev/null
@@ -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  <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
index 1e23c929b242508f10f127db6630e95febadb2ed..c0f530990339bcde4ee1baa1f1bacced72477653 100644 (file)
@@ -1,3 +1,7 @@
+2006-07-04  Peter O'Gorman  <peter@pogma.com>
+
+       * Makefile.in: chmod 644 before ranlib during install.
+
 2006-03-09  Release Manager
 
        * GCC 4.0.3 released.
index b157eb648bb78f7aff496da6db6270eca9bb0476..11c4746c20568c8d53488160766dddbd070596b5 100644 (file)
@@ -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
 
index 53eb9421eab31f3c0155f79ad3a7b13d4d575980..79bdbad23edbd6e7e2641ae08fc823e1bb681e15 100755 (executable)
--- 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.