Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7679 Discussions

// icpx ICE on illegal code in HandleDestructionImpl

vzecca
Beginner
445 Views

The following illegal code provokes an ICE in icpx Version 2021.1 NextGen Beta Build 20200304

Even though the code is illegal the compiler should not crash but give a meaningful error message and end quietly.

 

// icpx ICE on illegal code in HandleDestructionImpl
union b; // this is illegal

struct S {
template <typename>
void a()
try {
} catch (int ()
noexcept (({ union b a; true; })))
{
}
};

 

Labels (1)
0 Kudos
4 Replies
RahulV_intel
Moderator
421 Views

Hi,

 

On compiling your code snippet with the latest build, I could see the following error messages.

bug_union.cpp:8:22: error: variable has incomplete type
      'union b'
noexcept (({ union b a; true; })))
                     ^
bug_union.cpp:1:7: note: forward declaration of 'b'
union b; // this is illegal
      ^
1 error generated.
compilation aborted for bug_union.cpp (code 1)

 

Looks like this issue is fixed in the latest ICPX build (icpx (ICX) 2021.1 Beta 20200715).

 

Could you upgrade to the latest build and try?

 

Thanks,

Rahul

 

RahulV_intel
Moderator
409 Views

Hi,


Let me know if I can close this thread from my end.


Thanks,

Rahul


vzecca
Beginner
407 Views
RahulV_intel
Moderator
406 Views

Thanks for the confirmation.

Intel will no longer monitor this thread. Henceforth, any further discussion on this thread will be considered as a community response.


Reply