public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/10079: With two identical template function signatures gcc crashes instead of emitting "ambiguous" or "duplicate"
@ 2003-03-17 10:15 ehrhardt
  0 siblings, 0 replies; 4+ messages in thread
From: ehrhardt @ 2003-03-17 10:15 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, stip

Synopsis: With two identical template function signatures gcc crashes instead of emitting "ambiguous" or "duplicate"

State-Changed-From-To: feedback->analyzed
State-Changed-By: cae
State-Changed-When: Mon Mar 17 10:15:08 2003
State-Changed-Why:
    Attachment received. Confirmed with 2.95, 3.2, 3.3 and 3.4.
    
       regards  Christian

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10079


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++/10079: With two identical template function signatures gcc crashes instead of emitting "ambiguous" or "duplicate"
@ 2003-05-02 19:06 Giovanni Bajo
  0 siblings, 0 replies; 4+ messages in thread
From: Giovanni Bajo @ 2003-05-02 19:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/10079; it has been noted by GNATS.

From: "Giovanni Bajo" <giovannibajo@libero.it>
To: <gcc-gnats@gcc.gnu.org>,
	<stip@mathematik.uni-ulm.de>,
	<gcc-bugs@gcc.gnu.org>,
	<nobody@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>
Cc:  
Subject: Re: c++/10079: With two identical template function signatures gcc crashes instead of emitting "ambiguous" or "duplicate"
Date: Fri, 2 May 2003 20:58:00 +0200

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10079
 
 Very weird. I can't compress it more than this:
 ----------------------------------------------------------
 template <bool>
 struct Foo
 {};
 
 template <typename>
 struct Bar
 {};
 
 
 template <typename>
 struct true_t
 {
     enum { value = true };
 };
 
 template <typename T, typename U>
 Foo<(true_t<T>::value && true_t<T>::value)>
 func(T t, U u)
 {}
 
 template <typename T, typename U>
 void func(Bar<T>, Bar<U> )
 {}
 
 int main()
 {
     Bar<void> v;
     func(v, v);
 }
 ----------------------------------------------------------
 pr10079.cpp: In function `int main()':
 pr10079.cpp:30: internal compiler error: Segmentation fault
 Please submit a full bug report,
 
 In my wild guess, the segfault happens while trying to format the error
 message about the ambiguity of the call, which requires printing the
 declaration of the first func<> (that is quite complex).
 
 Reconfirmed on everything (2.95 -> 3.4 CVS 20030430).
 
 Giovanni Bajo
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++/10079: With two identical template function signatures gcc crashes instead of emitting "ambiguous" or "duplicate"
@ 2003-03-14 15:15 bangerth
  0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2003-03-14 15:15 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, stip

Synopsis: With two identical template function signatures gcc crashes instead of emitting "ambiguous" or "duplicate"

State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Fri Mar 14 15:15:44 2003
State-Changed-Why:
    You didn't provide an attachment or it got lost somehow.
    Without one, we can't reproduce and fix the problem. Could
    you possibly send us a sample code that shows this behavior?
    
    Thanks
      Wolfgang

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10079


^ permalink raw reply	[flat|nested] 4+ messages in thread

* c++/10079: With two identical template function signatures gcc crashes instead of emitting "ambiguous" or "duplicate"
@ 2003-03-14 11:36 stip
  0 siblings, 0 replies; 4+ messages in thread
From: stip @ 2003-03-14 11:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10079
>Category:       c++
>Synopsis:       With two identical template function signatures gcc crashes instead of emitting "ambiguous" or "duplicate"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 14 11:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     stip@mathematik.uni-ulm.de
>Release:        unknown-1.0
>Organization:
>Environment:
GNU C++ version 3.2 (sparc-sun-solaris2.9)
        compiled by GNU C version 3.2.
>Description:
One template function is given directly. An overload version of this function is created via "restricted templates, i.e. given
(1)	dummy(const V<T> &, const V<T> &)
and
(2)	dummy(const U &, const W&).
Now (2) gets instantiated in a way that the two signatures
become somewhat identical. In that case gcc stops with "Internal error", "segmentation fault".

 
>How-To-Repeat:
just compile.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-05-02 19:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-17 10:15 c++/10079: With two identical template function signatures gcc crashes instead of emitting "ambiguous" or "duplicate" ehrhardt
  -- strict thread matches above, loose matches on Subject: below --
2003-05-02 19:06 Giovanni Bajo
2003-03-14 15:15 bangerth
2003-03-14 11:36 stip

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).