Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Modules, COMMON, and PUBLIC

Intel_C_Intel
Employee
640 Views
I recompiled a program that had reliably given me 0 warnings and 0 errors on a full build for many months now using CVF v6.5a. I get 251 errors with CVF v6.6. Variables in a COMMON statement in a MODULE are no longer defined in program blocks where I USE the MODULE. I note that some error was fixed regarding MODULEs and COMMON, but I didn't think I was doing anything wrong????
0 Kudos
4 Replies
Steven_L_Intel1
Employee
640 Views
Try the 6.6A update. If the problem persists, send a problem description and example to vf-support@compaq.com

Steve
0 Kudos
Intel_C_Intel
Employee
640 Views
I think this program will demonstrate the problem I was having going from
CVF6.5 to CVF6.6/CVF6.6.A: with 6.5 I had a clean build and with 6.6 I had
over 250 errors (all complaints that variables were undeclared).

------ File A.f ------
MODULE A

USE B ! Goes away if not nested

PRIVATE ! Goes away if not PRIVATE
PUBLIC :: X ! Goes away if no PUBLIC

END MODULE A

------ File B.f ------
MODULE B

INTEGER I

COMMON /C/ I ! Goes away if not in COMMON

END MODULE B

------ File Main.f ------
PROGRAM MAIN

USE A ! Goes away if no nesting or if USE order reversed
USE B

IMPLICIT NONE

NAMELIST /N/ I

STOP

END PROGRAM MAIN

One of the things that I realize now is that I should have redesigned the
use of COMMON when I started learning to use MODULE. But, I don't think
that there is anything wrong about the use here.

Mike__
0 Kudos
Intel_C_Intel
Employee
640 Views
In the message I just posted, the Main.f should have two lines that say
USE A
USE B
The lines were run together in the posting.
0 Kudos
Steven_L_Intel1
Employee
640 Views
I get no errors building this with 6.6A. Please send a ZIP archive of your project, along with a copy of BUGREPRT.TXT filled out (you'll find it in the DF98 folder, or use the VF Reporter tool), to us at vf-support@compaq.com - we'll investigate further.

Steve
0 Kudos
Reply