Internal Compiler Error for Structure Constructor Omitting Array Component Initialized With Scalar

Reference Number : DPD200177511

Version : 12.1

Product : Intel [Visual] Fortran Composer XE 2011

Operating System : Linux, Mac OS X, Windows

Problem Description : The compiler fails with an Internal Compiler Error when presented with a program that contains both of the following:

  • A type declaration with an array component that is given default initialization of a scalar value
  • A structure constructor for the type that omits a value corresponding to such an array component

For example:


type mytype
  real :: a = 0.0
  real :: b(3) = 0.0 ! Scalar default initial value
end type mytype

type(mytype) :: var = mytype(0.0) ! Value for b omitted


Resolution Status : This problem will be corrected in a future update to the Intel Fortran Compiler.  The error can be avoided by doing any of the following:

  • Supplying a value in the structure constructor for the array component
  • Specifying an array for the initial value in the type declaration

[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]
For more complete information about compiler optimizations, see our Optimization Notice.