Inconsistent string declaration

An inconsistent data declaration was found.

In this case, the same name was declared as a string in two places, but the size of the string types did not match.

ID

Observation

Description

1

Definition

The first definition

2

Definition

The second definition

Example


! Use the option /align:commons for this test.
!
subroutine mysub()
    character(7) :: s
    real :: a
    common /abc/ s,a
    print *,a,s
end

real :: a
character(5) :: s
common /abc/ s,a
! different size of "s" in "/abc/". See...
a = 3.14
s = "Hello"
call mysub()
end
        

Copyright © 2010, Intel Corporation. All rights reserved.