From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13059 invoked by alias); 16 Dec 2002 22:47:13 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 13007 invoked from network); 16 Dec 2002 22:47:11 -0000 Received: from unknown (HELO book.moene.indiv.nluug.nl) (195.109.255.217) by sources.redhat.com with SMTP; 16 Dec 2002 22:47:11 -0000 Received: from local ([127.0.0.1] helo=moene.indiv.nluug.nl) by book.moene.indiv.nluug.nl with esmtp (Exim 3.36 #1 (Debian)) id 18O41T-0001sJ-00; Mon, 16 Dec 2002 23:47:39 +0100 Message-ID: <3DFE57E1.7020909@moene.indiv.nluug.nl> Date: Mon, 16 Dec 2002 14:48:00 -0000 From: Toon Moene Organization: Moene Computational Physics, Maartensdijk, The Netherlands User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.0.0) Gecko/20020622 Debian/1.0.0-0.woody.1 MIME-Version: 1.0 To: Richard Henderson CC: gcc@gcc.gnu.org Subject: Re: possible gcse failure: not able to eliminate redundant loads References: <20021213093054.GA29293@redhat.com> <3DFA4252.3060309@moene.indiv.nluug.nl> <20021216180441.C3953@redhat.com> <3DFE3FC1.9020802@moene.indiv.nluug.nl> <20021216211245.F4851@redhat.com> <3DFE5562.6030608@moene.indiv.nluug.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-12/txt/msg00954.txt.bz2 Toon Moene wrote: > Richard Henderson wrote: > >> On Mon, Dec 16, 2002 at 10:04:01PM +0100, Toon Moene wrote: >> >>> BTW, I wasn't aware it's legal to dereference NULL C pointers. >> It isn't, of course. But that's the whole point. You've >> got code that says >> >> x = (condition ? *p : 0); >> >> i.e. the dereference is protected by a conditional. Oh, wait, I see what you mean: x = (p ? *p : 0); Yes, that's impossible to express in Fortran (90/95/F2K), hence we don't have to worry about it. [ The way to do this in Fortran is to write: IF (ASSOCIATED(P)) THEN .... USE P ELSE .... BETTER KEEP YOUR PAWS OFF .... ENDIF ] -- Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290 Saturnushof 14, 3738 XG Maartensdijk, The Netherlands Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)