This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/24172] [4.1 Regression] error: incorrect sharing of tree nodes



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]