Date: Mon, 15 Mar 1999 14:49:57 +0100 (MET) From: "Jacek M. Holeczek" X-Sender: holeczek AT uranos DOT cto DOT us DOT edu DOT pl To: pgcc AT delorie DOT com, info AT foyer DOT se Subject: g77 boolean functions problems Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: pgcc AT delorie DOT com Hi, Please note that there seems to be a bug in g77 boolean functions : -------------------------------------------------------------------------- integer*4 ibol,ibol1,ipas,ipas1 ibol = '87654321'x print'(z8)',ibol ibol1 = 'ffffffff'x print'(z8)',ibol1 ipas=iand(ibol,ibol1) print'(z8)',ipas ipas1=ishft(ipas,-8) print'(z8)',ipas1 stop end -------------------------------------------------------------------------- Wrong output from "g77 -g" { g77 version pgcc-2.91.60 19981201 (egcs-1.1.1 release) (from FSF-g77 version 0.5.24-19980804) } : -------------------------------------------------------------------------- 87654321 FFFFFFFF 21 0 -------------------------------------------------------------------------- In both cases ( iand, ishft ) only the least significant BYTE is taken into account ( instead of the whole integer ). Correct output from "fort77" : -------------------------------------------------------------------------- 87654321 FFFFFFFF 87654321 876543 -------------------------------------------------------------------------- Best regards, Jacek. P.S. Please answer directly to me, I'm not on your list. Thanks in advance, Jacek.