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 c++/11461] New: internal compiler error: in build_modify_expr, at cp/typeck.c:5346


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: internal compiler error: in build_modify_expr, at
                    cp/typeck.c:5346
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: have at ann dot jussieu dot fr
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: Linux-2.4.20 i686

Compiling the following code make an internal compiler error. 
However, gcc 3.2.3, 3.0.4 and 2.95.4 compile this piece of code without any 
error or warning.  
Moreover with 3.3.1 (gcc version 3.3.1 20030626 (Debian prerelease)), if 
'integer' is declared when used (see integer2) compilation is also OK. 
---%<--------------------- 
struct Parameter { 
  virtual ~Parameter() { } 
}; 
 
struct IntegerParameter : public Parameter { 
  int __intValue; 
  operator int&() { return __intValue; } 
}; 
 
int main() { 
  IntegerParameter ip; 
  Parameter* p = &ip; 
  int integer; 
  integer = static_cast<int&>(dynamic_cast<IntegerParameter&>(*p)); 
  // int integer2 = static_cast<int&>(dynamic_cast<IntegerParameter&>(*p)); 
}


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