donn@utah-gr.UUCP (Donn Seeley) (03/22/85)
I gave up trying to stay current with bug reports a long time ago -- it seems I have other things to do sometimes, like my job... But I still keep hacking at the f77 compiler. Here is a chunk of my bug log which describes some of the changes that have taken place since the last posted bug reports, with comments added to make the remarks less cryptic: ------------------------------------------------------------------------ fix for Peter Montgomery's bug with do 10 i = -i, i [if the loop variable appeared in the loop limit it had the value of the loop initializer instead of the original value] fix for Peter Montgomery's bug with -C and invalid subscripts [the compiler dumped core for bad constant subscripts] fix for Tom Quinn's trouble with -c vs. -o file [you now get an error message if you supply both flags] Mike Vevea's problem with undeclared variables [the constant folding code wanted to know their types; I ended up adding code to guess types when possible] Jerry Berkman's extensive grammar fixes [produce only one error message for gross errors in DO or EQUIVALENCE statements; close lots of loopholes with PARAMETER variables used as normal variables; stop generating parenthesis operators in constant expressions] A fix for Steve Caruso's PARAMETER errors [an error, not a warning, for setting PARAMETER variables to something other than a constant] Fixed Ravi Kulkarni's bug with optloop() [a memory management bug garbaged variables optimized out of loops] A fix for Peter Montgomery's error message bug [sometimes the file name printed as garbage] Fixed Steve Grandi's problem with putop() and conversions [f77 -i2 sometimes made bogus 'cvtll' instructions appear] Fixed Steve Grandi's problem with CSE and conversions [common subexpression elimination was not taking the type of expressions into account, hence some conversions with identical structure and different types were replaced] Added Jerry Berkman's fix to line buffer stderr [makes f77 run faster] Jerry Berkman's fix to prevent redimensioning of arrays [you can't inconsistently declare arrays any more] Fixes to pick up bad array declarations [allow only well-formed dimension bound expressions] fix to stop f77 from generating intermediate code after errors [prevent useless 'tag 5 in putx' messages] Fixed Tim Hopkins' bug with labeled PROGRAM statements (head & dcl) [who needs this? fixed it anyway] Fixed Tim Hopkins' bug with PARAMETER variables in output lists [needed length info to do unformatted I/O properly] Fixed bug in fix to mkexpr() that caused IMPLICIT to affect intrinsics [ouch! my fault -- it works better now (I promise!)] Changed stfcall() to remark on argument type clashes (Jerry Berkman) [statement function actuals are supposed to match the type of formals; convert and complain] Changed mkrealcon() and consconv() to shorten real constants (Jerry) [REAL constants were unexpectedly DOUBLE PRECISION] Fixed Steve Grandi's bug with character-to-integer conversions [it could convert variables but not expressions] Fixed Richard Wolff's bug with badly named common blocks [dereferenced a null pointer after detecting an error] Fixed bug that caused len() to be done inline only with -i2 Fixed bug in expand() which stopped concatenations from being collapsed [normally associative concatenations are handled with only one subroutine call] Changed buffpower() to use putpower() instead of mkpower() for exp > 64 [a more efficient way to handle ridiculous exponents] Gave in and added hack to mkexpr() to prevent 'ichar(c)-20' from bombing in consnegop -- i.e. no constant folding for TYUNKNOWN [constant folding is done before type classification, unfortunately; this shows why the type can't always be guessed] Richard Wolff's request for error messages for char to int conversions Fixed Tim Hopkins' memory management bug in startrw() [the compiler bombed for certain I/O statements because it freed some memory it still needed to use] SAVE statements (finally) save some labor [they used to be broken, were made to be useless, and now work] Added warnings for implicit conversions from character or address [a generalization of an earlier fix] Fixed Bjorn Bjornsson's bug with eqvcommon() breaking multi-level eqvs [equivalencing to something that was equivalenced to something which wasn't declared yet resulted in bad addresses for the objects -- the authors used minus where they meant plus] Made read-only the storage used for constants passed as function args [like VMS -- you can't change the value of 1 any more... this broke programs which read data into FORMAT statements (gack!) so we made an exception for them] Added Jerry Berkman's '-q' flag to make f77 shut up [he got tired of seeing 'foo: ... bar: ... etc.'] Jerry's fixes to stop 'movf/movd' when optimization is off (new) [floating point move instructions cause reserved operand faults for non-normalized operands -- people who equivalenced REAL and INTEGER data got core dumps when not optimizing; now we use integer moves instead] flag to c2 makes it act like f2 [f2 was almost identical to c2, except it possessed a hack to change floating moves to integer moves, and was missing most of the bug fixes to c2; I merged the code back together] Fixed bug in buffmnmx() introduced by cat/assign fixes [problems arising from the changes to make concatenations go directly into the lhs of an assignment instead of a temporary] Bumped version number in version.h (Jerry Berkman) Bug in equop() in c21.c allows c2 to throw away entry masks as well as common code (Richard Wolff) [blech! this affected functions with ENTRY points and very similar bodies under two entries] Fixes to entrystab() and enddcl() to make dbx recognize common vars [dbx was confused by too many symbol table entries for functions -- COMMON variables looked like they were in some nonexistent hence inaccessible function] Jerry Berkman's changes to precompile format statments [30% faster formatted I/O! Thanks, Jerry] Fixed f77 to use '/bin/cat' instead of just 'cat' (drivedefs.h, f77.c) [I ran f77 in a directory with a file named 'cat' one day] Changed the assignment/concatenation code again -- we do NOT copy the concatenation into a temporary; this fixes problems with nonconstant lhs lengths. (optim.c, put.c, putpcc.c) [I backed out the earlier change because I found that it made 'c1 = c2 // c1' do an absurd thing, but this broke assignments with variable length lhs's... the standard says that 'c1 = c2 // c1' is illegal anyway, so I put the earlier hack back in] Hacked Peter Montgomery's bug in register allocation where the wrong common variable in register is thought to have gone stale [prevented array elements in COMMON from being put in register due to difficulty in distinguishing instances of them] Added fix to let 'call f((1))' pass a temporary instead of a constant [helps out folks who modify constant arguments to functions] Put profiling routine arg in data space instead of constant space (JB) [another thing that broke when constants were made read-only] Arranged to make intrinsic functions have storage type STGINTR [optimizations for intrinsic functions were failing because the compiler was labelling them incorrectly internally] Fixed bug that did register rewriting on loop tests twice (and wrong!) [if a variable was in register in an outer loop and not an inner one, the loop test was wrong] Fixed bug that caused register updating and assignment to conflict ['a = f(a)' didn't work if 'a' was in register -- the register was updated for side effects AFTER the assignment was performed] Fixed safedim() so it complains about array references in dimension bound expressions (for Greg Woods) [if an array argument was dimensioned with an element from another array argument before the latter array was adjusted for 1-based addressing, we got it wrong; now I understand the wisdom of the standards committee in restricting dimension bound expressions...] Invented 'pcc.h', changed all pass 2 references to use its definitions [f77, C and pascal now get their intermediate code definitions from a commmon include file; there used to be 4 different places where opcodes were defined] Bob Corbett's ugly hack to prevent conflicts between register asst and subroutine call side effects in inner loops [the compiler now produces slower but correct code for loops as a result of our discovering ghastly design problems in the register allocator... anyone wanna write a register allocator?] Added hack to make implicit character->integer conversions copy more than 1 byte of the string (for Helge Skrivervik) [this still gets a warning] Fixed bugs with short logicals in the i/o library [the I/O library didn't realize logicals were short when compiled with -i2, and cheerfully clobbered objects which were unfortunate enough to be next to them] Fixed bugs with short integers and ASSIGN (error instead of warning) ['ASSIGN 10 TO I' is now an error if I is short] Made integer constants have the same default type as integers [produces better code for integers when -i2 is used and shuts up the compiler code that checks for type mismatches in (e.g.) statement functions] Fixed bug which caused all ASSIGNS to get 'implicit conversion' warns [dumb, dumb, dumb -- ASSIGN used to be an implicit conversion from type 'address' to type 'integer'; now it is an intrinsic conversion and doesn't get a complaint. my fault again] ------------------------------------------------------------------------ Machine-dependent inline functions still exist only in a prototype compiler; they probably won't become official unless I can find someone willing to make the effort to improve the assembler math library. Too bad -- program speed goes up a lot if trivial functions like nint() are no longer done with subroutines... I hope this list will tide you over until 4.3 BSD comes out, Donn Seeley University of Utah CS Dept donn@utah-cs.arpa 40 46' 6"N 111 50' 34"W (801) 581-5668 decvax!utah-cs!donn