From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 501DF3858022; Mon, 22 Feb 2021 05:42:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 501DF3858022 From: "jvdelisle at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/96580] F2018 changes to date_and_time intrinsics Date: Mon, 22 Feb 2021 05:42:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: jvdelisle at gcc dot gnu.org 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: cc Message-ID: In-Reply-To: References: 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, 22 Feb 2021 05:42:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96580 Jerry DeLisle changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvdelisle at gcc dot gnu.o= rg --- Comment #1 from Jerry DeLisle --- I was playing around with this just to see what happens: program test_time_and_date character(8) :: date character(10) :: time character(5) :: zone integer(2),dimension(8) :: values ! using keyword arguments call date_and_time(date,time,zone,values) call date_and_time(DATE=3Ddate,ZONE=3Dzone) call date_and_time(TIME=3Dtime) call date_and_time(VALUES=3Dvalues) print '(a,2x,a,2x,a)', date, time, zone print *, "---------------------" print '(8i5)', values end program test_time_and_date Using integer(2): $ gfc -g -static pr96580.f90=20 $ $ gfc -Wall -fcheck=3Dall pr96580.f90 $ Compiles without indication of an issue. However, segfaults. Not really surprising, but maybe we ought to detect or reject the code. (gdb) r Starting program: /home/jerry/dev/test/pr96580/a.out=20 Program received signal SIGABRT, Aborted. 0x0000000000443585 in raise () (gdb) bt #0 0x0000000000443585 in raise () #1 0x00000000004012cb in abort () #2 0x000000000040110a in _gfortran_date_and_time (__date=3D= ,=20 __time=3D, __zone=3D, __values=3D,=20 __date_len=3D, __time_len=3D, __zone_len= =3D5) at ../../../trunk/libgfortran/intrinsics/date_and_time.c:227 #3 0x0000000000402267 in test_time_and_date () at pr96580.f90:7 #4 0x00000000004025ba in main (argc=3D1, argv=3D0x7fffffffd9c6) at pr96580= .f90:14 #5 0x000000000043cf6a in __libc_start_main () #6 0x00000000004020be in _start ()=