Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
61 Views

xutility(809): error : assertion failed: pop_scope

Hi,

I am getting the following error using intel c++ compiller only in debug model

D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xutility(809): error : assertion failed: pop_scope: unexpected curr_object_lifetime for function or block scope (shared/cfe/edgcpfe/scope_stk.c, line 9045)
1>
1>            _NOEXCEPT_OP(_NOEXCEPT_OP(!_Pred(_Left, _Right))
1>            ^

I am using Visual Studio 2015 Enterprise Update 2  with Intel C++ 16.0 update 3. And I use "using namespace std;" in the header file.

In addition, I use boost 1.16.0 and pybind11 in my project.

The error will not emerge in Release Mode.

When using Visual C++ compiler,  there is no error found.

Is anybody could give me some suggestions.

Thanks,

Xia

0 Kudos
6 Replies
Highlighted
61 Views

This looks like a compiler bug.

Can you attach the preprocessed file? (Use the -E switch on the compilation line that fails, redirect standard output to a text file, and attach the text file to your reply.)  Also please show the command line which failed.

Thanks for the report. --Melanie

0 Kudos
Highlighted
Beginner
61 Views

My building command line in VS2015 is 

/GS /W0 /Zc:wchar_t /ZI /Od /Fd"x64\Debug\vc140.pdb" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Zc:forScope /RTC1 /MDd /Fa"x64\Debug\" /EHsc /nologo /Fo"x64\Debug\" /Qprof-dir "x64\Debug\" /Fp"x64\Debug\Energy.pch"  -E

And the output of MSBuild is in file out.txt

Thanks.

 

0 Kudos
Highlighted
Beginner
61 Views

The out.txt file

0 Kudos
Highlighted
61 Views

I can reproduce this problem and I opened DPD200411626 in our internal bug tracking database. Thanks for the report.

0 Kudos
Highlighted
Employee
61 Views

 

The compiler seems to have a problem because the lambda is a c++14 generic lambda.

If you specify the parameter types to the lambda instead of using "auto" the compiler will work ok, i.e. change the code to match what's inside the #ifdef OK here:

void System::readxyzfile(const std::basic_string &filename) {
#ifdef OK
  typedef shared_ptr<Atom>  param_type;
#endif
  for (auto &mol : mol_lst)
    mol->atom_lst.sort(
#ifdef OK
        [](const param_type& a, const param_type& b) { return a->seq < b->seq; }
);
#else
        [](const auto &a, const auto &b) { return a->seq < b->seq; });
#endif
}
~

 

0 Kudos
Highlighted
Beginner
61 Views

After change the  c++14 generic lambda, my project can compile with intel  c++ compiller.

Thank you very much for your help.

But I really can' t understand that intel  compiler doesn't support C++14 on windows in the era of GCC6 already set C++14 as default option.

 

0 Kudos