[Bug c++/18904] New: 4.0-20041205 regression ICE with -O3

andre dot maute at gmx dot de gcc-bugzilla@gcc.gnu.org
Thu Dec 9 15:03:00 GMT 2004


the following code ICEs with  
g++-4.0-20041205 -c -O3 ice.cc 
 
/*-------------- begin of ice.cc ----------------*/ 
struct Data; 
 
struct Wrapper { 
 
        Data* D; 
 
}; 
 
 
inline void initValue( 
        Wrapper &w, 
        int Data::* res 
) { 
 
        for( int i = 0; i < 4; i++ ) 
                (w.D->*res) = 0; 
 
} 
 
 
struct Data { 
 
        int X; 
 
        void init( Wrapper &w ) { 
                w.D = this; 
                initValue(w, &Data::X); 
        } 
 
}; 
 
 
int main() { 
 
        Wrapper w; 
        Data d; 
 
        d.init(w); 
 
        return 0; 
 
} 
/*-------------- end of ice.cc ----------------*/ 
 
login > /opt/gcc-4.0-20041205/bin/g++-4.0-20041205 -v 
Reading specs from /opt/gcc-4.0-20041205/lib/gcc/i686-pc-linux-gnu/4.0.0/specs 
Configured with: ../gcc-4.0-20041205/configure --prefix=/opt/gcc-4.0-20041205 
--enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit 
--enable-languages=c,c++ --program-suffix=-4.0-20041205 
Thread model: posix 
gcc version 4.0.0 20041205 (experimental) 
 
Regards Andre

-- 
           Summary: 4.0-20041205 regression ICE with -O3
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: andre dot maute at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18904



More information about the Gcc-bugs mailing list