public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: nicolas.tisserand@lrde.epita.fr
To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org
Subject: c++/7053: ICE when declaring a function already defined as a friend method of a template class
Date: Mon, 17 Jun 2002 05:07:00 -0000	[thread overview]
Message-ID: <E17JuCW-0000g3-00@ouarzazate.lrde.epita.fr> (raw)


>Number:         7053
>Category:       c++
>Synopsis:       ICE when declaring a function already defined as a friend method of a template class
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 17 04:06:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.1.1 20020606 (Debian prerelease) (Debian testing/unstable)
>Organization:
LRDE
>Environment:
System: Linux ouarzazate 2.4.17 #1 Sun Mar 10 19:25:30 CET 2002 i686 unknown
Architecture: i686

	
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1.1ds1/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/g++-v3-3.1 --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu --enable-threads=posix --enable-java-gc=boehm --enable-objc-gc i386-linux
>Description:

gcc does not tolerate a redeclaration of a friend method,
oustside of its original class, when the parameter is
template dependent.

g++-3.1 -v -save-temps ICE.cc                                                                                                                   12:55
Reading specs from /usr/lib/gcc-lib/i386-linux/3.1.1/specs
Configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1.1ds1/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/g++-v3-3.1 --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu --enable-threads=posix --enable-java-gc=boehm --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.1.1 20020606 (Debian prerelease)
 /usr/lib/gcc-lib/i386-linux/3.1.1/cpp0 -lang-c++ -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=1 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i386__ ICE.cc ICE.ii
GNU CPP version 3.1.1 20020606 (Debian prerelease) (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/usr/i386-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++-v3-3.1
 /usr/include/g++-v3-3.1/i386-linux
 /usr/include/g++-v3-3.1/backward
 /usr/local/include
 /usr/lib/gcc-lib/i386-linux/3.1.1/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i386-linux/3.1.1/cc1plus -fpreprocessed ICE.ii -quiet -dumpbase ICE.cc -version -o ICE.s
GNU CPP version 3.1.1 20020606 (Debian prerelease) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.1.1 20020606 (Debian prerelease) (i386-linux)
        compiled by GNU C version 3.1.1 20020606 (Debian prerelease).
ICE.cc: In instantiation of `void bar(A<int>)':
ICE.cc:13:   instantiated from here
ICE.cc:4: Internal compiler error in regenerate_decl_from_template, at cp/pt.c:
   9779
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

>How-To-Repeat:

template <class T>
struct A
{
  friend void bar(A<T> a) {}
};

void bar(A<int>);

int main()
{
  A<int> a;

  bar(a);
}

>Fix:

I do not know.
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-06-17 11:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-17  5:07 nicolas.tisserand [this message]
2002-06-17  7:14 lerdsuwa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E17JuCW-0000g3-00@ouarzazate.lrde.epita.fr \
    --to=nicolas.tisserand@lrde.epita.fr \
    --cc=debian-gcc@lists.debian.org \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).