Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nils-Christian Kempke via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Cc: JiniSusan.George@amd.com, aburgess@redhat.com
Subject: [PATCH 01/18] gdb/testsuite: remove F77_FOR_TARGET support
Date: Tue, 10 May 2022 16:24:20 +0200	[thread overview]
Message-ID: <20220510142437.1397399-2-nils-christian.kempke@intel.com> (raw)
In-Reply-To: <20220510142437.1397399-1-nils-christian.kempke@intel.com>

The last uses of the F77_FOR_TARGET via passing f77 to GDB's compile
procedure were removed in this commit

   commit 0ecee54cfd04a60e7ca61ae07c72b20e21390257
   Author: Tom Tromey <tromey@redhat.com>
   Date:   Wed Jun 29 17:50:47 2011 +0000

over 10 years ago.  The last .f files in the testsuite by now are all
being compiled by passing 'f90' to the GDB compile, thus only actually
using F90_FOR_TARGET (array-element.f, block-data.f, subarray.f).
Gfortran in this case is backwards compatible with most f77 code as
claimed on gcc.gnu.org/fortran.

The reason we'd like to get rid of this now is, that we'll be
implementing a Fortran compiler identification mechanism, similar to the
C/Cpp existing ones.  It would be using the Fortran preprocessor macro
defines to identify the Fortran compiler version at hand.  We found it
inconsequent to only implement this for f90 but, on the other hand, f77
seems deprecated.  So, with this commit we remove the remaining lines for
its support.
---
 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/lib/future.exp            | 21 +--------------------
 gdb/testsuite/lib/gdb.exp               | 14 ++++----------
 5 files changed, 5 insertions(+), 37 deletions(-)

diff --git a/gdb/testsuite/boards/cc-with-tweaks.exp b/gdb/testsuite/boards/cc-with-tweaks.exp
index b7ff98fba9..fe5b9eee27 100644
--- a/gdb/testsuite/boards/cc-with-tweaks.exp
+++ b/gdb/testsuite/boards/cc-with-tweaks.exp
@@ -44,7 +44,6 @@ set found_gcc [find_gcc]
 set found_gxx [find_g++]
 set found_gnatmake [find_gnatmake]
 set found_f90 [find_gfortran]
-set found_f77 [find_g77]
 set_board_info compiler "$found_gcc"
 
 set contrib_dir [file normalize $srcdir/../contrib]
@@ -64,10 +63,6 @@ if ![info exists F90_FOR_TARGET] {
     set F90_FOR_TARGET "$found_f90"
 }
 set F90_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $F90_FOR_TARGET"
-if ![info exists F77_FOR_TARGET] {
-    set F77_FOR_TARGET "$found_f77"
-}
-set F77_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $F77_FOR_TARGET"
 
 set env(GDB) \
     [cached_file gdb.sh "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS \"\$@\"" 1]
diff --git a/gdb/testsuite/boards/debug-types.exp b/gdb/testsuite/boards/debug-types.exp
index f04a733ac2..1c4982225d 100644
--- a/gdb/testsuite/boards/debug-types.exp
+++ b/gdb/testsuite/boards/debug-types.exp
@@ -29,7 +29,6 @@ set found_gcc [find_gcc]
 set found_gxx [find_g++]
 set found_gnatmake [find_gnatmake]
 set found_f90 [find_gfortran]
-set found_f77 [find_g77]
 set_board_info compiler "$found_gcc"
 
 # The -fdebug-types-section switch only has an effect with DWARF version 4.
diff --git a/gdb/testsuite/boards/gold-gdb-index.exp b/gdb/testsuite/boards/gold-gdb-index.exp
index 30d2d8b329..f62f489266 100644
--- a/gdb/testsuite/boards/gold-gdb-index.exp
+++ b/gdb/testsuite/boards/gold-gdb-index.exp
@@ -29,7 +29,6 @@ set found_gcc [find_gcc]
 set found_gxx [find_g++]
 set found_gnatmake [find_gnatmake]
 set found_f90 [find_gfortran]
-set found_f77 [find_g77]
 set_board_info compiler "$found_gcc"
 
 set opts [list]
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
index 2d68498623..36dd611d61 100644
--- a/gdb/testsuite/lib/future.exp
+++ b/gdb/testsuite/lib/future.exp
@@ -246,18 +246,6 @@ proc gdb_default_target_compile_1 {source destfile type options} {
 	    }
 	}
 
-	if { $i == "f77" } {
-	    set compiler_type "f77"
-	    if {[board_info $dest exists f77flags]} {
-		append add_flags " [target_info f77flags]"
-	    }
-	    if {[board_info $dest exists f77compiler]} {
-		set compiler [target_info f77compiler]
-	    } else {
-		set compiler [find_g77]
-	    }
-	}
-
 	if { $i == "f90" } {
 	    set compiler_type "f90"
 	    if {[board_info $dest exists f90flags]} {
@@ -359,7 +347,6 @@ proc gdb_default_target_compile_1 {source destfile type options} {
     global CC_FOR_TARGET
     global CXX_FOR_TARGET
     global D_FOR_TARGET
-    global F77_FOR_TARGET
     global F90_FOR_TARGET
     global GNATMAKE_FOR_TARGET
     global GO_FOR_TARGET
@@ -390,12 +377,6 @@ proc gdb_default_target_compile_1 {source destfile type options} {
 	}
     }
 
-    if {[info exists F77_FOR_TARGET]} {
-	if { $compiler_type == "f77" } {
-	    set compiler $F77_FOR_TARGET
-	}
-    }
-
     if {[info exists F90_FOR_TARGET]} {
 	if { $compiler_type == "f90" } {
 	    set compiler $F90_FOR_TARGET
@@ -646,7 +627,7 @@ proc gdb_default_target_compile {source destfile type options} {
 	    set need_local_lang 0
 	}
 
-	if { $i == "f77" || $i == "f90" } {
+	if { $i == "f90" } {
 	    set need_local_lang [info exists use_gdb_compile(fortran)]
 	}
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 47cb2b2367..75e2d5a697 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4363,8 +4363,8 @@ set gdb_saved_set_unbuffered_mode_obj ""
 #   - ldflags=flag: Add FLAG to the linker flags.
 #   - incdir=path: Add PATH to the searched include directories.
 #   - libdir=path: Add PATH to the linker searched directories.
-#   - ada, c++, f77, f90, go, rust: Compile the file as Ada, C++,
-#     Fortran 77, Fortran 90, Go or Rust.
+#   - ada, c++, f90, go, rust: Compile the file as Ada, C++,
+#     Fortran 90, Go or Rust.
 #   - debug: Build with debug information.
 #   - optimize: Build with optimization.
 
@@ -4397,7 +4397,6 @@ proc gdb_compile {source dest type options} {
     if {[lsearch -exact $options getting_compiler_info] == -1
 	&& [lsearch -exact $options rust] == -1
 	&& [lsearch -exact $options ada] == -1
-	&& [lsearch -exact $options f77] == -1
 	&& [lsearch -exact $options f90] == -1
 	&& [lsearch -exact $options go] == -1
 	&& [test_compiler_info "clang-*"]} {
@@ -4426,8 +4425,7 @@ proc gdb_compile {source dest type options} {
 
     # Place (and look for) Fortran `.mod` files in the output
     # directory for this specific test.
-    if {[lsearch -exact $options f77] != -1 \
-	    || [lsearch -exact $options f90] != -1 } {
+    if { [lsearch -exact $options f90] != -1 } {
 	# Fortran compile.
 	set mod_path [standard_output_file ""]
 	if [test_compiler_info "gcc-*"] {
@@ -4668,11 +4666,7 @@ proc gdb_compile {source dest type options} {
     }
 
     if {[lsearch $options quiet] < 0} {
-	# We shall update this on a per language basis, to avoid
-	# changing the entire testsuite in one go.
-	if {[lsearch $options f77] >= 0} {
-	    gdb_compile_test $source $result
-	} elseif { $result != "" } {
+	if { $result != "" } {
 	    clone_output "gdb compile failed, $result"
 	}
     }
-- 
2.25.1

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://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


  reply	other threads:[~2022-05-10 14:25 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 14:24 [PATCH 00/18] Fortran compiler identification and ifx testsuite support Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` Nils-Christian Kempke via Gdb-patches [this message]
2022-05-10 14:24 ` [PATCH 02/18] gdb/testsuite: Use -module option for Intel Fortran compilers Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 03/18] gdb/testsuite: Fix fortran types for Intel compilers Nils-Christian Kempke via Gdb-patches
2022-05-11  9:49   ` Andrew Burgess via Gdb-patches
2022-05-11  9:57     ` Kempke, Nils-Christian via Gdb-patches
2022-05-10 14:24 ` [PATCH 04/18] gdb/testsuite: add local variable for passing 'getting_compiler_info' to gdb_compile Nils-Christian Kempke via Gdb-patches
2022-05-11 10:10   ` Andrew Burgess via Gdb-patches
2022-05-11 14:24     ` Kempke, Nils-Christian via Gdb-patches
2022-05-10 14:24 ` [PATCH 05/18] gdb/testsuite: add Fortran compiler identification to GDB Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 06/18] gdb/testsuite: rename intel next gen c/cpp compilers Nils-Christian Kempke via Gdb-patches
2022-05-11 11:23   ` Andrew Burgess via Gdb-patches
2022-05-11 14:28     ` Kempke, Nils-Christian via Gdb-patches
2022-05-10 14:24 ` [PATCH 07/18] gdb/testsuite: disable charset.exp for intel compilers Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 08/18] testsuite, fortran: make print-formatted.exp more robust Nils-Christian Kempke via Gdb-patches
2022-05-11 11:32   ` Andrew Burgess via Gdb-patches
2022-05-11 14:32     ` Kempke, Nils-Christian via Gdb-patches
2022-05-10 14:24 ` [PATCH 09/18] testsuite, fortran: add required external keyword Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 10/18] testsuite, fortran: add compiler dependent types to dynamic-ptype-whatis Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 11/18] testsuite, fortran: Add '-debug-parameters all' when compiling with ifx Nils-Christian Kempke via Gdb-patches
2022-05-11 11:56   ` Andrew Burgess via Gdb-patches
2022-05-11 14:36     ` Kempke, Nils-Christian via Gdb-patches
2022-05-10 14:24 ` [PATCH 12/18] testsuite/lib: add check_optional_entry for GDBInfoSymbols Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 13/18] testsuite, fortran: fix info-types for intel compilers Nils-Christian Kempke via Gdb-patches
2022-05-11 12:06   ` Andrew Burgess via Gdb-patches
2022-05-11 15:20     ` Kempke, Nils-Christian via Gdb-patches
2022-05-11 16:43       ` Kempke, Nils-Christian via Gdb-patches
2022-05-30 10:33         ` Andrew Burgess via Gdb-patches
2022-05-30 10:32       ` Andrew Burgess via Gdb-patches
2022-05-10 14:24 ` [PATCH 14/18] testsuite, fortran: Add type info of formal parameter for Intel compilers Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 15/18] testsuite, fortran: allow additional completions in module.exp Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 16/18] gdb, testsuite, fortran: fix double free in mixed-lang-stack.exp Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 17/18] gdb, testsuite, fortran: fixup mixed-lang-stack for Intel/LLVM compilers Nils-Christian Kempke via Gdb-patches
2022-05-10 14:24 ` [PATCH 18/18] gdb/testsuite: fixup common-block.exp for intel compilers Nils-Christian Kempke via Gdb-patches
2022-05-11 13:29   ` Andrew Burgess via Gdb-patches
2022-05-11 15:31     ` Kempke, Nils-Christian via Gdb-patches
2022-05-16  6:36       ` George, Jini Susan via Gdb-patches
2022-05-16  7:59         ` Kempke, Nils-Christian via Gdb-patches
2022-05-11 13:32 ` [PATCH 00/18] Fortran compiler identification and ifx testsuite support Andrew Burgess via Gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220510142437.1397399-2-nils-christian.kempke@intel.com \
    --to=gdb-patches@sourceware.org \
    --cc=JiniSusan.George@amd.com \
    --cc=aburgess@redhat.com \
    --cc=nils-christian.kempke@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox