error: unable to do dynamic initialization

Published: 03/30/2012, Last Updated: 03/30/2012


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.

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


Product and Performance Information


Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804