From e97e01289384ae181ddeef93d2843ea8505c6c84 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Fri, 11 Aug 2017 11:39:29 -0600 Subject: [PATCH] Add -Og -fbacktrace to gnu debug flags Inspired by ACME's gnu debug flags --- config/cesm/machines/config_compilers.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/cesm/machines/config_compilers.xml b/config/cesm/machines/config_compilers.xml index 3c48f915dd3..8ef5b9fe3bb 100644 --- a/config/cesm/machines/config_compilers.xml +++ b/config/cesm/machines/config_compilers.xml @@ -109,7 +109,7 @@ using a fortran linker. -mcmodel=medium -std=gnu99 -fopenmp - -g -Wall -ffpe-trap=invalid,zero,overflow -fcheck=bounds + -g -Wall -Og -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds -O @@ -126,11 +126,11 @@ using a fortran linker. -mcmodel=medium -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -fopenmp - -g -Wall -ffpe-trap=zero,overflow -fcheck=bounds + least with some versions of gfortran (confirmed with 5.4.0, 6.3.0 and + 7.1.0), gfortran's isnan (which is called in cime via the + CPRGNU-specific shr_infnan_isnan) causes a floating point exception + when called on a signaling NaN. --> + -g -Wall -Og -fbacktrace -ffpe-trap=zero,overflow -fcheck=bounds -O