From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 121023857C52; Mon, 3 Aug 2020 16:34:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 121023857C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596472459; bh=hw4gY5VIdGooQiu39rc0ayYUKwGeCz9nDwyS1/UIc0E=; h=From:To:Subject:Date:From; b=XaqQipnIuxHmCEIW6VJ/ugkJqOIAd4zC2QZ40K4HgoN+XG+YLYXi+3s3aRtmYRO0B p3gx+hrYegYgcNqVs2pgHPDp85Z8TwyIbhqdiGFZXzhC/3BPfo+3Y9/kHBSdVysSbe sV7w3iguPl1ouPZgrYsUp8s/LdMHBXCiS8EbcWGo= From: "guez at lmd dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/96436] New: -std=f2003 -pedantic rejects valid f0.d edit descriptor Date: Mon, 03 Aug 2020 16:34:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: guez at lmd dot ens.fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Aug 2020 16:34:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96436 Bug ID: 96436 Summary: -std=3Df2003 -pedantic rejects valid f0.d edit descriptor Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: guez at lmd dot ens.fr Target Milestone: --- Here is my system information: $ gcc-10 -v Using built-in specs. COLLECT_GCC=3Dgcc-10 COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper OFFLOAD_TARGET_NAMES=3Dnvptx-none:amdgcn-amdhsa:hsa OFFLOAD_TARGET_DEFAULT=3D1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion=3D'Ubuntu 10-20200411-0ubuntu1' --with-bugurl=3Dfile:///usr/share/doc/gcc-10/README.B= ugs --enable-languages=3Dc,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix= =3D/usr --with-gcc-major-version-only --program-suffix=3D-10 --program-prefix=3Dx86_64-linux-gnu- --enable-shared --enable-linker-build-= id --libexecdir=3D/usr/lib --without-included-gettext --enable-threads=3Dposix --libdir=3D/usr/lib --enable-nls --enable-clocale=3Dgnu --enable-libstdcxx-= debug --enable-libstdcxx-time=3Dyes --with-default-libstdcxx-abi=3Dnew --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=3Drelea= se --with-target-system-zlib=3Dauto --enable-objc-gc=3Dauto --enable-multiarch --disable-werror --with-arch-32=3Di686 --with-abi=3Dm64 --with-multilib-list=3Dm32,m64,mx32 --enable-multilib --with-tune=3Dgeneric --enable-offload-targets=3Dnvptx-none,amdgcn-amdhsa,hsa --without-cuda-driv= er --enable-checking=3Drelease --build=3Dx86_64-linux-gnu --host=3Dx86_64-linu= x-gnu --target=3Dx86_64-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.0.1 20200411 (experimental) [master revision bb87d5cc77d:75961caccb7:f883c46b4877f637e0fa5025b4d6b5c9040ec566] (Ubuntu 10-20200411-0ubuntu1) Here is a test program for the bug: $ cat my_test.f90=20 print "(f0.2)", 3. end Here is the compilation command: $ gfortran-10 -std=3Df2003 -pedantic my_test.f90=20 There is no problem at compilation. Here is the result of execution: $ a.out At line 1 of file my_test.f90 (unit =3D 6, file =3D 'stdout') Fortran runtime error: Zero width in format descriptor (f0.2) ^ Error termination. Backtrace: #0 0x14d29aeffd0a #1 0x14d29af00819 #2 0x14d29af014ef #3 0x14d29b133ed1 #4 0x14d29b13410e #5 0x14d29b1450a7 #6 0x55c1c61a01d7 #7 0x55c1c61a023a #8 0x14d29ad0f0b2 #9 0x55c1c61a00bd #10 0xffffffffffffffff This is a bug. Zero width in edit descriptor Fw.d, on output, is valid. Cf. Fortran 2003 standard, paragraph 10.6.1.=