This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/24172] [4.1 Regression] error: incorrect sharing of tree nodes
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Oct 2005 01:26:49 -0000
- Subject: [Bug tree-optimization/24172] [4.1 Regression] error: incorrect sharing of tree nodes
- References: <bug-24172-11423@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2005-10-03 01:26 -------
Here is a slightly shorter testcase:
template<typename T = float> struct CImg;
template<typename T = float> struct CImgl;
struct IOException
{ IOException( const char * ){}
};
inline int* dummy( const char* const path, const char* const
mode )
{ throw IOException( mode[ 0 ] == 'r' ? "a" : (mode[ 0 ]
== 'w' ? "b" : "" ));
}
template<typename T> struct CImg
{ T *data;
explicit CImg( const unsigned int dx = 0 )
{
}
CImg( const char *filename )
{ CImgl<T>( filename ).get_append( 'v', 'p' );
}
};
template<typename T> struct CImgl
{ CImgl( const unsigned int )
{
}
CImgl(const char* filename)
{ dummy( filename, "rb" );
unsigned int n;
CImgl<T> res( n );
}
CImg<T> get_append( const char, const char ) const
{ CImg<T> res;
}
};
void prepare_inpaint( )
{ CImg<unsigned char> mask = CImg<unsigned char>( "" );
}
---
I have not tried to reduce it further.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24172