public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/22545] New: ICE with pointer to class member & user defined conversion operator
@ 2005-07-18 12:19 paul dot woegerer at nsc dot com
  2005-07-18 12:28 ` [Bug c++/22545] " paul dot woegerer at nsc dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: paul dot woegerer at nsc dot com @ 2005-07-18 12:19 UTC (permalink / raw)
  To: gcc-bugs

Compiling the example below with g++ from snapshot 4.1.0 20050716 causes
the following error message:

> g++ -S cpp_parse_internal_error.cpp

cpp_parse_internal_error.cpp: In function 'int main()':
cpp_parse_internal_error.cpp:23: internal compiler error: tree check: expected
class 'type', have 'exceptional' (error_mark) in is_complete, at cp/call.c:1567

Compiling the same example with 3.4.4 works perfectly and correctly returns 13
as result. The behaviour does not depend on the optimization level (O0, O3 all
the same)

------------------------------------------- cpp_parse_internal_error.cpp

struct A {
  int member;
  A() : member(13) {}
};

A a;

struct B {
  operator A*() { return &a; }
};

B b;

int A::* member_pntr = &A::member;

int main()
{
  // That one WORKS
  // A *a_pntr = b;
  // return a_pntr ->* member_pntr;

  // But this one causes an INTERNAL ERROR
  return b ->* member_pntr;
}

-- 
           Summary: ICE with pointer to class member & user defined
                    conversion operator
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paul dot woegerer at nsc dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-09-01 11:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-18 12:19 [Bug c++/22545] New: ICE with pointer to class member & user defined conversion operator paul dot woegerer at nsc dot com
2005-07-18 12:28 ` [Bug c++/22545] " paul dot woegerer at nsc dot com
2005-07-18 14:35 ` [Bug c++/22545] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-07-22 21:17 ` pinskia at gcc dot gnu dot org
2005-07-25  1:04 ` mmitchel at gcc dot gnu dot org
2005-07-25 11:47 ` reichelt at gcc dot gnu dot org
2005-07-28 18:10 ` cvs-commit at gcc dot gnu dot org
2005-07-28 19:16 ` cvs-commit at gcc dot gnu dot org
2005-07-28 19:18 ` [Bug c++/22545] [3.4 " mmitchel at gcc dot gnu dot org
2005-07-28 19:23 ` pinskia at gcc dot gnu dot org
2005-09-01  9:15 ` reichelt at gcc dot gnu dot org
2005-09-01 11:48 ` cvs-commit at gcc dot gnu dot org
2005-09-01 11:50 ` reichelt at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).