From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by sourceware.org (Postfix) with ESMTPS id F2D483857C73 for ; Wed, 9 Mar 2022 10:40:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F2D483857C73 X-IronPort-AV: E=McAfee;i="6200,9189,10280"; a="279669262" X-IronPort-AV: E=Sophos;i="5.90,167,1643702400"; d="scan'208";a="279669262" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 02:40:08 -0800 X-IronPort-AV: E=Sophos;i="5.90,167,1643702400"; d="scan'208";a="632566005" Received: from labpcdell3650-003.iul.intel.com (HELO localhost) ([172.28.49.87]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 02:40:07 -0800 From: Nils-Christian Kempke To: gdb-patches@sourceware.org Subject: [PATCH 10/11] gdb/fortran/testsuite: add complex from integers test Date: Wed, 9 Mar 2022 11:39:21 +0100 Message-Id: <20220309103922.3257803-11-nils-christian.kempke@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220309103922.3257803-1-nils-christian.kempke@intel.com> References: <20220309103922.3257803-1-nils-christian.kempke@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2022 10:40:10 -0000 When working on the files I noted that there was no actual test for a COMPLEX built from two INTEGERS. I added that now for completion. gdb/testsuite/ChangeLog: 2022-03-02 Nils-Christian Kempke * gdb.fortran/complex.exp: Test complex from integer. * gdb.fortran/complex.f90: Dito. Signed-off-by: Nils-Christian Kempke --- gdb/testsuite/gdb.fortran/complex.exp | 6 ++++++ gdb/testsuite/gdb.fortran/complex.f90 | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.fortran/complex.exp b/gdb/testsuite/gdb.fortran/complex.exp index f4a80fbf78..ca41c81236 100644 --- a/gdb/testsuite/gdb.fortran/complex.exp +++ b/gdb/testsuite/gdb.fortran/complex.exp @@ -41,6 +41,7 @@ gdb_test "print c8" " = \\(321,-22\\)" gdb_test "print dc" " = \\(321,-22\\)" gdb_test "print c16" " = \\(-874,19\\)" +gdb_test "print ci" " = \\(-4,12\\)" gdb_test "whatis c" "type = $complex4" gdb_test "print \$_creal (c)" " = 1000" @@ -70,3 +71,8 @@ with_test_prefix "c16" { gdb_test "whatis \$" " = real\\*16" } +gdb_test "whatis ci" "type = $complex4" +gdb_test "print \$_creal (ci)" " = -4" +with_test_prefix "ci" { + gdb_test "whatis \$" " = real\\*4" +} diff --git a/gdb/testsuite/gdb.fortran/complex.f90 b/gdb/testsuite/gdb.fortran/complex.f90 index 5c9491df02..cd1acecad5 100644 --- a/gdb/testsuite/gdb.fortran/complex.f90 +++ b/gdb/testsuite/gdb.fortran/complex.f90 @@ -17,8 +17,9 @@ program test_complex real*4 r4a, r4b real*8 r8a, r8b real*16 r16a, r16b + integer ia, ib - complex c + complex c, ci complex(kind=4) c4 complex(kind=8) c8 double complex dc @@ -30,15 +31,19 @@ program test_complex r8b = -22 r16a = -874 r16b = 19 + ia = -4 + ib = 12 c = cmplx(r4a,r4b) c4 = cmplx(r4a,r4b) c8 = cmplx(r8a, r8b) dc = cmplx(r8a, r8b) c16 = cmplx(r16a, r16b) + ci = cmplx(ia, ib) print *, c, c4, c8, dc, c16 ! stop print *, r4a, r4b print *, r8a, r8b print *, r16a, r16b + print *, ia, ib end program test_complex -- 2.25.1 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928