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++/5421: GCC 3.0 Issues ICE on explicit template member function friendship



>Number:         5421
>Category:       c++
>Synopsis:       GCC 3.0 Issues ICE on explicit template member function friendship
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 17 20:06:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Anthony Liguori
>Release:        GCC 3.0.0
>Organization:
>Environment:
Linux 2.4.7-10 #1 i686
AMD Athlon
>Description:
GCC generates an interal compiler error when declaring an explict template member function of class B as a friend of class A.  GCC correctly handles a non-explicit template member function friendship though.  It also correctly handles an explicit template function friendship.
>How-To-Repeat:
The tarball includes a sample 5 line snippet that will reproduce the ICE along with the generated .ii file and then output from the ICE.  It requires no #include files so the .ii is the same as the .C file (I've included the .ii anyway).

The command line used to attempt to compile the snippet is:

$ gcc -v -save-temps -g -c -Wall template_friend.C
>Fix:
There is no workaround other than making the friendship no longer required by making the private members public.  This is obviously not an acceptable workaround though for most cases.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="g++-bug_x_tmplt_frnd.tgz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="g++-bug_x_tmplt_frnd.tgz"

H4sIADWeRzwAA+2WWW/jNhCA/Vr9ioH3JUaqy2dWOQDHVjcGXNuwnW3eBFmmZaIyqZJUnKDof+/I
V+IoRZA23bYovxeSwzl4zFBSZJUmoSLBQlDC5lan9PE4ruM0m/WSg7RetDlus1FyWvWq23KbrVoV
9evVVr0Ezt+wlgKZVKEAKIVMLTl7/EO9t+b/o0glskjBNfwKapcKcBEloZQwvYJ7TucwO6mcw2/n
hvGKwrbTRutt/mwtrj1vdjG92tvhCSsaQfuCMnUF4bnxT29ac0C9qH9KPz7GW/VfdQ/133KcRl7/
DcfV9f8t+AQulF8mQads6Hfh/8HLq+eZSjP1sTHeqP+ak/eP6r9Rrzd0/X8LxiScUxaDTEkksVj5
CuxMCjvhUZjYCZ3ZcRSZeUubZ00zzfssezBjltk1y7E3dkaHswWNM0HmsKZq6YFlR3sRGNOlwCiw
4nOSeCAxXEIMdAv3REjKGaAj431hozR1wExCFpvR6SmY3SD4Mrj9EgSXte3g7i7o+qOx32lP/e5G
5N91/NG0NxxMDhrt617w1R9PUHiJOQrm/d5T58lTPvixNxiOUeQ8iUbtaeem73/1+we53/8hCLCX
MfqAzWbFRxNBkE/tupvpZ+InIZht+SixMi9TLncTg2HQG/R7A39nMZl2O8HNcIK7w/gumD+FSZLP
4OKCyfB23PHRTZRml7R21sTuKoyWlJHdsLtrguCos3OuMkaC/OCfj1PCFM1WqeAoLXwxChJKDVwK
dEaj59cMJ3hzeK0VONkE7uf7tfF8KgaNGRd5KjLOyAPF/TMFcypIpLh4hPKz/KAsSrI5sePTU/O+
Vv7zpsXs+ivOZmH08zoU87LxaTcDZcuyyiBJKKIl5C+NkrAkgnhPKheocvWqChRDvbNMXrMqah5r
7Uc+frX5Yr+wBA/Cem+RRm6aZBLMRSoI5k1EpMQXopgpYP6SUaLAnGN+zUJJXskvM97n+D6dTF5Q
k+/MuY02vh9H2oXNVIzvIr5KaYKLnz3CxuhgUrU+N6G6+aTVXDgZo85NqLZBoGW5GwXz81nFMgqb
8moe9JgigoUJECG48GBC4hVmHP4ZofNFmCXKGCUkPxOZzVZUQQiLDI9hlsWAp8qF+t7I31w4OmPJ
MxERoAsIU5SmgmJcy5gQzLfbcd9bKpV6tr1ery3coMVFbEu+UJi9JL9UG71La6lWyRUsuADKtv+D
uCZp6d80jUaj0Wg0Go1Go9FoNBqNRqPRaP7l/A5k/3xgACgAAA==


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