Skip to content

Commit b3c3102

Browse files
authored
Remove support for GCC 7 and 8 (#430)
- remove GCC 8.1 from Windows workflow - remove GCC 7.5 and GCC 8.4 from Ubuntu/MacOS workflow - remove GCC workaround from stdlib_string_type - move GCC <9 from supported to failing compilers - create error in CMake for too old GCC version
1 parent 1c86812 commit b3c3102

File tree

5 files changed

+10
-51
lines changed

5 files changed

+10
-51
lines changed

.github/workflows/CI.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
os: [ubuntu-latest, macos-latest]
24-
gcc_v: [7, 8, 9, 10, 11] # Version of GFortran we want to use.
24+
gcc_v: [9, 10, 11] # Version of GFortran we want to use.
2525
env:
2626
FC: gfortran-${{ matrix.gcc_v }}
2727
GCC_V: ${{ matrix.gcc_v }}

.github/workflows/ci_windows.yml

-35
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,6 @@ env:
77
CTEST_TIME_TIMEOUT: "5" # some failures hang forever
88

99
jobs:
10-
Build:
11-
runs-on: windows-latest
12-
strategy:
13-
fail-fast: false
14-
15-
steps:
16-
- uses: actions/checkout@v1
17-
18-
- name: Install fypp
19-
run: pip install fypp
20-
21-
- run: cmake -G "MinGW Makefiles" -DCMAKE_SH="CMAKE_SH-NOTFOUND" -Wdev -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace" -DCMAKE_MAXIMUM_RANK=4
22-
23-
env:
24-
FC: gfortran
25-
CC: gcc
26-
CXX: g++
27-
28-
- name: CMake build
29-
run: cmake --build build --parallel
30-
31-
- name: catch build fail
32-
run: cmake --build build --verbose --parallel 1
33-
if: failure()
34-
35-
- name: CTest
36-
run: ctest --output-on-failure --parallel -V -LE quadruple_precision
37-
working-directory: build
38-
39-
- uses: actions/upload-artifact@v1
40-
if: failure()
41-
with:
42-
name: WindowsCMakeTestlog
43-
path: build/Testing/Temporary/LastTest.log
44-
4510
msys2-build:
4611
runs-on: windows-latest
4712
strategy:

CMakeLists.txt

+4-5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ add_subdirectory(config)
1616

1717
# --- compiler options
1818
if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
19+
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 9.0)
20+
message(FATAL_ERROR "GCC Version 9 or newer required")
21+
endif()
1922
add_compile_options(-fimplicit-none)
2023
add_compile_options(-ffree-line-length-132)
2124
add_compile_options(-Wall)
@@ -27,11 +30,7 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
2730
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 11.0)
2831
add_compile_options(-pedantic-errors)
2932
endif()
30-
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
31-
add_compile_options(-std=f2018)
32-
else()
33-
add_compile_options(-std=f2008ts)
34-
endif()
33+
add_compile_options(-std=f2018)
3534
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
3635
add_compile_options(-warn declarations,general,usage,interfaces,unused)
3736
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0)

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ The following combinations are tested on the default branch of stdlib:
8787

8888
Name | Version | Platform | Architecture
8989
--- | --- | --- | ---
90-
GCC Fortran | 7, 8, 9, 10, 11 | Ubuntu 20.04 | x86_64
91-
GCC Fortran | 7, 8, 9, 10, 11 | MacOS Catalina 10.15 | x86_64
92-
GCC Fortran | 8 | Windows Server 2019 | x86_64
90+
GCC Fortran | 9, 10, 11 | Ubuntu 20.04 | x86_64
91+
GCC Fortran | 9, 10, 11 | MacOS Catalina 10.15 | x86_64
9392
GCC Fortran (MSYS) | 10 | Windows Server 2019 | x86_64
9493
GCC Fortran (MinGW) | 10 | Windows Server 2019 | x86_64, i686
9594
Intel oneAPI classic | 2021.1 | Ubuntu 20.04 | x86_64
@@ -106,7 +105,7 @@ A list of tested compilers which are currently not working and the respective is
106105

107106
Name | Version | Platform | Architecture | Status
108107
--- | --- | --- | --- | ---
109-
GCC Fortran | 7.4 | Windows 10 | i686 | [#296](https://github.com/fortran-lang/stdlib/issues/296)
108+
GCC Fortran | <9 | any | any | [#296](https://github.com/fortran-lang/stdlib/issues/296), [#430](https://github.com/fortran-lang/stdlib/pull/430)
110109
NVIDIA HPC SDK | 20.7, 20.9, 20.11 | Manjaro Linux 20 | x86_64 | [#107](https://github.com/fortran-lang/stdlib/issues/107)
111110
NAG | 7.0 | RHEL | x86_64 | [#108](https://github.com/fortran-lang/stdlib/issues/108)
112111
Intel Parallel Studio XE | 16, 17, 18 | OpenSUSE | x86_64 | failed to compile

src/stdlib_string_type.fypp

+2-6
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,7 @@ contains
447447
!> Return the character sequence represented by the string.
448448
pure function char_string(string) result(character_string)
449449
type(string_type), intent(in) :: string
450-
! GCC 8 and older cannot evaluate pure derived type procedures here
451-
!character(len=len(string)) :: character_string
452-
character(len=:), allocatable :: character_string
450+
character(len=len(string)) :: character_string
453451

454452
character_string = maybe(string)
455453

@@ -1241,9 +1239,7 @@ contains
12411239
!> Safely return the character sequences represented by the string
12421240
pure function maybe(string) result(maybe_string)
12431241
type(string_type), intent(in) :: string
1244-
! GCC 8 and older cannot evaluate pure derived type procedures here
1245-
!character(len=len(string)) :: maybe_string
1246-
character(len=:), allocatable :: maybe_string
1242+
character(len=len(string)) :: maybe_string
12471243
if (allocated(string%raw)) then
12481244
maybe_string = string%raw
12491245
else

0 commit comments

Comments
 (0)