Skip to content

Commit

Permalink
Change gfortran compile flags
Browse files Browse the repository at this point in the history
gfortran now compiles with same flags CESM uses when DEBUG=TRUE, except I added
-Werror to elevate warnings to errors and then also turned on
-Wno-maybe-uninitialized to avoid failing tests because the compiler thinks
there's a chance we are accessing uninitialized memory (the one failure caught
by this in CI was initializing an allocatable array element-by-element inside a
loop: this was a false-positive, as the loop covered all indices)
  • Loading branch information
mnlevy1981 committed Oct 11, 2024
1 parent dcae106 commit 5fb6230
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bld/CompileFlags.mak
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ else
endif

ifeq ($(FC_TMP),gfortran)
FCFLAGS = -O2 -ffree-form -J $(OBJ_DIR) -cpp -Wall -Werror
FCFLAGS = -g -Og -Wall -Wno-maybe-uninitialized -Werror -fbacktrace -ffpe-trap=zero,overflow -fcheck=bounds -J $(OBJ_DIR)
endif

ifeq ($(FC_TMP),pgf90)
Expand Down

0 comments on commit 5fb6230

Please sign in to comment.