[Insight-developers] MSVC8.0 Internal Compiler Error (ICE)

Dan Mueller d.mueller at qut.edu.au
Thu Mar 29 02:07:08 EST 2007


Hi all,

I have extended/mangled WrapITK to create ITK wrappers for .NET CLR 
languages (ie. C#, VB.NET, IronPython, etc.). I intend to release this 
via the Insight Journal in the coming days. However, before I do I have 
an issue with the ITK base code I would like to clear up: a nasty MSVC 
internal compiler error (ICE) caused by using a superclass method from a 
private inherited parent.

It's hard to provide all the code I am using, so here is a summary of my 
investigations:

*The error:*
C:\InsightToolkit-3.2.0-CVS\Code\Common\itkConstShapedNeighborhoodIterator.h(234) 
: fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'msc1.cpp', line 1393)
To work around this problem, try simplifying or changing the program 
near the locations listed above.

*The offending code: *itkConstShapedNeighborhoodIterator.h(234)*: *
Superclass::GetImagePointer;
Superclass::GetRadius;
Superclass::GetIndex;
...

*The problem:*
class ITK_EXPORT ConstShapedNeighborhoodIterator
  :  *private* NeighborhoodIterator<TImage, TBoundaryCondition>

*The fix:*
const ImageType * GetImagePointer(void) const { return 
Superclass::GetImagePointer(); }
const SizeType GetRadius() const { return Superclass::GetRadius(); }
virtual IndexType GetIndex(void) const { return Superclass::GetIndex(); }
...

*My questions:*
1. Has anyone else run into this before?
2. Am I the only person who /will /ever run into this (because of the 
funky C++/CLI stuff I am doing to wrap ITK for .NET)?
3. Is it worth/possible to fix this in the CVS (I can provide a 
diff/patch if necessary)?

*FYI: my system:*
Platform: Windows XP SP2
Computer: Intel Pentium 3.00 GHz, dual core
Compiler: Microsoft Visual Studio 2005 (v8.050727.363 ie. SP1 Beta)
CMake: 2.4.2
ITK: 3.2.0 CVS on Tues 27 Mar 2007

Thanks for your time.

Cheers, Dan 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20070329/7a9d95c2/attachment.htm


More information about the Insight-developers mailing list