f77 bug in IIOR ?

John D Mccalpin mccalpin at vax1.acs.udel.EDU
Mon Jun 11 11:35:40 AEST 1990


I just noticed that the IIOR function generates an AND operation
in the following code!

	integer*2 i1,i2,i3
	i1 = 8
	i2 = 512
	i3 = iior(i1.i2)
	print *,i3
	end

Thus code gives a result of zero!
I looked at the code, and there is an AND in there instead of an OR.
Switching to IOR gives the correct result....
-- 
John D. McCalpin                               mccalpin at vax1.udel.edu
Assistant Professor                            mccalpin at delocn.udel.edu
College of Marine Studies, U. Del.             mccalpin at scri1.scri.fsu.edu



More information about the Comp.sys.sgi mailing list