public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: yuvalk@mainsoft.com To: gcc-gnats@gcc.gnu.org Cc: dekelc@mainsoft.com, jluu@mainsoft.com, zoharm@mainsoft.com Subject: c++/8116: ICE in member template function Date: Wed, 02 Oct 2002 00:06:00 -0000 [thread overview] Message-ID: <200210020701.g9271R118227@linux5.il.mainsoft.com> (raw) >Number: 8116 >Category: c++ >Synopsis: ICE in member template function >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Wed Oct 02 00:06:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Yuval Kfir >Release: 3.2 >Organization: Mainsoft Co. Ltd. >Environment: System: Linux twins 2.4.18-3custom #1 SMP Thu Sep 19 12:30:28 IDT 2002 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc-3.2/configure --prefix=/usr/gcc/3.2 --enable-languages=c,c++ >Description: When compiling this small file I get the following message: ........................................................... tmplbug.cpp: In function `void fff()': tmplbug.cpp:16: Internal compiler error in tsubst_decl, at cp/pt.c:5648 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. ........................................................... This also happens if the template function is the constructor of com_ptr. In fact, any template function inside a template causes an ICE when it is called. GCC 2.95.3 compiles this code with no errors or warnings. >How-To-Repeat: /*********************************************/ /* Compile the following with `gcc -c x.cpp' */ /*********************************************/ template <class T> struct MY_PLACEHOLDER { static int m_iid; }; template <const int* iid> class com_ptr { public: com_ptr() { } template<typename Q> bool operator==(Q p){return 1;} }; void fff() { com_ptr<&MY_PLACEHOLDER<int>::m_iid> A; if(A==2){} } /*********************************************/ >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-10-02 7:06 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-10-02 0:06 yuvalk [this message] 2002-10-27 6:48 lerdsuwa 2002-10-27 7:46 Reichelt
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=200210020701.g9271R118227@linux5.il.mainsoft.com \ --to=yuvalk@mainsoft.com \ --cc=dekelc@mainsoft.com \ --cc=gcc-gnats@gcc.gnu.org \ --cc=jluu@mainsoft.com \ --cc=zoharm@mainsoft.com \ /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: linkBe 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).