Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for GCC 7 and 8 #430

Merged
merged 2 commits into from
Jun 6, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
gcc_v: [7, 8, 9, 10, 11] # Version of GFortran we want to use.
gcc_v: [9, 10, 11] # Version of GFortran we want to use.
env:
FC: gfortran-${{ matrix.gcc_v }}
GCC_V: ${{ matrix.gcc_v }}
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,6 @@ env:
CTEST_TIME_TIMEOUT: "5" # some failures hang forever

jobs:
Build:
runs-on: windows-latest
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v1

- name: Install fypp
run: pip install fypp

- 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

env:
FC: gfortran
CC: gcc
CXX: g++

- name: CMake build
run: cmake --build build --parallel

- name: catch build fail
run: cmake --build build --verbose --parallel 1
if: failure()

- name: CTest
run: ctest --output-on-failure --parallel -V -LE quadruple_precision
working-directory: build

- uses: actions/upload-artifact@v1
if: failure()
with:
name: WindowsCMakeTestlog
path: build/Testing/Temporary/LastTest.log

msys2-build:
runs-on: windows-latest
strategy:
Expand Down
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ add_subdirectory(config)

# --- compiler options
if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 9.0)
message(FATAL_ERROR "GCC Version 9 or newer required")
endif()
add_compile_options(-fimplicit-none)
add_compile_options(-ffree-line-length-132)
add_compile_options(-Wall)
Expand All @@ -27,11 +30,7 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 11.0)
add_compile_options(-pedantic-errors)
endif()
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
add_compile_options(-std=f2018)
else()
add_compile_options(-std=f2008ts)
endif()
add_compile_options(-std=f2018)
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
add_compile_options(-warn declarations,general,usage,interfaces,unused)
if(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0)
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ The following combinations are tested on the default branch of stdlib:

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

Name | Version | Platform | Architecture | Status
--- | --- | --- | --- | ---
GCC Fortran | 7.4 | Windows 10 | i686 | [#296](https://github.com/fortran-lang/stdlib/issues/296)
GCC Fortran | <9 | any | any | [#430](https://github.com/fortran-lang/stdlib/pull/430)
awvwgk marked this conversation as resolved.
Show resolved Hide resolved
NVIDIA HPC SDK | 20.7, 20.9, 20.11 | Manjaro Linux 20 | x86_64 | [#107](https://github.com/fortran-lang/stdlib/issues/107)
NAG | 7.0 | RHEL | x86_64 | [#108](https://github.com/fortran-lang/stdlib/issues/108)
Intel Parallel Studio XE | 16, 17, 18 | OpenSUSE | x86_64 | failed to compile
Expand Down
8 changes: 2 additions & 6 deletions src/stdlib_string_type.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,7 @@ contains
!> Return the character sequence represented by the string.
pure function char_string(string) result(character_string)
type(string_type), intent(in) :: string
! GCC 8 and older cannot evaluate pure derived type procedures here
!character(len=len(string)) :: character_string
character(len=:), allocatable :: character_string
character(len=len(string)) :: character_string

character_string = maybe(string)

Expand Down Expand Up @@ -1241,9 +1239,7 @@ contains
!> Safely return the character sequences represented by the string
pure function maybe(string) result(maybe_string)
type(string_type), intent(in) :: string
! GCC 8 and older cannot evaluate pure derived type procedures here
!character(len=len(string)) :: maybe_string
character(len=:), allocatable :: maybe_string
character(len=len(string)) :: maybe_string
if (allocated(string%raw)) then
maybe_string = string%raw
else
Expand Down