🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Steven M. Schultz(Y) Thu, 29 Jun 1989 00:34
f77 equivalence bug +FIX
#4
Author: Steven M. Schultz(Y)
Date: Thu, 29 Jun 1989 00:34
55 lines
1919 bytes
Subject: bug in f77 equivalence handling
Index:	usr.bin/f77/equiv.c 2.10BSD

Description:
	/lib/f77pass1 gives "bad alignment forced by equivalence" error
	on many equivalence statements.

Repeat-By:
	Try to compile this program with f77:

	program	test
	real a(2),a1,a2
	equivalence (a(1),a1),(a(2),a2)
	end

	Note the errors produced for all variables mentioned in the
	equivalence statement.

Fix:
	It's yet another long vs. int gotcha, the lmin() and lmax()
	functions were not declared properly in eqveqv().

	Apply the following patch to equiv.c:

*** equiv.c.old	Tue Jun 27 19:57:21 1989
--- equiv.c	Tue Jun 27 19:54:24 1989
***************
*** 1,6 ****
--- 1,7 ----
  #include "defs"
  #include "string_defs"
  
+ extern ftnint iarrlen(), lmin(), lmax();
  /* ROUTINES RELATED TO EQUIVALENCE CLASS PROCESSING */
  
  /* called at end of declarations section to process chains
***************
*** 10,16 ****
  {
  register int i;
  int inequiv, comno, ovarno;
! ftnint comoffset, offset, leng, iarrlen(), lmin(), lmax();
  register struct equivblock *p;
  register struct eqvchain *q;
  struct primblock *itemp;
--- 11,17 ----
  {
  register int i;
  int inequiv, comno, ovarno;
! ftnint comoffset, offset, leng;
  register struct equivblock *p;
  register struct eqvchain *q;
  struct primblock *itemp;

-------------------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads