CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
85 lines
3.0 KiB
Plaintext
85 lines
3.0 KiB
Plaintext
# Copyright 2023-2024 Free Software Foundation, Inc.
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
# Test Fortran entry points for subroutines.
|
|
|
|
require allow_fortran_tests
|
|
|
|
standard_testfile .f90
|
|
load_lib "fortran.exp"
|
|
|
|
if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f90}] } {
|
|
return -1
|
|
}
|
|
|
|
if { ![fortran_runto_main] } {
|
|
untested "could not run to main"
|
|
return -1
|
|
}
|
|
|
|
# Test if we can set a breakpoint via the entry-point name.
|
|
set entry_point_name "foo"
|
|
gdb_breakpoint $entry_point_name
|
|
gdb_continue_to_breakpoint "continue to breakpoint: $entry_point_name" \
|
|
".*entry foo\\(J,K,L,I1\\).*"
|
|
|
|
gdb_test "print j" "= 11" "print j, entered via $entry_point_name"
|
|
gdb_test "print k" "= 22" "print k, entered via $entry_point_name"
|
|
gdb_test "print l" "= 33" "print l, entered via $entry_point_name"
|
|
gdb_test "print i1" "= 44" "print i1, entered via $entry_point_name"
|
|
gdb_test "info args" \
|
|
[multi_line "j = 11" \
|
|
"k = 22" \
|
|
"l = 33" \
|
|
"i1 = 44"] \
|
|
"info args, entered via $entry_point_name"
|
|
|
|
# Test if we can set a breakpoint via the function name.
|
|
set entry_point_name "bar"
|
|
gdb_breakpoint $entry_point_name
|
|
gdb_continue_to_breakpoint "continue to breakpoint: $entry_point_name" \
|
|
".*subroutine bar\\(I,J,K,I1\\).*"
|
|
|
|
gdb_test "print i" "= 444" "print i, entered via $entry_point_name"
|
|
gdb_test "print j" "= 555" "print j, entered via $entry_point_name"
|
|
gdb_test "print k" "= 666" "print k, entered via $entry_point_name"
|
|
gdb_test "print i1" "= 777" "print i1, entered via $entry_point_name"
|
|
|
|
# Test a second entry point.
|
|
set entry_point_name "foobar"
|
|
gdb_breakpoint $entry_point_name
|
|
gdb_continue_to_breakpoint "continue to breakpoint: $entry_point_name" \
|
|
".* entry foobar\\(J\\).*"
|
|
|
|
gdb_test "print j" "= 1" "print j, entered via $entry_point_name"
|
|
gdb_test "info args" "j = 1" "info args, entered via $entry_point_name"
|
|
|
|
# Test breaking at the entrypoint defined inside the module mod via its
|
|
# scoped name.
|
|
set entry_point_name "mod::mod_foo"
|
|
|
|
# GCC moves subroutines with entry points out of the module scope into the
|
|
# compile unit scope.
|
|
if {[test_compiler_info {gcc-*}] || [test_compiler_info {clang-*}]} {
|
|
setup_xfail "gcc/105272" "*-*-*"
|
|
}
|
|
gdb_breakpoint $entry_point_name
|
|
|
|
if {[test_compiler_info {gcc-*}] || [test_compiler_info {clang-*}]} {
|
|
setup_xfail "gcc/105272" "*-*-*"
|
|
}
|
|
gdb_continue_to_breakpoint "continue to breakpoint: $entry_point_name" \
|
|
".* entry mod_foo\\(\\).*"
|