From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67834 invoked by alias); 4 Oct 2018 16:20:57 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 67822 invoked by uid 89); 4 Oct 2018 16:20:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=latter, H*f:sk:9A8B6E3, H*i:sk:9A8B6E3, Hx-spam-relays-external:esmtpa X-HELO: ppsw-31.csi.cam.ac.uk Received: from ppsw-31.csi.cam.ac.uk (HELO ppsw-31.csi.cam.ac.uk) (131.111.8.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Oct 2018 16:20:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cam.ac.uk; s=20180806.ppsw; h=Sender:Content-Type:Mime-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=cHHuCzHY71WRuJBRvDSso1wkAHr5dG7Fh0TDIRgs6dc=; b=IClBshvaPGAgKiU05rzgG3otea COKoDJOXSkMlcF1ruV8JcWa8FZx/rBFY2j35XChnr12xL0UB39Bp/0QAAOFrXSTjtstOR9U6O4lAc PV/TMWxh/1D5NZQYgB2JwbN+pbGtbQV67/dlF+VLchwkwGKzEMU2WHJYikJ8wEFQPKbI=; Received: from hermes-2.csi.cam.ac.uk ([131.111.8.54]:60544) by ppsw-31.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:25) with esmtpa (EXTERNAL:nmm1) id 1g86Mu-000uOB-Lo (Exim 4.91) (return-path ); Thu, 04 Oct 2018 17:20:52 +0100 Received: from prayer by hermes-2.csi.cam.ac.uk (hermes.cam.ac.uk) with local (PRAYER:nmm1) id 1g86Mu-00075n-OK (Exim 4.91) (return-path ); Thu, 04 Oct 2018 17:20:52 +0100 Received: from [51.6.55.214] by old-webmail.hermes.cam.ac.uk with HTTP (Prayer-1.3.5); 04 Oct 2018 17:20:52 +0100 Date: Thu, 04 Oct 2018 16:20:00 -0000 From: "N.M. Maclaren" To: Paul Koning Cc: Richard Biener , "fortran@gcc.gnu.org" Subject: Re: Target control of Fortran options Message-ID: In-Reply-To: <9A8B6E3D-D56C-45D0-93AE-8ED9EB0ADE1A@comcast.net> References: <984F5B1C-CAFB-4131-A90F-3805D674857B@comcast.net> <01899EC4-4F6C-4592-AFB6-D29DA79F1BCB@comcast.net> <9A8B6E3D-D56C-45D0-93AE-8ED9EB0ADE1A@comcast.net> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 Sender: "N.M. Maclaren" X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00017.txt.bz2 On Oct 4 2018, Paul Koning wrote: >> >> If you don't have a 4-byte REAL, why do you make default REAL 4 bytes? >> Do you mean that the front-end code assumes that it is? In which case, >> I would say that it's a clear design bug! If not, why not just set it to >> your basic floating type? > > That's what I expected and apparently I'm not the only one. But the > actual code says that the default REAL is the 4 byte one, and if the > compiler doesn't supply a float type of that size, the compiler crashes > at startup. That's a design mistake, though I can see how it happened. You do mean 4 byte, and not just REAL*4, though? If the latter, you can just make REAL*4 mean your default real and have done with it! As I said, that number is not always the size in bytes :-) > Janne raises an interesting point, about Fortran requirements of int and > float and double sizes that I was not aware of. Given those, it seems > that the correct answer is to do the more traditional thing where "float" > (REAL) is SFmode, 4 bytes -- always. In other words, make -mfloat32 be > the only operating mode and retire that switch. Not necessarily. Another option is to simply pad default INTEGER and DOUBLE PRECISION - that's a common solution, and fully conforming. But I don't know how hard that would be to do. It's not relevant to the PDP11, but a lot of people feel that the correct defaults for the modern world are 8 byte default integer and real, and 16 byte double precision. Regards, Nick Maclaren.