Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Compiler bug?

Brooks_Van_Horn
New Contributor I
487 Views

This is a Win32 program using Compiling with Intel(R) Visual Fortran Compiler 16.0 [Intel(R) 64]...
in a MSVS 2013. I just updated my compiler to Rel 2

In progGlobals MSVS 2013 defined:

Integer, parameter, public :: ID_RESTART    = 30004  

In prog I use:

      case (WM_COMMAND)
         select case ( IAND(wParam, 16#ffff ) )
            case (ID_RESTART)    ! <== Line 374

Compiling I get:

... Prog.f90(374): error #6601: In a CASE statement, the case-value must be a constant expression.   [ID_RESTART]

I get 5 other errors that are just like this one. These are new to Rel 2.

Brooks V

0 Kudos
1 Solution
andrew_4619
Honored Contributor II
487 Views

is that due to a mismatch of type (wparam integer(8) and ID_RESTART integer(4)?

View solution in original post

0 Kudos
5 Replies
andrew_4619
Honored Contributor II
488 Views

is that due to a mismatch of type (wparam integer(8) and ID_RESTART integer(4)?

0 Kudos
Brooks_Van_Horn
New Contributor I
487 Views

No, just tried it with ID_RESTART as an Integer(8)

0 Kudos
Brooks_Van_Horn
New Contributor I
487 Views

The compiler is barfing at ID_RESTART not being a constant integer.

0 Kudos
Brooks_Van_Horn
New Contributor I
487 Views

I think the compiler got itself lost. By fixing some other errors, that one went away. I'm back debugging. Thanks much for the suggestion. I was lost and almost abandoned my programming for a while.

Brooks V

0 Kudos
Steven_L_Intel1
Employee
487 Views

More likely there was an error in the .fd file from your resource file that didn't declare the value. IMPLICIT NONE helps.

0 Kudos
Reply