Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

// icpx ICE on illegal code in HandleDestructionImpl

vzecca
Beginner
834 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
810 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

 

0 Kudos
RahulV_intel
Moderator
798 Views

Hi,


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


Thanks,

Rahul


0 Kudos
vzecca
Beginner
796 Views
0 Kudos
RahulV_intel
Moderator
795 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.


0 Kudos
Reply