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++/12489] New: ICE in walk_tree: same name for struct and a templated member function of another class


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

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

           Summary: ICE in walk_tree: same name for struct and a templated
                    member function of another class
           Product: gcc
           Version: 3.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: shaihi at post dot tau dot ac dot il
                CC: gcc-bugs at gcc dot gnu dot org,shaihi at post dot tau
                    dot ac dot il

Compiling the following simple code snippet causes an ICE

struct foo { }; 
struct A { template <class P> P foo() {} };

int main() 
{ 
  A::foo(); 
  return 0; 
}

[mozart] test > uname -a
Linux mozart.shai.home 2.4.19-lac #1 Thu Aug 15 18:07:38 MDT 2002 i686 unknown

[mozart] test > g++ -v
Reading specs from /usr/local/lib/gcc33/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs
Configured with: ../configure --prefix /usr/local/lib/gcc33
Thread model: posix
gcc version 3.2.3

[mozart] test > g++ gcc_bug.C
gcc_bug.C: In function `int main()':
gcc_bug.C:4: Internal compiler error in walk_tree, at tree-inline.c:1326
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

When commenting out struct foo{}; the  expected error message (no matching
function for call to `foo()') appears.


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