- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to compile the following code with icpc 16.0.3. And I am getting an internal assertion failure error:
Internal error: assertion failed at: "shared/cfe/edgcpfe/decl_spec.c", line 9392
Here is a minimal sample code to re-produce it (and also a workaround that I am currently using)
#include <iostream>
struct MiddleEarth
{
static constexpr char wizard[] = "Gandalf";
};
constexpr char MiddleEarth::wizard[];
template <typename T> struct Numenor
{
static constexpr char king[] = "pharazon";
/* static const char king[]; */ // workaround
};
template <typename T>
constexpr char Numenor<T>::king[];
// workaround
/* template <typename T> */
/* const char Numenor<T>::king[] = "pharazon"; */
int main(int argc, char *argv[])
{
std::cout << "The greatest wizard is " << MiddleEarth::wizard << std::endl; // works
std::cout << "The greatest king is " << Numenor<int>::king << std::endl; // fails return 0;
}
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I cannot reproduce this assertion failure with our latest 16.0 compiler.
I'm pretty sure this was fixed on 5/10 by the fix for DPD20038225 which allows a flexible array member type as a constexpr variable.
16.0 update 4 should available soon so please confirm that it is fixed.
Sorry for the inconvenience.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Judith,
The above issue is NOT present in 16.0.1, but is there in 16.0.2 and 16.0.3, so it looks like a regression.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes that is true. The cq number is DPD200382225 which was a regression from the fix for DPD200374125 which went into 16.0 on 12/7/2015.
Sorry for the inconvenience.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page