error: unable to do dynamic initialization

 

Reference Number : DPD200208863


Version : 12.1


Operating System : Linux


Problem Description : Compiling code that uses the GNU* vector_size attribute results in the following error:

error: unable to do dynamic initialization

The Intel® C++ Compiler 12.1 currently does not support GNU* vector_size attribute.

Example:
 
typedef unsigned int __uint32_t;
typedef __uint32_t vector4 __attribute__((vector_size (16)));


static __attribute__((always_inline)) inline void foo( __uint32_t v )
{
  vector4 v16 = {v,v,v,v};
}
 

$ icc -V -c t.c
Intel® C Compiler XE for applications running on IA-32, Version 12.1.3.293 Build 20120212
Copyright (C) 1985-2012 Intel Corporation.  All rights reserved.

Edison Design Group C/C++ Front End, version 4.3.1 (Feb 12 2012 18:30:50)
Copyright 1988-2011 Edison Design Group, Inc.

t.c(7): error: unable to do dynamic initialization
    vector4 v16 = {v,v,v,v};
            ^

compilation aborted for t.c (code 2)



Resolution Status : This issue has been resolved in the next major release of the Intel® C++ Compiler.  This report will be updated when the compiler containing the fix becomes available.



[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.