home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / 3b1 / 3248 < prev    next >
Encoding:
Text File  |  1992-08-31  |  4.2 KB  |  131 lines

  1. Newsgroups: comp.sys.3b1
  2. Path: sparky!uunet!sun-barr!ames!pacbell.com!tandem!zorch!hico2!sonyd1.Broadcast.Sony.COM!blilly.UUCP!bruce
  3. From: bruce@blilly.UUCP (Bruce Lilly)
  4. Subject: Re: problems with some files on osu-cis (and gcc 1.40 bug)
  5. References: <1992Aug26.151626.10758@sonyd1.Broadcast.Sony.COM> <1992Aug28.010033.13663@ceilidh.beartrack.com> <1992Aug28.181132.11130@cco.caltech.edu>
  6. Organization: Bruce Lilly
  7. Date: Mon, 31 Aug 92 23:28:58 GMT
  8. Message-ID: <1992Aug31.232858.1963@blilly.UUCP>
  9. Lines: 120
  10.  
  11. In article <1992Aug28.181132.11130@cco.caltech.edu> andy@cs.caltech.edu (Andy Fyfe) wrote:
  12. >In article <1992Aug28.010033.13663@ceilidh.beartrack.com> dnichols@ceilidh.beartrack.com (Don Nichols (DoN.)) writes:
  13. >>In article <1992Aug26.151626.10758@sonyd1.Broadcast.Sony.COM> bruce@sonyd1.Broadcast.Sony.COM (Bruce Lilly) writes:
  14. >>>Some of the files on osu-cis seem to have been mangled.
  15. >>>Specifically, in ~/att7300/csvax
  16. >>>    perl-bin.tar.Z
  17. >>>    perl-man.tar.Z
  18. >>>    gnutar.Z
  19. >>
  20. >>    This sounds like the kind of behavior I have seen when I have
  21. >>forgotten to set the binary mode on ftp before the transfer.
  22. >
  23. >The copy of these files on uunet/OSU is bad.  Perhaps the "binary" option
  24. >was left off when the files were copied from ftp.cs.caltech.edu (in which
  25. >case all of the files in the csvax subdirectory are probably bad).
  26.  
  27. Some others seem to be OK (e.g. groff-bin.tar.Z, gcc2-bin.tar.Z).
  28.  
  29. >  Unfortunately,
  30. >there is no anonymous uucp access to the Caltech machine.
  31.  
  32. Any plans to change that?  Is there anonymous uucp access to a machine
  33. that has the ftp'able files [NR]FS-mounted?
  34.  
  35. By the way, there's a bug in the 3b1 version of gcc 1.40.
  36. Below is the bug report which I sent:
  37.  
  38. ----------------------------------------------------------------
  39. To: bug-gcc@prep.ai.mit.edu
  40. Reply-To: lilb@sony.compuserve.com
  41. Subject: bug in gcc version 1.40 for mc68k
  42.  
  43. Consider the following simple program which returns the position of the first '1'
  44. bit in an integer (in this case should return 2). 
  45.  
  46. int main()
  47. {
  48.     register int x = 4;
  49.     int i;
  50.  
  51.     for(i=0; i<8 && ((x&1) == 0); x >>= 1, i++) 
  52.         ;
  53.     return(i);
  54. }
  55.  
  56. When compiled by "gcc -v -O -S gcctest.c", the following results:
  57. gcc version 1.40
  58.  /usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dmc68k -Dunix -Dunixpc -D__mc68k__ -D__unix__ -D__unixpc__ -D__OPTIMIZE__ gcctest.c /usr/tmp/cca24532.cpp
  59. GNU CPP version 1.40
  60.  /usr/local/lib/gcc-cc1 /usr/tmp/cca24532.cpp -quiet -dumpbase gcctest.c -O -version -o gcctest.s
  61. GNU C version 1.40 (68k, AT&T UnixPC/gas) compiled by GNU C version 1.40.
  62. default target switches:
  63.     .file    "gcctest.c"
  64. gcc_compiled.:
  65. .text
  66.     .even
  67. .globl _main
  68. _main:
  69.     link a6,#0
  70.     movel d2,sp@-
  71.     moveq #4,d1
  72.     moveq #0,d0
  73. L5:
  74.     btst #0,d1
  75.     jne L3
  76.     asrl #1,d1
  77.     addql #1,d0
  78.     moveq #7,d2
  79.     cmpl d0,d2
  80.     jge L5
  81. L3:
  82.     movel a6@(-4),d2
  83.     unlk a6
  84.     rts
  85.  
  86. This works as expected (return value 2).  However, when the -fstrength-reduce flag is added, we get:
  87. gcc version 1.40
  88.  /usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dmc68k -Dunix -Dunixpc -D__mc68k__ -D__unix__ -D__unixpc__ -D__OPTIMIZE__ gcctest.c /usr/tmp/cca24537.cpp
  89. GNU CPP version 1.40
  90.  /usr/local/lib/gcc-cc1 /usr/tmp/cca24537.cpp -quiet -dumpbase gcctest.c -fstrength-reduce -O -version -o gcctest.s
  91. GNU C version 1.40 (68k, AT&T UnixPC/gas) compiled by GNU C version 1.40.
  92. default target switches:
  93.     .file    "gcctest.c"
  94. gcc_compiled.:
  95. .text
  96.     .even
  97. .globl _main
  98. _main:
  99.     link a6,#0
  100.     moveq #4,d1
  101.     moveq #7,d0
  102. L5:
  103.     btst #0,d1
  104.     jne L3
  105.     asrl #1,d1
  106.     dbra d0,L5
  107.     clrw d0
  108.     subql #1,d0
  109.     jcc L5
  110.     moveq #8,d0
  111. L3:
  112.     unlk a6
  113.     rts
  114.  
  115. This does not work properly (it returns 5, rather than 2).
  116.  
  117. Other compilation options (e.g. -fcombine-regs) do not appear to alter this behavior.
  118. I've not had any other problems with -fstrength-reduce, but it clearly causes major
  119. problems with the above code fragment (simplified from a real program).
  120. ----------------------------------------------------------------
  121.  
  122. I was informed that this bug will be fixed in version 1.41, "to
  123. be released soon".  I asked if that meant that there would be
  124. parallel releases in 1.xx and 2.xx, but received no response.
  125.  
  126. Andy, do you know if version 2 has the same bug, and do you plan
  127. to make a binary of 1.41 available after its release?
  128. -- 
  129.     Bruce Lilly        blilly!bruce@Broadcast.Sony.COM
  130.                     ...uunet!sonyusa!sonyd1!blilly!bruce
  131.