From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id j4XiIAa7e2L8pQUAWB0awg (envelope-from ) for ; Wed, 11 May 2022 09:32:54 -0400 Received: by simark.ca (Postfix, from userid 112) id 7D0A11E220; Wed, 11 May 2022 09:32:54 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=douIPw+h; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 723BD1E00D for ; Wed, 11 May 2022 09:32:53 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E7B54383D82E for ; Wed, 11 May 2022 13:32:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7B54383D82E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652275972; bh=ZtT6I/bejxtvv9pctIn1eViTG03Cb713yGcqRlvyZGE=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=douIPw+hrBdtFGlYsWDEVuGpQUENV8VkwLhz3v5MT1dtE3gZni4JM6UMYL1+skcXb yWPyXMQyl1C0PLfA5ka3qaBmduxdSNcvKk9N8L7XNNBJ7DkackIxkJ8WMU9z8dvz1S PZcHUh7ibszhH1psA/7/Z9J9zBzMA9OFSE8wjU44= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id D62D3384F025 for ; Wed, 11 May 2022 13:32:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D62D3384F025 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-140-3QbIkq6-OLiAgZCG8iEC-A-1; Wed, 11 May 2022 09:32:32 -0400 X-MC-Unique: 3QbIkq6-OLiAgZCG8iEC-A-1 Received: by mail-wr1-f70.google.com with SMTP id w20-20020adfd1b4000000b0020cbb4347e6so851257wrc.17 for ; Wed, 11 May 2022 06:32:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=ZtT6I/bejxtvv9pctIn1eViTG03Cb713yGcqRlvyZGE=; b=pWENcM7WOZBDmR1uSF1rYWyd5EwqaYrgtdhoW45AiSlk31V6ZcUEtrJEGyN/7hpAQx p0mUaHOU2g8JTfgQqEoP2y5BBfz+H2FQEelKQsNVcslqP6HuS8Xa0gG5nkhe0xsD4sCw eedDoun1mESrNlK+9GMWAZ3vGJrSMTg5kEr1CO7vy1xjiIWrrorNY6SDnNmpI8/YaM/p uH2MdfzAPItvtvfp2UgQ/C8b36ijLEZl3UqDfed6SAbj0UX0s67u3sV7BAbXpY5rAy7K Z27RcKMVxDZzIsH0bF28UgJSFJ60RqTf67QnJqcCc1xH+8nzudnLBBHeGn3dNgxZFvrX 7oLA== X-Gm-Message-State: AOAM532Bffjxn7YWbaVr3/pjc41kLOnTxNnoDp38uJ+w+6qpVomvVxSZ 0pBHRQRXrOiDxkmrELSGHDZh2IPX8HHdifFcr9bZhavrMZgD8WBCPSF9wtv0446XCY/AkisgTsJ vSzU8yD4IIODAK+FgoeqKQg== X-Received: by 2002:a7b:cf0a:0:b0:394:7bf:66c7 with SMTP id l10-20020a7bcf0a000000b0039407bf66c7mr4858048wmg.52.1652275951076; Wed, 11 May 2022 06:32:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydgWoIuvZR1d3C+M7u0V4GJN1V6m6LsyMZCK/q0q9g8z7vYvHzh+PAfkKCHmxVj1GecoZ9lg== X-Received: by 2002:a7b:cf0a:0:b0:394:7bf:66c7 with SMTP id l10-20020a7bcf0a000000b0039407bf66c7mr4858017wmg.52.1652275950771; Wed, 11 May 2022 06:32:30 -0700 (PDT) Received: from localhost (host81-136-113-48.range81-136.btcentralplus.com. [81.136.113.48]) by smtp.gmail.com with ESMTPSA id r6-20020adfdc86000000b0020c5253d8bdsm2105957wrj.9.2022.05.11.06.32.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 06:32:30 -0700 (PDT) To: Nils-Christian Kempke , gdb-patches@sourceware.org Subject: Re: [PATCH 00/18] Fortran compiler identification and ifx testsuite support In-Reply-To: <20220510142437.1397399-1-nils-christian.kempke@intel.com> References: <20220510142437.1397399-1-nils-christian.kempke@intel.com> Date: Wed, 11 May 2022 14:32:29 +0100 Message-ID: <87tu9wjitu.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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: , From: Andrew Burgess via Gdb-patches Reply-To: Andrew Burgess Cc: JiniSusan.George@amd.com Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Nils-Christian Kempke via Gdb-patches writes: > Hi all, > > this series is a collection of patches we have prepared that was > targeted at improving the overall passrate of the Intel ifx compiler > within the Fortran testsuite. It also includes a new way for the > testsuite to identify the Fortran compilers and their version. Thanks for doing all this. I've looked through all these patches, and everything looks good to me. There's a few minor issues I spotted, I've sent emails about those, everything else in this series is approved. Thanks, Andrew > > > There are a few places in the gdb.fortran part of the testsuite that > needed to be adapted for ifx. Some of these changes make the > testsuite a bit less taylored to the gfortran specifics. Some of the > changes fix flags and such to better support running the testsuite > with ifx. > > While doing this and after initially submitting a patch here > > https://sourceware.org/pipermail/gdb-patches/2021-December/184612.html > > and in the follow-up discussion here > > https://sourceware.org/pipermail/gdb-patches/2022-January/185064.html > > we decided to change the testsuite a bit more and add a Frotran specific > compiler identification to the Fortran testsuite. > > Generally, the procedures test_compiler_info and get_compiler_info are > used in the testsuite to detect a certain compiler (e.g. gcc-*). This > info is then used to set certain flags/kfails etc. > > The procedure get_compiler_info would, upon calling it, take the files > compiler.c/compiler.cc (depending on wether or not the c++ option was > passed to them) and run them through the respective C/CXX preprocessors > of the compiler given via CC_FOR_TARGET/CXX_FOR_TARGET (or gcc/gfortran > if these were not set). It would detect compiler specific macro > definitions and retrun the compiler used, as well as its version in a > string. As there was no separate option available for Fortran, using > get_compiler_info inside a Fortran test would always default to the C > compiler detection and return the version and name of the C compiler > defined in CC_FOR_TARGET (or gcc if none was set). > > This meant, that running the testsuite while defining a F90_FOR_TARGET > would, in order to set the right flags and kfails within the testsuite > run, require one to also set the CC_FOR_TARGET to the C compiler that > would 'correspond' to the Fortran one. So F90_FOR_TARGET=ifx would > require CC_FOR_TARGET=icx, flang would require clang and so on. > Running the Fortran testsuite with only F90_FOR_TARGET=ifx would be the > equivalent of setting CC_FOR_TARGET=gcc. The test_compiler_info would > return gcc-* in this case and compiler specific settings not be applied. > Especially, this made it impossible to run heterogenous combinations of > C and Fortran compilers and still have all flags/kfails setup correctly. > > In order to improve this (and the rest of our patches are base on this) > we added a new option to get/test_compiler_info: 'f90'. We added a > Fortran compiler identification mechanism similar to the existing C/CXX > ones by adding the file compiler.F90. Similar to C/CXX, the Fortran > compiler detection preprocesses the compiler.F90 file and, depending on > the macros defined by the compiler, will return the Fortran compiler > name and version. > > We want to note here, that preprocessing is not part of the Fortran > standard. It was used here as it seems to be common for most compilers > to have this feature in place (in fact, we don't know of any modern > Fortran compilers that don't have it). > > We added detection for gfortran, ifx, ifort, classic flang, llvm flang, > and armflang. While we tested the detection for all compilers with > their latest available versions, we could not test the armflang compiler > identification. We would kindly ask someone from arm (and I'll cc > someone in this patch who I've written mails with before) to test these > detection changes for us. They were extracted from the latest online > armflang documentation. > > At last, when adding the Fortran compiler identification we were faced > with the problem of properly maintaining F77_FOR_TARGET. We think, this > feature is not maintained anymore and the last usage of it was removed > many years ago. Thus, we decided to remove F77_FOR_TARGET from the > testsuite. > > All these changes were tested for regressions on a x86_64 Ubunut20.04 > machine running the boards unix, unix/-m32, native-gdbserver, and > native-extended-gdbserver (-m32 is acually only properly supported for > gfortran and ifort as far as we know). > > This series did not show any regressions but imporves the testsuite > support for ifx significantly (in some places also for ifort and flang). > > We're looking forward to feedback! > > Cheers, > > Nils > > Abdul Basit Ijaz (1): > gdb/testsuite: Use -module option for Intel Fortran compilers > > Cristian Sandu (1): > gdb/testsuite: add Fortran compiler identification to GDB > > Felix Willgerodt (1): > gdb/testsuite: Fix fortran types for Intel compilers. > > Nils-Christian Kempke (15): > gdb/testsuite: remove F77_FOR_TARGET support > gdb/testsuite: add local variable for passing 'getting_compiler_info' > to gdb_compile > gdb/testsuite: rename intel next gen c/cpp compilers > gdb/testsuite: disable charset.exp for intel compilers > testsuite, fortran: make print-formatted.exp more robust > testsuite, fortran: add required external keyword > testsuite, fortran: add compiler dependent types to > dynamic-ptype-whatis > testsuite, fortran: Add '-debug-parameters all' when compiling with > ifx > testsuite/lib: add check_optional_entry for GDBInfoSymbols > testsuite, fortran: fix info-types for intel compilers > testsuite, fortran: Add type info of formal parameter for Intel > compilers. > testsuite, fortran: allow additional completions in module.exp > gdb, testsuite, fortran: fix double free in mixed-lang-stack.exp > gdb, testsuite, fortran: fixup mixed-lang-stack for Intel/LLVM > compilers > gdb/testsuite: fixup common-block.exp for intel compilers > > gdb/testsuite/boards/cc-with-tweaks.exp | 5 - > gdb/testsuite/boards/debug-types.exp | 1 - > gdb/testsuite/boards/gold-gdb-index.exp | 1 - > gdb/testsuite/gdb.fortran/assumedrank.exp | 6 +- > gdb/testsuite/gdb.fortran/charset.exp | 5 + > .../gdb.fortran/class-allocatable-array.exp | 4 +- > gdb/testsuite/gdb.fortran/common-block.exp | 38 ++++++- > .../gdb.fortran/derived-type-striding.exp | 2 +- > .../gdb.fortran/dynamic-ptype-whatis.exp | 79 +++++++------- > gdb/testsuite/gdb.fortran/function-calls.f90 | 1 + > gdb/testsuite/gdb.fortran/info-types.exp | 10 +- > gdb/testsuite/gdb.fortran/library-module.exp | 2 +- > .../gdb.fortran/mixed-lang-stack.cpp | 12 +-- > .../gdb.fortran/mixed-lang-stack.exp | 21 ++-- > gdb/testsuite/gdb.fortran/module.exp | 5 +- > gdb/testsuite/gdb.fortran/namelist.exp | 2 +- > gdb/testsuite/gdb.fortran/nested-funcs-2.exp | 3 +- > gdb/testsuite/gdb.fortran/print-formatted.exp | 3 +- > gdb/testsuite/gdb.fortran/print-formatted.f90 | 1 + > .../gdb.fortran/ptype-on-functions.exp | 12 ++- > gdb/testsuite/gdb.fortran/vla-type.exp | 2 +- > gdb/testsuite/lib/compiler.F90 | 69 ++++++++++++ > gdb/testsuite/lib/compiler.c | 2 +- > gdb/testsuite/lib/compiler.cc | 2 +- > gdb/testsuite/lib/fortran.exp | 100 +++++++++++------- > gdb/testsuite/lib/future.exp | 21 +--- > gdb/testsuite/lib/gdb.exp | 61 +++++++---- > gdb/testsuite/lib/sym-info-cmds.exp | 18 +++- > 28 files changed, 317 insertions(+), 171 deletions(-) > create mode 100644 gdb/testsuite/lib/compiler.F90 > > -- > 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