source: CIVL/mods/dev.civl.abc/examples/fortran/commonblock/bug_common_read_uninitialized.f

main
Last change on this file was aad342c, checked in by Stephen Siegel <siegel@…>, 3 years ago

Performing huge refactor to incorporate ABC, GMC, and SARL into CIVL repo and use Java modules.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5664 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 433 bytes
Line 
1! This program accidentally uses the "wrong" common
2! block in SUB, resulting in uninitialized variables
3! being used.
4 PROGRAM MAIN
5 INTEGER A
6 REAL F,R,X,Y
7 COMMON /MC/ R,A,F
8 COMMON /MCD/ RD,AD,FD
9 A = 5
10 R = 3.5
11 CALL SUB(X,Y)
12 WRITE(*,*) F
13 END
14
15 SUBROUTINE SUB(P,Q)
16 INTEGER I
17 REAL A,B,P,Q
18 COMMON /MCD/ A,I,B
19 B = I + 2*A
20 END
Note: See TracBrowser for help on using the repository browser.