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

Internal error: assertion failed at "shared/cfe/edgcpfe/lower_il.c"

Berger__Sven
Novice
3,333 Views

We have the following problem which occurs with 19.0.5.281 and 19.1.1.217 on Linux. No issues with GCC 9.1, 9.2, 9.3, 10, Clang7.1/9.1 or PGI-19-10.

Internal error: assertion failed at: "shared/cfe/edgcpfe/lower_il.c", line 11913

struct make_shared_enabler: public table {

compilation aborted ... (code 4)

Compiler flags:

It fails with both:

#default

-Wall -Werror -std=c++14 -fopenmp

#production

-O2 -fp-model consistent -fimf-arch-consistency=true 

#debug

-O0 -g

 

Code:

std::shared_ptr<table> make_table(){

  struct make_shared_enabler : public table {

    make_shared_enabler() = default;

};

return std::make_shared<make_shared_enabler>();

}

0 Kudos
1 Solution
Viet_H_Intel
Moderator
3,262 Views

Thanks for the test case. I've reported this problem to our Front End team.

 

View solution in original post

0 Kudos
8 Replies
AbhishekD_Intel
Moderator
3,333 Views

Hi,

Thank you for reporting the issue, will you please send a small reproducer of it so that we can reproduce it at our end.

We tried your provided code snippet but it didn't get us any errors on both 19.0.5.281 and 19.1.1.217. So please share with us a small reproducer.

 

Warm Regards,

Abhishek

 

 

0 Kudos
Berger__Sven
Novice
3,321 Views

Hi,

I was not able to get find a minimal example. The following workaround works:

#if defined(CONF_INTEL_COMPILER)
class make_shared_enabler: public table{
public:
make_shared_enabler() = default;
};
#endif

std::shared_ptr<table> make_table () {
#if not defined(CONF_INTEL_COMPILER)
struct make_shared_enabler : public table {
make_shared_enabler () = default;
};
#endif

return std::make_shared<make_shared_enabler>();
}

 

The workaround doesnot compile with GCC.

 

0 Kudos
Berger__Sven
Novice
3,333 Views

We currently don't have a small reproducing example. I will investigate further.

The snippet is from https://github.com/skystrife/cpptoml but I have not tried if the examples fail. Our software compilation fails due to our usage of the mentioned library. 

0 Kudos
AbhishekD_Intel
Moderator
3,300 Views

Hi,

Glad to know that your workaround worked.

Please give us details of the architecture which you are using. Because we are not getting the errors that you are getting while executing your code snippet.

If possible also give us a small reproducer to reproduce this error from our side. It will help us to report it as a bug if we can reproduce it.



Warm Regards,

Abhishek


0 Kudos
Viet_H_Intel
Moderator
3,287 Views

Can you find out what source file that compiler throws this error, then create a preprocess file and provide it to us for investigation?


0 Kudos
Berger__Sven
Novice
3,269 Views

Attached is the preprocessed file.

0 Kudos
Viet_H_Intel
Moderator
3,263 Views

Thanks for the test case. I've reported this problem to our Front End team.

 

0 Kudos
Viet_H_Intel
Moderator
2,376 Views

This issue is fixed in oneAPI 2021 Update 4. Please upgrade your compiler.

 

We are going to close this thread. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.

 

Thanks,

 

0 Kudos
Reply