From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id E56DB3858C60; Sun, 19 Dec 2021 23:42:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E56DB3858C60 Received: by mail-wr1-x435.google.com with SMTP id s1so11124415wra.6; Sun, 19 Dec 2021 15:42:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hBV3K8q57bmCAAJj0FF+Uv+T6ZslQ/LPx6YXnlW2qMY=; b=UOh8F3gB7BAEzP6AVabQpYw+6ONCqQA/d673CYEYNH+JXRAd8j4wEp/KlHYNdxZxuT PR1NkT7O+o2tFH4Dt+T9CzwAGPdNG5JWnqkpOkZbaYP05Pu1bjxx6KpkL6iQOzraFXPY DQwEvMktgfb9Se05iL7GKeHK4cUCOXzUbbfBJMTA2CJ6I+l9v7O/lEfcefKmAMITc/5n PyOcThGB3k854iAl+SXWo4bKQAxZoQy32+Vii8ll3f/+D99/Vb5ezDFC2EqeiJXusXJ6 9KKLhAbvS1cvCUvD9YtKmA3NqmuBvos7eGg8SVi61NTlHsXpe3G1nzgRTa3fUk5SGiIy OofQ== X-Gm-Message-State: AOAM532Ttjsspy0pd8i2kX+XtelKw35ICyn4j1Ai0jirI2YLT4kHVjiy co2BZKwBqPRLtbOetyPn9No= X-Google-Smtp-Source: ABdhPJwly1yDN5b68odM1Awj4FaTghoCpkIekPAFqPinArmYrZBr2zbJm8cj8BFb8eM9FXyxByu2Ww== X-Received: by 2002:adf:ee4a:: with SMTP id w10mr11201364wro.232.1639957334940; Sun, 19 Dec 2021 15:42:14 -0800 (PST) Received: from smtpclient.apple ([2a01:e34:ec28:8cb0:c4a8:8a63:d59a:c5a5]) by smtp.gmail.com with ESMTPSA id l13sm4299169wms.1.2021.12.19.15.42.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Dec 2021 15:42:14 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) Subject: Re: [patch, Fortran] Make REAL(KIND=16) detection more robust From: FX In-Reply-To: <2bd8fb54-462c-228a-b002-35f7cf4d080d@netcologne.de> Date: Mon, 20 Dec 2021 00:42:13 +0100 Cc: fortran@gcc.gnu.org, Iain Sandoe , gcc-patches@gcc.gnu.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <8CA66B79-11B1-40B2-B361-F8835EF4DF1B@gmail.com> <2bd8fb54-462c-228a-b002-35f7cf4d080d@netcologne.de> To: Thomas Koenig X-Mailer: Apple Mail (2.3693.40.0.1.81) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2021 23:42:17 -0000 Hi Thomas, > I am not sure the logic is correct for POWER (old style) where we have > a 16-byte long double made up from two 8-byte doubles, which is not > __float128 (IFmode) As written, the patch should be a no-op for existing platforms. I know = about the ppc double-double "long double" type, and I think it works. = (If it is actually broken, please let me know how, I=E2=80=99ll improve = the patch.) If we follow the logic of mk-kinds-h.sh: - it will loop over real kinds, and reach kind=3D16 - [ $long_double_kind -eq 10 ] is false, so we go to the second block - we define the following: > ctype=3D"long double" > cplxtype=3D"complex long double" > suffix=3D"l" > + echo "#define GFC_REAL_16_IS_LONG_DOUBLE" which is true. > I have a proposal: Since I am currently trying to unravel this > on the power-ieee128 branch, I would like to take this on, > if that is fine with you. I=E2=80=99m not opposed, but I=E2=80=99d really like to get this into = the current branch. It is a much less invasive change than the = power-ieee128 work. The only case I changed is the case where there is a = kind 16, and there is a long double, but the long double is neither kind = 10 neither kind 16. I don=E2=80=99t think there is such a platform = currently (otherwise it wouldn=E2=80=99t have worked). Best, FX=