From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 0E2AF3858C62 for ; Thu, 4 Apr 2024 21:41:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0E2AF3858C62 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0E2AF3858C62 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::429 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712266900; cv=none; b=kurZHUV0Kv01HpSe7XR7f1hdV+IVuVxT4XqN1HK7uj6cn1FDoCR2JZJMrHHdlkgDNm5Aa/CLKOclwrnMVIytV6K6A7XZB7dDF+ulB8sO9P5MabFwq5kFg0cWKub16AoDXTVvuEtBTBKGp7xhnujr9d5WSAjrpFiqDqYm5CHO980= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712266900; c=relaxed/simple; bh=s9UP7jUH4ThurwkiZPXD72tAwl8BPsCpf3dr2Bk1jNU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=kA3eTSftLlGx0kFpQEswOkugKxoj16eTOWGI2rU/V5fR8vnBB7wx8C/zZSxrX6rbqRyG/ayoVzqI526vEdsvSPiewPEKzKXVdhJwbm+peGtQEKVFo3zUXvpA2M3qt95VF6ZWXeogpunWo5cZKlpPrECJL0T4js1MUcPnn7ABZuM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-343cfe8cae1so444773f8f.3 for ; Thu, 04 Apr 2024 14:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1712266897; x=1712871697; darn=gcc.gnu.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=2D4fLWxULWmb7Bn1QOOC0PkxJMU5d2gDKT3CgQsiW8Y=; b=TyMd20fWMAGs50cnRsG3Zl/DYVwksknvjlOPWN/HulxaDPdzxxjRd95sJFRGICuHxj hJ8r567PezCiFRVomtzrVVENK+RsfcvFsPNyGiRU7O+PbskNFmAfQfy2zldy9OH9dHv7 c6L1ywYc9/VDTCGvB293Cy7MIHU/fZim73BU7w0iMS6Z+kXFUeK9ubw9mfK9aXQQGx9h UOwfOnS0zIEvMHuqdxeRpETzu+A7bOwONiqbNxf2Thp7aK81125eUriODkh+wL8ezIbV Rk3Vh5kiwVu4vef8yH71rMoua3LO8nTEU5ttzhU8OPTXU2dE7s0Nfrc9FaLIH5tqJiIp Awcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712266897; x=1712871697; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=2D4fLWxULWmb7Bn1QOOC0PkxJMU5d2gDKT3CgQsiW8Y=; b=wuy1eOqObB1qS0qc1iYMThZ0rJcMaJSjnfdku86bOKdkU0qUQtQjKz+FzVsWgtFfyd IPmskrKx8DcArG2rTt5aFzVBB9ak7Co29V7mmz5tTD2DCg+bOsDSgUhrqFSkhz2lxBWk eLK3Ln3WCKDWBn76K01F51H3iBywn96WmXs4xUrQ+ZyOqQ4CLXCCUmdVpNv1wRR3iqb2 tmWhD3bsoUr/146vPLA99vn3TbuMmFUq31CUPVhvdESxk/GvAs3ZNaXzf9YGSZ1trAk/ cR18cnvZzbH2SfQo7bin6TmciT4//gsSKCfI+A830fDfqZMAdELRtdmr2wl9SOaiV6hY bvrw== X-Forwarded-Encrypted: i=1; AJvYcCUF0sr3i48zG8GZvamSXXTLq/UqkkU9m9AnUlr7TSQ1oG42cuQnPVbMcGFLPBdXr6J3n638Yw81T+apdrroWSKFqxyz X-Gm-Message-State: AOJu0YzsQHxwfqv3mrxt41s4AuA0gvaLefOJ6ULKrgKgzuEYDqEUqpZI +VrQUvZ/Yg6X3d5PEWAr6XSFz2haxO24TLDJB2HLav/DcBT3n4UZc1Giu9PrLHI= X-Google-Smtp-Source: AGHT+IEpaKgPBJh5M67t6swqEkWQb1yEMj+LgXU8Wbvgs/ICC7IqsiFNdZaiOeYK/2V4NkxSjMWnYw== X-Received: by 2002:a05:6000:1248:b0:343:85f5:63f1 with SMTP id j8-20020a056000124800b0034385f563f1mr511705wrx.40.1712266896575; Thu, 04 Apr 2024 14:41:36 -0700 (PDT) Received: from ?IPV6:2001:16b8:2ae1:f200:2a4:4500:1274:6663? (200116b82ae1f20002a4450012746663.dip.versatel-1u1.de. [2001:16b8:2ae1:f200:2a4:4500:1274:6663]) by smtp.gmail.com with ESMTPSA id f13-20020adfdb4d000000b00341c6b53358sm336198wrj.66.2024.04.04.14.41.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Apr 2024 14:41:36 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------2cfQf90gubp8MxaYQnk6rMUF" Message-ID: <15a39ada-c7fc-433d-ab39-19b897a8a3e8@baylibre.com> Date: Thu, 4 Apr 2024 23:41:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: =?UTF-8?Q?Re=3A_=5Bpatch=2C_libgfortran=5D_PR114304_-_=5B13/14_Regr?= =?UTF-8?Q?ession=5D_libgfortran_I/O_=E2=80=93_bogus_=22Semicolon_not_allowe?= =?UTF-8?Q?d_as_separator_with_DECIMAL=3D=27point=27=22?= To: Jerry D , gfortran Cc: gcc-patches References: <9a848b89-ee95-44f7-8491-cbe22804edf4@gmail.com> Content-Language: en-US From: Tobias Burnus In-Reply-To: X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This is a multi-part message in MIME format. --------------2cfQf90gubp8MxaYQnk6rMUF Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Jerry, I think for the current testcases, I like the patch – the question is only what's about:   ',3' as input for 'comma'   (or '.3' as input for 'point') For 'point' – 0.3 is read and ios = 0 (as expected) But for 'comma': * GCC 12 reads nothing and has ios = 0. * GCC 13/mainline has an error (ios != 0 – and reads nothing) * GCC with your patch: Same result: ios != 0 and nothing read. Expected: Same as with ','/'comma' – namely: read-in value is 0.3. → https://godbolt.org/z/4rc8fz4sT for the full example, which works with ifort, ifx and flang * * * Can you check and fix this? It looks perfectly valid to me to have remove the '0' in the floating point numbers '0.3' or '0,3' seems to be permitted – and it works for '.' (with 'point') but not for ',' (with 'comma'). F2023's "13.10.3.1 List-directed input forms" refers to "13.7.2.3.2 F editing", which states: "The standard form of the input field [...] The form of the mantissa is an optional sign, followed by a string of one or more digits optionally containing a decimal symbol." The latter does not require that the digit has to be before the decimal sign and as for output, it is optional, it is surely intended that ",3" is a valid floating-point number for decimal='comma'. * * * I extended the testcase to check for this – see attached diff. All 'point' work, all 'comma' fail. Thanks for working on this! Tobias --------------2cfQf90gubp8MxaYQnk6rMUF Content-Type: text/x-patch; charset=UTF-8; name="pr114304.f90.diff" Content-Disposition: attachment; filename="pr114304.f90.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2djYy90ZXN0c3VpdGUvZ2ZvcnRyYW4uZGcvcHIxMTQzMDQuZjkwIGIv Z2NjL3Rlc3RzdWl0ZS9nZm9ydHJhbi5kZy9wcjExNDMwNC5mOTAKaW5kZXggODM0NGE5ZWE4 NTcuLjJiY2Y5Y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WN0ZXIobGVuPSopIDo6IGRlYywgdGVzdGlucHV0Cg== --------------2cfQf90gubp8MxaYQnk6rMUF--