From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 75770382FAC6; Wed, 16 Nov 2022 19:06:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75770382FAC6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668625585; bh=4r18pBRZhiKj95B/gs7Cs+eAtxh1IDxHIE0WA24ywqE=; h=From:To:Subject:Date:From; b=CMUkCQTYJ9aNvJD1Whut0FkYj9GA/UA9hithHtmHWDxPwNzAVtwhsGyBd8kurVWpV DhtqDB5Qs7te1JFkrOAgg3eReQiHfUr0zWhlvPOXuB2FCnn4VfntgijW0OTk7a5Ulm AsZTtqnx5Y+bwFnpgVMr2wMSqeFRz6YxjRWNSWHo= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107721] New: Lost typespec with constant expressions using array constructors and parentheses Date: Wed, 16 Nov 2022 19:06:25 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf 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: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107721 Bug ID: 107721 Summary: Lost typespec with constant expressions using array constructors and parentheses Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: anlauf at gcc dot gnu.org Target Milestone: --- While working on pr107680, I noticed the following issue: program p print *, "*** Expect integer:" print *, [integer :: [1.0] ] ** 2 print *, [integer :: ([1.0])] ** 2 print *, "*** Expect real:" print *, [real :: [2] ] ** 2 print *, [real :: ([2])] ** 2 print *, "*** Expect complex:" print *, [complex :: [3] ] ** 2 print *, [complex :: ([3])] ** 2 end There should be no effect by the parentheses here, but with 11-branch onwar= ds I get: *** Expect integer: 1 1.00000000=20=20=20=20 *** Expect real: 4.00000000=20=20=20=20 4 *** Expect complex: (9.00000000,0.00000000) 9 Intel correctly prints: *** Expect integer: 1 1 *** Expect real: 4.000000=20=20=20=20 4.000000=20=20=20=20 *** Expect complex: (9.000000,0.0000000E+00) (9.000000,0.0000000E+00) Note that 10-branch and older ICE on this code...=