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

internal error: assertion failed at: "shared/cfe/edgcpfe/lower_init.c", line 1454

Translation unit produced when compiling [some proprietary code]:

]$ icpc -w0 -std=c++11 ice.ii
ice.ii(293566): internal error: assertion failed at: "shared/cfe/edgcpfe/lower_init.c", line 1454

                  do { ::boost::unit_test::unit_test_log . set_checkpoint( boost::unit_test::const_string( "/some/obfuscated/string", sizeof( "/some/obfuscated/string" ) - 1 ), static_cast<std::size_t>(168) ); ::boost::test_tools::tt_detail::check_impl( (false && controller->ErrorText(). c_str()), ::boost::unit_test::lazy_ostream::instance() << boost::unit_test::const_string( "false && controller->ErrorText().c_str()", sizeof( "false && controller->ErrorText().c_str()" ) - 1 ), boost::unit_test::const_string( "/some/obfuscated/string", sizeof( "/some/obfuscated/string" ) - 1 ), static_cast<std::size_t>(168), ::boost::test_tools::tt_detail::REQUIRE, ::boost::test_tools::tt_detail::CHECK_PRED, 0 );} while( ::boost::test_tools::dummy_cond );
                                                                                                                                                                                                                  ^

compilation aborted for ice.ii (code 4)


Translation unit attached.

0 Kudos
3 Replies
Highlighted
24 Views

Hi dmantipov,

I've removed your attachment to protect your source as you mentioned it has proprietary code. Let me know if you want me to upload it back...(you can send private message if you have proprietary code, or you can submit issues on premier.intel.com)

Back to your issue, I can reproduce it and I'll take a look to cut it down and report to developer.

Thanks,

Shenghong

0 Kudos
Highlighted
24 Views

Hi dmantipov,

I've submit your issue to developer and wait for a fix. Test case as below:

typedef unsigned long size_t;
namespace std __attribute__ ((__visibility__ ("default"))) {
	template<typename>     class allocator;
	template<class _CharT>     struct char_traits;
	template<typename _CharT, typename _Traits = char_traits<_CharT>,            typename _Alloc = allocator<_CharT> >     class basic_string;
	typedef basic_string<char>    string;
};
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
	template<typename _Tp>     class new_allocator     {
	public:       typedef size_t     size_type;
				  template<typename _Tp1>         struct rebind         {
					  typedef new_allocator<_Tp1> other;
				  };
	};
}
namespace std {
	template<typename _Tp>     using __allocator_base = __gnu_cxx::new_allocator<_Tp>;
	template<typename _Tp>     class allocator: public __allocator_base<_Tp>     {
	public:       typedef size_t     size_type;
				  ~allocator() throw() {
				  }
	};
	template<typename _CharT, typename _Traits, typename _Alloc>     class basic_string     {
		typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type;
		typedef typename _CharT_alloc_type::size_type	    size_type;
		struct _Alloc_hider : _Alloc       {
		};
	private:              mutable _Alloc_hider	_M_dataplus;
	public:                     size_type       copy(_CharT* __s, size_type __n, size_type __pos = 0) const;
								const _CharT*       c_str() const noexcept       {
								}
	};
	template<typename CharT> class basic_wrap_stringstream {
	};
	typedef basic_wrap_stringstream<char>       wrap_stringstream;
	class sp_counted_base {
		int use_count_;
		int weak_count_;
	public:     sp_counted_base(): use_count_( 1 ), weak_count_( 1 )     {
				}
				void release()      {
				}
	};
	class shared_count {
	private:     sp_counted_base * pi_;
	public:     shared_count(): pi_(0)      {
				}
				~shared_count()      {
					if( pi_ != 0 ) pi_->release();
				}
	};
	template<class T> class shared_ptr {
		shared_count pn;
	};
	class predicate_result {
	public:     predicate_result( bool pv_ )      {
				}
	private:         shared_ptr<wrap_stringstream> m_message;
	};

	template<class R, class F, class L> class bind_t;
	struct logical_and;
	template< class A1, class A2 > class list2{
	};
	template<class T> struct add_value {
	};
	template<class R, class F, class L, class A2> bind_t< bool, logical_and, list2< bind_t<R, F, L>, typename add_value<A2> ::type > > operator && (bind_t<R, F, L> const & f, A2 a2) {
	}
	bool testcase_foo(predicate_result const& pr);
	class testcase_class {
	public: 	virtual std::string ErrorText() const;
	};
	void testcase_func() {
		testcase_class* controller=new testcase_class();
		testcase_foo( 		(false && controller->ErrorText(). c_str()) 	);
  }
  }

# g++ case1.cpp -c -std=c++0x -O0
# icc case1.cpp -c -std=c++0x -O0
case1.cpp(75): internal error: assertion failed at: "shared/cfe/edgcpfe/lower_init.c", line 1454

                testcase_foo(           (false && controller->ErrorText(). c_str())     );
                ^

compilation aborted for case1.cpp (code 4)
# icc -V
Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.1.133 Build 20141023
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

#

Thanks,

Shenghong

0 Kudos
Highlighted
24 Views

Hi dmantipov,

FYI. This issue is fixed in 2015 U3 release. See below:

$ source /opt/intel/composer_xe_2015.2.164/bin/compilervars.sh intel64
$ icc temp.cpp -std=c++11 -c
temp.cpp(76): internal error: assertion failed at: "shared/cfe/edgcpfe/lower_init.c", line 1454

          testcase_foo(         (false && controller->ErrorText(). c_str())     );
          ^

compilation aborted for temp.cpp (code 4)
$ source /opt/intel/composer_xe_2015.3.187/bin/compilervars.sh intel64
$ icc temp.cpp -std=c++11 -c
$

Thanks,

Shenghong

0 Kudos