Skip to content

Bug in MA02ID.f #111

Description

@repagh

gcc 10 spits out the following warning

[590/952] Building Fortran object slycot/CMakeFiles/_wrapper.dir/src/MA02ID.f.o
../../../slycot/src/MA02ID.f:188:21:

  184 |          DO 90 J = 1, N+1
      |                                                                        2
......
  188 |                DWORK(J-1) = DWORK(J-1) + TEMP
      |                     1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2)
../../../slycot/src/MA02ID.f:188:34:

  184 |          DO 90 J = 1, N+1
      |                                                                        2
......
  188 |                DWORK(J-1) = DWORK(J-1) + TEMP
      |                                  1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2)
../../../slycot/src/MA02ID.f:230:21:

  226 |          DO 160 J = 1, N+1
      |                                                                        2
......
  230 |                DWORK(J-1) = DWORK(J-1) + TEMP
      |                     1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2)
../../../slycot/src/MA02ID.f:230:34:

  226 |          DO 160 J = 1, N+1
      |                                                                        2
......
  230 |                DWORK(J-1) = DWORK(J-1) + TEMP
      |                                  1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2)

These specific pieces of code are not used (no wrapper, not internally in SLICOT), but it looks plain wrong. Reporting this to not forget.

Activity

  1. bnavigator commented on May 1, 2020

    @bnavigator
    Collaborator

    Slycot/slycot/src/MA02ID.f

    Lines 184 to 188 in 003a2af

    DO 90 J = 1, N+1
    DO 70 I = 1, J-2
    TEMP = ABS( QG(I,J) )
    DWORK(I) = DWORK(I) + TEMP
    DWORK(J-1) = DWORK(J-1) + TEMP

    Slycot/slycot/src/MA02ID.f

    Lines 226 to 230 in 003a2af

    DO 160 J = 1, N+1
    DO 140 I = 1, J-2
    TEMP = ABS( QG(I,J) )
    DWORK(I) = DWORK(I) + TEMP
    DWORK(J-1) = DWORK(J-1) + TEMP

    The 70 and 140 loops are inactive for 1 > J-2 because the iteration count is zero.

  2. repagh commented on May 3, 2020

    @repagh
    MemberAuthor

    OK. Thanks, false alarm thus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions