- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
=================
../mesh/linunimesh1d.h(42): internal error: assertion failed: copy_template_param_expr: bad expression kind (shared/edgcpfe/il.c, line 12557)
typedef typename True_Element::template Subshape
=================
Relevant definitions:
=====================
#define IF_EQUAL(Subshape_Tag, Shape_Tag)
typename bool_<:SHAPE_CLASS>::type
public:
template
template
struct Subshape
{
typedef Node type;
};
template
struct Subshape
{
typedef Edge type;
};
template
struct Subshape
{
typedef Face type;
};
typedef typename True_Element::template Subshape
====================
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
tim18:You haven't given much to go on. Did this fail only as part of a huge source file? If you want this investigated, you should file the problem report on premier.intel.com. Guessing that the compiler may have overflowed some internal table, you might try disabling interprocedural optimization or splitting the source file.
Sorry, I should have filed a better bug report, but I thought the problem was described enough that a test case could be easily generated.
My hunch is that, the error could be due to some hardcoded size limit for template expression string. I attach two files they are equivalent conceptually but one reads more complicated than other. The simple one works ("intel_nobug.cc"), while the complex one fails ("intel_bug.cc")
===intel_nobug.cc===
template
struct is_same
{
typedef void type;
};
template
struct is_same
{
typedef bool type;
};
struct A
{
template
template
struct AS
{
typedef int type;
};
template
struct AS
{
typedef double type;
};
};
template
struct B
{
typedef typename A::template AS
};
main()
{
B
}
===intel_nobug.cc===
===intel_bug.cc===
template
struct integral_constant
{
typedef integral_constant
typedef T value_type;
static const T value = val;
};
struct true_ : public integral_constant
typedef true_ type;
};
struct false_ : public integral_constant
typedef false_ type;
};
template
template<> struct bool_
template<> struct bool_
enum shape_class_t {ST_NONE, NODE, EDGE, FACE, FOLD};
struct Node_Tag
{
typedef Node_Tag Shape_Tag;
static const shape_class_t shape_class = NODE;
static const shape_class_t previous_class = ST_NONE;
static const shape_class_t next_class = EDGE;
};
struct Edge_Tag
{
typedef Edge_Tag Shape_Tag;
static const shape_class_t shape_class = EDGE;
static const shape_class_t previous_class = NODE;
static const shape_class_t next_class = FACE;
};
#define IF_EQUAL(Subshape_Tag, Shape_Tag)
typename bool_<:SHAPE_CLASS>::type
struct Node {};
struct Edge {};
struct Element
{
template
template
struct Subshape
{
typedef Node type;
};
template
struct Subshape
{
typedef Edge type;
};
};
template
struct Some
{
typedef typename Element::template Subshape
};
main()
{
Some
}
===intel_bug.cc===
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for reporting this bug. I have entered it into our internal bug
database (tracker number #82149). The problem seems to occur when
trying to copy the static data member part of the template expression inside
the IF_EQUAL macro. To workaround it, you might try changing your code
as shown in this diff:
Change the code as shown below (this removes the
use of the static data members in the template argument
expression):
sptxl2-424> diff -c intel_bug.cc fixed.cc
*** intel_bug.cc2007-12-27 21:59:28.000000000 -0500
--- fixed.cc2007-12-27 22:16:19.000000000 -0500
***************
*** 34,54 ****
#define IF_EQUAL(Subshape_Tag, Shape_Tag)
!typename bool_<:SHAPE_CLASS>::type
struct Node {};
struct Edge {};
struct Element
{
!template
template
!struct Subshape
{
typedef Node type;
};
template
!struct Subshape
{
typedef Edge type;
};
--- 34,54 ----
#define IF_EQUAL(Subshape_Tag, Shape_Tag)
!bool_<:SHAPE_CLASS>
struct Node {};
struct Edge {};
struct Element
{
!template
template
!struct Subshape
{
typedef Node type;
};
template
!struct Subshape
{
typedef Edge type;
};
thanks again for reporting this to us.
Judy
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page