Skip to content

Commit

Permalink
240121.191938.HKT remove -C=undefined from cmake_nagfor, as it will l…
Browse files Browse the repository at this point in the history
…ead to segmentation fault for the C tests
  • Loading branch information
zaikunzhang committed Jan 21, 2024
1 parent a0a95da commit 03a07ce
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/cmake_nagfor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ on:
stress-test:
description: Stress Test (Optional, true or false)
required: false
cflags:
description: CFLAGS
required: false
fflags:
description: FFLAGS
required: false
Expand Down Expand Up @@ -56,11 +53,17 @@ jobs:
- name: Conduct the test
run: |
source ~/local/bin/nag_licensing || echo "\n\nNAG licensing failed.\n\n"
export CFLAGS="-Wall -Wextra -Wpedantic -Werror"
export FC=nagfor
#export FFLAGS='-fpp -nan -ieee=stop -recursive -info -gline -u -C -C=alias -C=dangling -C=intovf -C=undefined -kind=unique -Warn=constant_coindexing -Warn=subnormal'
#export CFLAGS='-Wall -Wextra -Wpedantic -Werror'
export FFLAGS="${{ github.event.inputs.fflags }}"
export CFLAGS="${{ github.event.inputs.cflags }}"
if [[ -n "${{ github.event.inputs.fflags }}" ]]; then
export FFLAGS="${{ github.event.inputs.fflags }}"
else
export FFLAGS='-fpp -nan -ieee=stop -recursive -info -gline -u -C -C=alias -C=dangling -C=intovf -kind=unique -Warn=constant_coindexing -Warn=subnormal'
# Zaikun 20240121: With gcc 11.4.0 and nagfor 7.1.7143, if '-C=undefined' is included
# in FFLAGS, then the C tests will encounter a segmentation fault, although the Fortran
# tests work correctly.
#export FFLAGS='-fpp -nan -ieee=stop -recursive -info -gline -u -C -C=alias -C=dangling -C=intovf -C=undefined -kind=unique -Warn=constant_coindexing -Warn=subnormal'
fi
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=. -LAH -DCMAKE_C_FLAGS="${CFLAGS}" -DCMAKE_Fortran_FLAGS="${FFLAGS}" .
cmake --build . --target install
cmake --build . --target tests
Expand Down

0 comments on commit 03a07ce

Please sign in to comment.