- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am running into the following ICE with the following relatively minimalized test case.
Internal error: assertion failed at: "shared/cfe/edgcpfe/decl_inits.c", line 588
template <char> struct Index { constexpr Index() : value_(0) { } private: int value_; }; template <int> int foo() { static constexpr Index<'i'> i; return 0; } int bar() { return foo<3>(); }
See versions below
[...]:~/test> gcc --version gcc (GCC) 6.3.0 20161221 (Cray Inc.) Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [...]:~/test> icpc --version icpc (ICC) 17.0.2 20170213 Copyright (C) 1985-2017 Intel Corporation. All rights reserved. [...]:~/test> gcc -std=c++14 -c -o test.o test.cpp [...]:~/test> icpc -std=c++14 -c -o test.o test.cpp Internal error: assertion failed at: "shared/cfe/edgcpfe/decl_inits.c", line 588 compilation aborted for test.cpp (code 4)
This can be reproduced across lots of platforms and compiler versions, though this particular instance is in the Cray Linux Environment with PrgEnv-intel/6.0.3 and gcc/6.3.0
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This seems reproducible with various icpc versions including 18.0.0.061, regardless of whether the g++ on PATH is recent enough to accept the code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for reporting this. I was able to reproduce it in our 18.0 and 17.0 compilers and have entered a bug report in our internal bugs database with number cmplrs-43144. We hope to have a fix soon.
Judy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just ran into the exact same problem again with Intel Compiler v19.0:
Internal error: assertion failed at: "shared/cfe/edgcpfe/exprutil.c", line 6647
The error appears to be random. The exact same code works perfectly fine if copied and pasted into another project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.3.304 Build 20200925_000000
Copyright (C) 1985-2020 Intel Corporation. All rights reserved.
Copyright 1988-2018 Edison Design Group, Inc.
template <char>
struct Index {
constexpr Index() : value_(0) {
}
int value_;
};
int foo() {
static constexpr Index<'i'> i;
return 0;
}
return foo<3>();
}
$

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