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]

c++/9847: g++-3.4 ice on :?-operator with double class definition in expand_expr


>Number:         9847
>Category:       c++
>Synopsis:       g++-3.4 ice on :?-operator with double class definition in  expand_expr
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 25 12:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Rasmus Hahn
>Release:        unknown-1.0
>Organization:
>Environment:
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-threads --enable-languages=c,c++,objc : (reconfigured)  : (reconfigured) 
Thread model: posix
gcc version 3.4 20030225 (experimental)
>Description:
Internal compiler error after redifinition of class (QString in this case) and when compiling
:?-conditional expression. I suspect this is a variant of PR9440, but i do not know for
sure and perhaps this might help to correct any of these. Of course the How-To-Repeat program is not legal C-Code. The ICE does not show if the conditional depends not on
Variable 'x' but on constant value, for example '1'.
This bug is in my Version 3.4 but not in my Version 3.3-20021206 as the case for PR9440.

$ g++ cc 
compiler-3.4-failuref.cc:3: warning: `class QString' only defines private 
   constructors and has no friends
compiler-3.4-failuref.cc:8: error: redefinition of `class QString'
compiler-3.4-failuref.cc:3: error: previous definition of `class QString'
compiler-3.4-failuref.cc: In function `const QString q()':
compiler-3.4-failuref.cc:14: internal compiler error: in expand_expr, at expr.c
   :8704
Please submit a full bug report,...
>How-To-Repeat:
compiler-3.4-failuref.cc:
class QString
{
  QString (const QString & a);
};


class QString { };

const QString q () {
  QString z;
  int x;
  /* no error if next 'x' is constant */
  return x ? QString () : QString ();
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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