Bug 11461 - [3.3 Regression] internal compiler error: in build_modify_expr, at cp/typeck.c:5346
Summary: [3.3 Regression] internal compiler error: in build_modify_expr, at cp/typeck....
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.3.1
: P2 critical
Target Milestone: 3.3.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-08 09:19 UTC by have
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: Linux-2.4.20 i686
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description have 2003-07-08 09:19:32 UTC
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)); 
}
Comment 1 Andrew Pinski 2003-07-08 13:01:13 UTC
I do not get an ICE on 3.3.1 (20030616) or the mainline (20030707), I will try a newer version of 
3.3.1 to see if the ICE happens, if it does then this is a regression.
Comment 2 Wolfgang Bangerth 2003-07-08 13:38:20 UTC
I don't get an ICE with gcc 3.3 release as well. You didn't say which flags you
used for compilation, though. Would you mind posting the exact
command line that triggers the error for you, as well as the output
of gcc -v?

Thanks
  Wolfgang
Comment 3 Andrew Pinski 2003-07-08 16:09:53 UTC
I cannot reproduce it on 3.3.1 (20030707). Can you provide the output which contains the ICE?
Comment 4 have 2003-07-09 08:29:21 UTC
My version of g++ is 
> g++ -v 
Reading specs from /usr/lib/gcc-lib/i386-linux/3.3.1/specs 
Configured with: ../src/configure -v 
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr 
--mandir=/usr/share/man --infodir=/usr/share/info 
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib 
--enable-nls --without-included-gettext --enable-__cxa_atexit 
--enable-clocale=gnu --enable-debug --enable-java-gc=boehm 
--enable-java-awt=xlib --enable-objc-gc i386-linux 
Thread model: posix 
gcc version 3.3.1 20030626 (Debian prerelease) 
 
I do not use any flag :  
> g++ ice.cpp 
ice.cpp: In function `int main()': 
ice.cpp:14: internal compiler error: in build_modify_expr, at cp/typeck.c:5346 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
Comment 5 Andrew Pinski 2003-07-09 11:21:14 UTC
Closing as Wolfgang nor I could reproduce this bug. Since you are using a Debian prerelease, I 
would report it to Debian because it might just be that a newer version removes the problem.