------- Comment #3 from mikael at gcc dot gnu dot org  2009-01-05 14:35 -------
(In reply to comment #2)
> The .mod looks OK though - as far I can see (rearrangements; only one
> "testcommon1" etc. instead of two).
> 
The test2.mod is wrong I think.
Without USE TEST3:
[...]
(('testcommon1' 2 0 0 'testcommon1') ('testcommon2' 3 0 0 'testcommon2')
('testcommon3' 4 0 0 'testcommon3'))

()

(2 'testchar' 'test2' 'testchar' 1 ((VARIABLE UNKNOWN-INTENT
UNKNOWN-PROC UNKNOWN UNKNOWN IN_COMMON) (CHARACTER 1 0 0 CHARACTER ((
CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '80'))) 0 0 () () 0 () () () 0 0)
3 'testint' 'test2' 'testint' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
UNKNOWN UNKNOWN IN_COMMON) (INTEGER 4 0 0 INTEGER ()) 0 0 () () 0 () ()
() 0 0)
4 'testreal' 'test2' 'testreal' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
UNKNOWN UNKNOWN IN_COMMON) (REAL 4 0 0 REAL ()) 0 0 () () 0 () () () 0 0)
)

('testchar' 0 2)



With USE TEST3:
[...]
(('testcommon1' 2 0 0 'testcommon1') ('testcommon2' 3 0 0 'testcommon2')
('testcommon3' 4 0 0 'testcommon3'))

()

(5 'testchar' 'test2' 'testchar' 1 ((VARIABLE UNKNOWN-INTENT
UNKNOWN-PROC UNKNOWN UNKNOWN IN_COMMON) (CHARACTER 1 0 0 CHARACTER ((
CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '80'))) 0 0 () () 0 () () () 0 0)
3 'testint' 'test3' 'testint' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
UNKNOWN UNKNOWN IN_COMMON) (INTEGER 4 0 0 INTEGER ()) 0 0 () () 0 () ()
() 0 0)
2 'testchar' 'test3' 'testchar' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
UNKNOWN UNKNOWN IN_COMMON) (CHARACTER 1 0 0 CHARACTER ((CONSTANT (
INTEGER 4 0 0 INTEGER ()) 0 '80'))) 0 0 () () 0 () () () 0 0)
4 'testreal' 'test3' 'testreal' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
UNKNOWN UNKNOWN IN_COMMON) (REAL 4 0 0 REAL ()) 0 0 () () 0 () () () 0 0)
)

('testchar' 0 5)


With USE TEST3, testreal, testint and testchar are included from module test3,
which is wrong because everything is private in test3. We should either have
variables from both test2 and test3, or only variables from test2. Furthermore,
the 'testcommon1' common refers to 2, which is the wrong testchar (that from
test3).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38657

Reply via email to