Once again (see PR27547) the C++ frontend stumbles over an invalid operator: ======================== struct A { operator int&(int); }; A a; int& i = a; ======================== n4.cc:3: error: 'A::operator int&(int)' must take 'void' n4.cc:7: internal compiler error: Segmentation fault Please submit a full bug report, [etc.] This happens since GCC 3.3.4. Posting a patch soon.
Subject: Bug 28852 Author: reichelt Date: Sat Aug 26 00:25:59 2006 New Revision: 116463 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116463 Log: PR c++/28852 * cp-tree.h (grok_op_properties): Return bool instead of void. * decl.c (grokfndecl): Discard invalid operator declarations. (copy_fn_p): Revert change for PR 27547. (grok_op_properties): Return error status (true on success). * pt.c (tsubst_decl): Discard invalid operator declarations. * g++.dg/other/operator1.C: Add error-marker. * g++.dg/other/operator2.C: New test. Added: trunk/gcc/testsuite/g++.dg/other/operator2.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/decl.c trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/other/operator1.C
Fixed on mainline. WONTFIX on the branches, see http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00960.html