public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Matthias Klose <doko@net.local>
To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org
Subject: c++/10199: [3.3 regression] method parametrized by template does not work everywhere
Date: Mon, 24 Mar 2003 07:46:00 -0000	[thread overview]
Message-ID: <E18xLVB-00079o-00@tango.net.local> (raw)


>Number:         10199
>Category:       c++
>Synopsis:       [3.3 regression] method parametrized by template does not work everywhere
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 24 06:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Thimo Neubauer <thimo@debian.org>
>Release:        3.3 CVS 20030323
>Organization:
The Debian Project
>Environment:
>Description:
[ Reported to the Debian BTS as report #185604.
  Please CC 185604@bugs.debian.org on replies.
  Log of report can be found at http://bugs.debian.org/185604 ]
	

- 3.2 CVS 20030316 rejects the code
- 3.3 CVS 20030323 ICEs in the error message (the regression)
- 3.4 CVS 20030316 compiles the code

 $ g++-3.2 bugs-185604.cc
bugs-185604.cc: In function `void bar(T&) [with T = int]':
bugs-185604.cc:26:   instantiated from here
bugs-185604.cc:18: no matching function for call to `X::bar()'

$ g++-3.3 bugs-185604.cc
bugs-185604.cc: In function `void bar(T&)':
bugs-185604.cc:18: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.


The following program is valid C++, but does not compile:

-- snip --

class X {
public:
  template<int d>
  int bar () {return d;}
};

template<int x>
int fooo ()
{
  return x;
}

template<class T>
void bar (T& g)
{
  int kk = fooo<17>();  // OK
  X x;
  int k = x.bar<17>();  // Not OK
}

int main ()
{
  X x;
  int k=x.bar<17>();    // OK
  int n;
  bar(n);
}

-- snip --
>How-To-Repeat:
	
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:
 System: Debian GNU/Linux (unstable)
 Architecture: i686


             reply	other threads:[~2003-03-24  6:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-24  7:46 Matthias Klose [this message]
2003-03-24 10:26 steven
2003-03-24 13:42 nathan
2003-03-24 18:56 nathan

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=E18xLVB-00079o-00@tango.net.local \
    --to=doko@net.local \
    --cc=185604@bugs.debian.org \
    --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).