icpc 14.0 compiler bug (array)

icpc 14.0 compiler bug (array)

Another compiler bug in icpc 14, reporting here because I can't access premier

[build@fc19jslave09 ~]$ cat u.cpp
#include <array>
#include <string>

std::array<std::string, 2> priority_names =
     std::string("NOT USED"),

std::string t (uint32_t prop)
   uint32_t log = 0;

    for (; prop > 1; ++log)
      prop >>= 1;

    return priority_names[log];

[build@fc19jslave09 ~]$ g++ -std=c++11 -c u.cpp
[build@fc19jslave09 ~]$ icpc -std=c++0x -c u.cpp
/usr/include/c++/4.8.1/array(162): error: a constexpr member function is only permitted in a literal class type
        size() const noexcept { return _Nm; }
          detected during instantiation of class "std::array<_Tp, _Nm> [with _Tp=std::string, _Nm=2UL]" at line 4 of "u.cpp"

compilation aborted for u.cpp (code 2)
[build@fc19jslave09 ~]$ icpc --version
icpc (ICC) 14.0.0 20130728
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.

[build@fc19jslave09 ~]$ g++ --version
g++ (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO

Downloadtext/plain icc14bug-2.txt1.16 KB
7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

This was done on a Fedora 19 system, that ships with GCC 4.8.1 as compiler out of the box

The thread's title looks the same as your another thread ( icpc 14.0 compiler bug / without ( array ) ) but I see now that the problem is different.

Yes, 2 blocking issues I reproduced in a few minutes after trying the recent release on our TAOX11 product.

I think if you try to compile the testcase such as

'#include <array>
struct A { A(int); };
const std::array<A, 4> x = {{ 1, 1, 1, 1 }};'

would also get the 'error: a constexpr member function is only permitted in a literal class type' ,need a bug report then.

Yes, formally reported as bug to Intel support.

Hello John,

This is a GUN compatability issue and will be fixed in the 14.0 update1.Thanks for your issue submission.


Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today