public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44629]  New: ICE in unify, at cp/pt.c:15155
@ 2010-06-22  9:57 doko at ubuntu dot com
  2010-06-22  9:58 ` [Bug c++/44629] " doko at ubuntu dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: doko at ubuntu dot com @ 2010-06-22  9:57 UTC (permalink / raw)
  To: gcc-bugs

seen with 4.3, 4.4, 4.5, 4.6

$ gcc-4.5 -c aclib.ii 
../aclib/aclib.cpp: In function 'void ac_print_dot(acSearcher*)':
../aclib/aclib.cpp:35:61: internal compiler error: in unify, at cp/pt.c:15155
Please submit a full bug report,
with preprocessed source if appropriate.


-- 
           Summary: ICE in unify, at cp/pt.c:15155
           Product: gcc
           Version: 4.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: doko at ubuntu dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44629


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

* [Bug c++/44629] ICE in unify, at cp/pt.c:15155
  2010-06-22  9:57 [Bug c++/44629] New: ICE in unify, at cp/pt.c:15155 doko at ubuntu dot com
@ 2010-06-22  9:58 ` doko at ubuntu dot com
  2010-06-22 11:05 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: doko at ubuntu dot com @ 2010-06-22  9:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from doko at ubuntu dot com  2010-06-22 09:57 -------
Created an attachment (id=20976)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20976&action=view)
preprocessed source


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44629


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

* [Bug c++/44629] ICE in unify, at cp/pt.c:15155
  2010-06-22  9:57 [Bug c++/44629] New: ICE in unify, at cp/pt.c:15155 doko at ubuntu dot com
  2010-06-22  9:58 ` [Bug c++/44629] " doko at ubuntu dot com
@ 2010-06-22 11:05 ` rguenth at gcc dot gnu dot org
  2010-06-22 16:46 ` [Bug c++/44629] [4.3/4.4/4.5/4.6 Regression] " jakub at gcc dot gnu dot org
  2010-06-24 21:59 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-22 11:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2010-06-22 11:04 -------
Confirmed.

../aclib/aclib.cpp(35): error: no instance of function template
"ACSearch::Grapher::simple_output" matches the argument list
            argument types are: (acSearcher)
    std::basic_string<char> output = Grapher::simple_output(*s);
                                     ^
Reduced testcase for the ICE:

template<typename _CharT>     struct char_traits;
namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
    template<typename _Tp>     class new_allocator     { };
}
namespace std __attribute__ ((__visibility__ ("default"))) {
    template<typename _Tp>     
    class allocator: public __gnu_cxx::new_allocator<_Tp>     { };
    template<typename _CharT, typename _Traits = char_traits<_CharT>,          
    typename _Alloc = allocator<_CharT> >     class basic_string;
    template<typename _CharT, typename _Traits, typename _Alloc>     
    class basic_string     {
    };
}
template<typename T> int eq_cmp(T a, T b){ }
template<typename T> int unsafe_case_cmp(T a, T b){ }
template<typename T, int (*cmp_fn)(T, T) = eq_cmp> class Searcher{ };
class Grapher{
    template <typename T>
    static std::basic_string<T> simple_output(Searcher<T> &sch){ }
};
typedef Searcher<char, unsafe_case_cmp> acSearcher;
void ac_print_dot(acSearcher *s){
    std::basic_string<char> output = Grapher::simple_output(*s);
}


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2010-06-22 11:04:54
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44629


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

* [Bug c++/44629] [4.3/4.4/4.5/4.6 Regression] ICE in unify, at cp/pt.c:15155
  2010-06-22  9:57 [Bug c++/44629] New: ICE in unify, at cp/pt.c:15155 doko at ubuntu dot com
  2010-06-22  9:58 ` [Bug c++/44629] " doko at ubuntu dot com
  2010-06-22 11:05 ` rguenth at gcc dot gnu dot org
@ 2010-06-22 16:46 ` jakub at gcc dot gnu dot org
  2010-06-24 21:59 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-06-22 16:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2010-06-22 16:46 -------
3.4 gives here:
pr44629.C:23: sorry, unimplemented: use of `overload' in template type
unification
pr44629.C:23: error: no matching function for call to
`Grapher::simple_output(Searcher<char, unsafe_case_cmp [with T = char]>&)'
 int unsafe_case_cmp(T, T) [with T = char]

So it is a regression.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE in unify, at            |[4.3/4.4/4.5/4.6 Regression]
                   |cp/pt.c:15155               |ICE in unify, at
                   |                            |cp/pt.c:15155
   Target Milestone|---                         |4.3.6


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44629


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

* [Bug c++/44629] [4.3/4.4/4.5/4.6 Regression] ICE in unify, at cp/pt.c:15155
  2010-06-22  9:57 [Bug c++/44629] New: ICE in unify, at cp/pt.c:15155 doko at ubuntu dot com
                   ` (2 preceding siblings ...)
  2010-06-22 16:46 ` [Bug c++/44629] [4.3/4.4/4.5/4.6 Regression] " jakub at gcc dot gnu dot org
@ 2010-06-24 21:59 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-24 21:59 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44629


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

* [Bug c++/44629] [4.3/4.4/4.5/4.6 Regression] ICE in unify, at cp/pt.c:15155
       [not found] <bug-44629-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2011-03-09 17:53 ` jason at gcc dot gnu.org
@ 2011-03-09 17:58 ` jason at gcc dot gnu.org
  2011-03-09 17:58 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-09 17:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44629

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-09 17:57:50 UTC ---
Author: jason
Date: Wed Mar  9 17:57:46 2011
New Revision: 170824

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170824
Log:
    PR c++/44629
    * pt.c (unify): An unresolved overload is a nondeduced context.

Added:
    trunk/gcc/testsuite/g++.dg/template/nontype22.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/44629] [4.3/4.4/4.5/4.6 Regression] ICE in unify, at cp/pt.c:15155
       [not found] <bug-44629-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2011-03-09 17:58 ` jason at gcc dot gnu.org
@ 2011-03-09 17:58 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-09 17:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44629

--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-09 17:57:54 UTC ---
Author: jason
Date: Wed Mar  9 17:57:51 2011
New Revision: 170826

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170826
Log:
    PR c++/44629
    * pt.c (unify): An unresolved overload is a nondeduced context.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/g++.dg/template/nontype22.C
Modified:
    branches/gcc-4_5-branch/gcc/cp/ChangeLog
    branches/gcc-4_5-branch/gcc/cp/pt.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/44629] [4.3/4.4/4.5/4.6 Regression] ICE in unify, at cp/pt.c:15155
       [not found] <bug-44629-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-03-04 22:30 ` jason at gcc dot gnu.org
@ 2011-03-09 17:53 ` jason at gcc dot gnu.org
  2011-03-09 17:58 ` jason at gcc dot gnu.org
  2011-03-09 17:58 ` jason at gcc dot gnu.org
  5 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-09 17:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44629

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ABI
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jason at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-09 17:52:53 UTC ---
A middle ground would be to fix the bug in unify without adding mangling
support, so we get the sorry there.  I guess I'll do that.


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

* [Bug c++/44629] [4.3/4.4/4.5/4.6 Regression] ICE in unify, at cp/pt.c:15155
       [not found] <bug-44629-4@http.gcc.gnu.org/bugzilla/>
  2011-03-04  0:55 ` jason at gcc dot gnu.org
  2011-03-04 22:24 ` jason at gcc dot gnu.org
@ 2011-03-04 22:30 ` jason at gcc dot gnu.org
  2011-03-09 17:53 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-04 22:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44629

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-04 22:30:16 UTC ---
Created attachment 23551
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23551
WIP patch to make the testcase sorry as before

And here's a patch that just restores the previous sorry behavior.  Do you
think it's worth applying this to 4.6?


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

* [Bug c++/44629] [4.3/4.4/4.5/4.6 Regression] ICE in unify, at cp/pt.c:15155
       [not found] <bug-44629-4@http.gcc.gnu.org/bugzilla/>
  2011-03-04  0:55 ` jason at gcc dot gnu.org
@ 2011-03-04 22:24 ` jason at gcc dot gnu.org
  2011-03-04 22:30 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-04 22:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44629

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-04 22:24:30 UTC ---
Created attachment 23550
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23550
WIP patch to accept my testcase

Here's a patch that makes my testcase work.  I don't want to put it in 4.6
because it produces mangling different from the EDG compiler, and want to
clarify how it should mangle first.


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

* [Bug c++/44629] [4.3/4.4/4.5/4.6 Regression] ICE in unify, at cp/pt.c:15155
       [not found] <bug-44629-4@http.gcc.gnu.org/bugzilla/>
@ 2011-03-04  0:55 ` jason at gcc dot gnu.org
  2011-03-04 22:24 ` jason at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-04  0:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44629

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-invalid-code         |ice-on-valid-code
                 CC|                            |jason at gcc dot gnu.org
      Known to fail|                            |

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-04 00:54:56 UTC ---
Same ICE on valid testcase:

template<typename T> int cmp1(T a, T b);
template<typename T> int cmp2(T a, T b);
template<typename T, int (*cmp)(T, T) = cmp1> struct A { };
template <typename T> void f (A<T> &);
void g()
{
  A<char> a;
  f(a);
}

though 3.4 didn't accept it, it gave the same sorry, so it isn't a big
regression.


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

end of thread, other threads:[~2011-03-09 17:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-22  9:57 [Bug c++/44629] New: ICE in unify, at cp/pt.c:15155 doko at ubuntu dot com
2010-06-22  9:58 ` [Bug c++/44629] " doko at ubuntu dot com
2010-06-22 11:05 ` rguenth at gcc dot gnu dot org
2010-06-22 16:46 ` [Bug c++/44629] [4.3/4.4/4.5/4.6 Regression] " jakub at gcc dot gnu dot org
2010-06-24 21:59 ` rguenth at gcc dot gnu dot org
     [not found] <bug-44629-4@http.gcc.gnu.org/bugzilla/>
2011-03-04  0:55 ` jason at gcc dot gnu.org
2011-03-04 22:24 ` jason at gcc dot gnu.org
2011-03-04 22:30 ` jason at gcc dot gnu.org
2011-03-09 17:53 ` jason at gcc dot gnu.org
2011-03-09 17:58 ` jason at gcc dot gnu.org
2011-03-09 17:58 ` jason at gcc dot gnu.org

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