Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • airGR airGR
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 69
    • Issues 69
    • List
    • Boards
    • Service Desk
    • Milestones
  • Redmine
    • Redmine
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

La forge institutionnelle d'INRAE étant en production depuis le 10 juin 2025, nous vous invitons à y créer vos nouveaux projets.

  • HYCAR-HydroHYCAR-Hydro
  • airGRairGR
  • Issues
  • #93
Closed
Open
Issue created Jan 25, 2021 by Pelletier Antoine@antoine.pelletier

Warning at compilation due to potentially uninitialised variable

A warning is produced by GCC Fortran compiler while installing airGR version 1.6.9.27, due to a may be uninitialized variable.

How to reproduce the bug?

  1. Clone master branch of repository at commit 88db83a415ac97742353fc06245c40255535f6e7
  2. Run R CMD build airgr
  3. Run R CMD INSTALL airGR_1.6.9.27.tar.gz

Used software: openSUSE Leap 15.2 with Linux 5.3.18-lp152.60-default kernel; GNU Fortran 11.0.0 20210122 for SUSE Linux; R version 4.0.3

Compilation flags: -fno-optimize-sibling-calls -fpic -std=f2018 -fmessage-length=0 -grecord-gcc-switches -O3 -Wall -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection

Expected behaviour

Compilation and installation without warning.

Actual behaviour

Warning while compiling frun_GR5H.f90:

gfortran -fno-optimize-sibling-calls  -fpic  -std=f2018 -fmessage-length=0 -grecord-gcc-switches -O3 -Wall -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection  -c  frun_GR5H.f90 -o frun_GR5H.o
frun_GR5H.f90:93:26:

   93 |       IF (IsIntStore .EQV. .TRUE.) St(3) = StateStart(4)
      |                          ^
Avertissement: « isintstore » may be used uninitialized [-Wmaybe-uninitialized]
frun_GR5H.f90:71:27:

   71 |       logical :: IsIntStore         ! TRUE if interception store is used, FALSE otherwise
      |                           ^
note: « isintstore » déclaré ici

Proposed solution

Change lines 79 and 80 of frun_GR5H.f90 to an if-else statement:

      IF (Imax .LT. 0.) THEN
        IsIntStore = .FALSE.
      ELSE
        IsIntStore = .TRUE.
      ENDIF
Assignee
Assign to
Time tracking