public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36897]  New: Internal compiler error with function pointer template parameter
@ 2008-07-22 11:37 kathoum at gmail dot com
  2008-07-22 11:49 ` [Bug c++/36897] " paolo dot carlini at oracle dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: kathoum at gmail dot com @ 2008-07-22 11:37 UTC (permalink / raw)
  To: gcc-bugs

Trying to compile the following program:

typedef void (*fptr)();
fptr zeroptr = 0;
template<typename T, fptr F> struct foo { };
template<typename T> struct foo<T,zeroptr> { };
void f() { }
foo<int,&f> m_foo;

I get the message:
test.cpp:6: internal compiler error: in unify, at cp/pt.c:13401
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: Internal compiler error with function pointer template
                    parameter
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kathoum at gmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c++/36897] Internal compiler error with function pointer template parameter
  2008-07-22 11:37 [Bug c++/36897] New: Internal compiler error with function pointer template parameter kathoum at gmail dot com
@ 2008-07-22 11:49 ` paolo dot carlini at oracle dot com
  2008-08-17  0:06 ` [Bug c++/36897] [4.2/4.3/4.4 Regression] ICE " pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-07-22 11:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from paolo dot carlini at oracle dot com  2008-07-22 11:48 -------
Te be clear, this is ICE on invalid


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code


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


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

* [Bug c++/36897] [4.2/4.3/4.4 Regression] ICE with function pointer template parameter
  2008-07-22 11:37 [Bug c++/36897] New: Internal compiler error with function pointer template parameter kathoum at gmail dot com
  2008-07-22 11:49 ` [Bug c++/36897] " paolo dot carlini at oracle dot com
@ 2008-08-17  0:06 ` pinskia at gcc dot gnu dot org
  2008-08-22 14:53 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-17  0:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2008-08-17 00:04 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
 GCC target triplet|i686-pc-linux-gnu           |
      Known to fail|4.1.1 4.3.0                 |4.1.1 4.3.0 4.1.2
      Known to work|                            |3.3
   Last reconfirmed|0000-00-00 00:00:00         |2008-08-17 00:04:47
               date|                            |
            Summary|ICE with function pointer   |[4.2/4.3/4.4 Regression] ICE
                   |template parameter          |with function pointer
                   |                            |template parameter
   Target Milestone|---                         |4.3.2


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


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

* [Bug c++/36897] [4.2/4.3/4.4 Regression] ICE with function pointer template parameter
  2008-07-22 11:37 [Bug c++/36897] New: Internal compiler error with function pointer template parameter kathoum at gmail dot com
  2008-07-22 11:49 ` [Bug c++/36897] " paolo dot carlini at oracle dot com
  2008-08-17  0:06 ` [Bug c++/36897] [4.2/4.3/4.4 Regression] ICE " pinskia at gcc dot gnu dot org
@ 2008-08-22 14:53 ` rguenth at gcc dot gnu dot org
  2009-02-03 10:39 ` bonzini at gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-08-22 14:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-08-22 14:51 -------
For the curious, G++ 3.4.6 says

t.ii:4: error: `zeroptr' is not a valid template argument
t.ii:4: error: it must be the address of a function with external linkage


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.1.1 4.3.0 4.1.2           |4.0.0 4.1.1 4.3.0 4.1.2
      Known to work|3.3                         |3.4.6
           Priority|P3                          |P2
   Target Milestone|4.3.2                       |4.2.5


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


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

* [Bug c++/36897] [4.2/4.3/4.4 Regression] ICE with function pointer template parameter
  2008-07-22 11:37 [Bug c++/36897] New: Internal compiler error with function pointer template parameter kathoum at gmail dot com
                   ` (2 preceding siblings ...)
  2008-08-22 14:53 ` rguenth at gcc dot gnu dot org
@ 2009-02-03 10:39 ` bonzini at gnu dot org
  2009-02-03 11:11 ` bonzini at gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gnu dot org @ 2009-02-03 10:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from bonzini at gnu dot org  2009-02-03 10:38 -------
Created an attachment (id=17231)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17231&action=view)
tentative patch


-- 


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


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

* [Bug c++/36897] [4.2/4.3/4.4 Regression] ICE with function pointer template parameter
  2008-07-22 11:37 [Bug c++/36897] New: Internal compiler error with function pointer template parameter kathoum at gmail dot com
                   ` (3 preceding siblings ...)
  2009-02-03 10:39 ` bonzini at gnu dot org
@ 2009-02-03 11:11 ` bonzini at gnu dot org
  2009-02-03 15:56 ` bonzini at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gnu dot org @ 2009-02-03 11:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from bonzini at gnu dot org  2009-02-03 11:11 -------
caused by r90059 (convert_nontype_argument rewrite).  Giovanni, do you have
time to see if the patch I made makes sense?


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giovannibajo at gcc dot gnu
                   |                            |dot org, bonzini at gnu dot
                   |                            |org


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


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

* [Bug c++/36897] [4.2/4.3/4.4 Regression] ICE with function pointer template parameter
  2008-07-22 11:37 [Bug c++/36897] New: Internal compiler error with function pointer template parameter kathoum at gmail dot com
                   ` (4 preceding siblings ...)
  2009-02-03 11:11 ` bonzini at gnu dot org
@ 2009-02-03 15:56 ` bonzini at gcc dot gnu dot org
  2009-02-03 16:20 ` [Bug c++/36897] [4.2 " bonzini at gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2009-02-03 15:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from bonzini at gnu dot org  2009-02-03 15:56 -------
Subject: Bug 36897

Author: bonzini
Date: Tue Feb  3 15:56:05 2009
New Revision: 143896

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143896
Log:
gcc/cp:
2009-02-03  Paolo Bonzini  <bonzini@gnu.org>

        PR c++/36897
        * pt.c (convert_nontype_argument_function): Expect expr to be an
        ADDR_EXPR.

        PR c++/37314
        * typeck.c (merge_types): Call resolve_typename_type if only
        one type is a typename.

gcc/testsuite:
2009-02-03  Paolo Bonzini  <bonzini@gnu.org>

        PR c++/36897
        * g++.dg/template/func2.C: New test.

        PR c++/37314
        * g++.dg/template/typename15.C: New.
        * g++.dg/template/typename16.C: New.


Added:
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/template/func2.C
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/template/typename15.C
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/template/typename16.C
Modified:
    branches/gcc-4_3-branch/gcc/cp/ChangeLog
    branches/gcc-4_3-branch/gcc/cp/pt.c
    branches/gcc-4_3-branch/gcc/cp/typeck.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/36897] [4.2 Regression] ICE with function pointer template parameter
  2008-07-22 11:37 [Bug c++/36897] New: Internal compiler error with function pointer template parameter kathoum at gmail dot com
                   ` (5 preceding siblings ...)
  2009-02-03 15:56 ` bonzini at gcc dot gnu dot org
@ 2009-02-03 16:20 ` bonzini at gnu dot org
  2009-02-03 16:22 ` paolo dot carlini at oracle dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gnu dot org @ 2009-02-03 16:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from bonzini at gnu dot org  2009-02-03 16:20 -------
fixed on 4.3/4.4, still needs backporting to 4.2


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.0.0 4.1.1 4.3.0 4.1.2     |4.0.4 4.1.2 4.3.3
      Known to work|3.4.6                       |3.4.6 4.3.4 4.4.0
            Summary|[4.2/4.3/4.4 Regression] ICE|[4.2 Regression] ICE with
                   |with function pointer       |function pointer template
                   |template parameter          |parameter


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


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

* [Bug c++/36897] [4.2 Regression] ICE with function pointer template parameter
  2008-07-22 11:37 [Bug c++/36897] New: Internal compiler error with function pointer template parameter kathoum at gmail dot com
                   ` (6 preceding siblings ...)
  2009-02-03 16:20 ` [Bug c++/36897] [4.2 " bonzini at gnu dot org
@ 2009-02-03 16:22 ` paolo dot carlini at oracle dot com
  2009-02-03 16:27 ` bonzini at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-02-03 16:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from paolo dot carlini at oracle dot com  2009-02-03 16:22 -------
Did you really commit it to mainline? I don't see it.


-- 


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


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

* [Bug c++/36897] [4.2 Regression] ICE with function pointer template parameter
  2008-07-22 11:37 [Bug c++/36897] New: Internal compiler error with function pointer template parameter kathoum at gmail dot com
                   ` (7 preceding siblings ...)
  2009-02-03 16:22 ` paolo dot carlini at oracle dot com
@ 2009-02-03 16:27 ` bonzini at gcc dot gnu dot org
  2009-02-03 16:27 ` bonzini at gnu dot org
  2009-03-31 15:46 ` jsm28 at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2009-02-03 16:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from bonzini at gnu dot org  2009-02-03 16:26 -------
Subject: Re:  [4.2 Regression] ICE with function pointer 
        template parameter

> Did you really commit it to mainline? I don't see it.

I was doing it. :-)


------- Comment #10 from bonzini at gnu dot org  2009-02-03 16:26 -------
Subject: Bug 36897

Author: bonzini
Date: Tue Feb  3 16:26:28 2009
New Revision: 143898

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143898
Log:
gcc/cp:
2009-02-03  Paolo Bonzini  <bonzini@gnu.org>

        PR c++/36897
        * pt.c (convert_nontype_argument_function): Expect expr to be an
        ADDR_EXPR.

        PR c++/37314
        * typeck.c (merge_types): Call resolve_typename_type if only
        one type is a typename.

gcc/testsuite:
2009-02-03  Paolo Bonzini  <bonzini@gnu.org>

        PR c++/36897
        * g++.dg/template/func2.C: New test.

        PR c++/37314
        * g++.dg/template/typename15.C: New.
        * g++.dg/template/typename16.C: New.


Added:
    trunk/gcc/testsuite/g++.dg/template/func2.C
      - copied unchanged from r143896,
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/template/func2.C
    trunk/gcc/testsuite/g++.dg/template/typename15.C
      - copied unchanged from r143896,
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/template/typename15.C
    trunk/gcc/testsuite/g++.dg/template/typename16.C
      - copied unchanged from r143896,
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/template/typename16.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/36897] [4.2 Regression] ICE with function pointer template parameter
  2008-07-22 11:37 [Bug c++/36897] New: Internal compiler error with function pointer template parameter kathoum at gmail dot com
                   ` (8 preceding siblings ...)
  2009-02-03 16:27 ` bonzini at gcc dot gnu dot org
@ 2009-02-03 16:27 ` bonzini at gnu dot org
  2009-03-31 15:46 ` jsm28 at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gnu dot org @ 2009-02-03 16:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from bonzini at gnu dot org  2009-02-03 16:26 -------
Subject: Re:  [4.2 Regression] ICE with function pointer 
        template parameter

> Did you really commit it to mainline? I don't see it.

I was doing it. :-)


-- 


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


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

* [Bug c++/36897] [4.2 Regression] ICE with function pointer template parameter
  2008-07-22 11:37 [Bug c++/36897] New: Internal compiler error with function pointer template parameter kathoum at gmail dot com
                   ` (9 preceding siblings ...)
  2009-02-03 16:27 ` bonzini at gnu dot org
@ 2009-03-31 15:46 ` jsm28 at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 15:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jsm28 at gcc dot gnu dot org  2009-03-31 15:45 -------
Closing 4.2 branch, fixed for 4.3.4 and 4.4.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|4.0.4 4.1.2 4.3.3           |4.0.4 4.1.2 4.3.3 4.2.5
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.3.4


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


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

end of thread, other threads:[~2009-03-31 15:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-22 11:37 [Bug c++/36897] New: Internal compiler error with function pointer template parameter kathoum at gmail dot com
2008-07-22 11:49 ` [Bug c++/36897] " paolo dot carlini at oracle dot com
2008-08-17  0:06 ` [Bug c++/36897] [4.2/4.3/4.4 Regression] ICE " pinskia at gcc dot gnu dot org
2008-08-22 14:53 ` rguenth at gcc dot gnu dot org
2009-02-03 10:39 ` bonzini at gnu dot org
2009-02-03 11:11 ` bonzini at gnu dot org
2009-02-03 15:56 ` bonzini at gcc dot gnu dot org
2009-02-03 16:20 ` [Bug c++/36897] [4.2 " bonzini at gnu dot org
2009-02-03 16:22 ` paolo dot carlini at oracle dot com
2009-02-03 16:27 ` bonzini at gcc dot gnu dot org
2009-02-03 16:27 ` bonzini at gnu dot org
2009-03-31 15:46 ` jsm28 at gcc dot gnu dot 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).