- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fold expression will generate the following error message only when the value is not used:
"internal error: assertion failed: node_has_side_effects: bad node kind ... "
(compiled with icc -std=c++17)
template<int... I> void f1(int* a) { auto x = (a + ...); } template<int... I> void f2(int* a) { (a + ...); } void g() { int a[1]; f1<0>(a); // ok f2<0>(a); // internal error }
Is there any solution to this problem?
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What compiler version you used?
$ cat t.cpp
template<int... I>
void f1(int* a)
{
auto x = (a + ...);
}
template<int... I>
void f2(int* a)
{
(a + ...);
}
void g()
{
int a[1];
f1<0>(a); // ok
f2<0>(a); // internal error
}
$ icpc t.cpp -std=c++17 -c
$
$ icpc -V
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.0.5.281 Build 20190815

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