public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14085] New: Internal error when compiling template functors
@ 2004-02-09 14:28 dds at aueb dot gr
  2004-02-09 14:29 ` [Bug c++/14085] " dds at aueb dot gr
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: dds at aueb dot gr @ 2004-02-09 14:28 UTC (permalink / raw)
  To: gcc-bugs

The following message appears:

GNU CPP version 3.2 (mingw special 20020817-1) (cpplib) (80386, BSD syntax)
GNU C++ version 3.2 (mingw special 20020817-1) (mingw32)
        compiled by GNU C version 3.2.
t.cpp:6: `Op::first_argument_type' is not a type, use `typename
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,

when compiling the code:

#include <functional>

using namespace std;

template <class Op>
bool asfun(Op f, Op::first_argument_type a, Op::second_argument_type b)
{
        return Op(a, b);
}

int
main(int argc, char *argv[])
{
        return asfun(equal_to, 5, 5);
}

-- 
           Summary: Internal error when compiling template functors
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dds at aueb dot gr
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: minfw
  GCC host triplet: mingw
GCC target triplet: mingw


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


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

* [Bug c++/14085] Internal error when compiling template functors
  2004-02-09 14:28 [Bug c++/14085] New: Internal error when compiling template functors dds at aueb dot gr
@ 2004-02-09 14:29 ` dds at aueb dot gr
  2004-02-09 15:49 ` bangerth at dealii dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dds at aueb dot gr @ 2004-02-09 14:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dds at aueb dot gr  2004-02-09 14:29 -------
Created an attachment (id=5708)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5708&action=view)
Preprocessed source code


-- 


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


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

* [Bug c++/14085] Internal error when compiling template functors
  2004-02-09 14:28 [Bug c++/14085] New: Internal error when compiling template functors dds at aueb dot gr
  2004-02-09 14:29 ` [Bug c++/14085] " dds at aueb dot gr
@ 2004-02-09 15:49 ` bangerth at dealii dot org
  2004-02-09 16:15 ` [Bug c++/14085] [3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2004-02-09 15:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-02-09 15:49 -------
I can't confirm this with 3.2.3 on linux. Someone with a mingw 
installation may want to check this. 
 
I believe that this bug has been fixed later, btw. Can you try to 
use a later gcc version? 
 
W. 

-- 


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


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

* [Bug c++/14085] [3.5 Regression] when compiling template functors
  2004-02-09 14:28 [Bug c++/14085] New: Internal error when compiling template functors dds at aueb dot gr
  2004-02-09 14:29 ` [Bug c++/14085] " dds at aueb dot gr
  2004-02-09 15:49 ` bangerth at dealii dot org
@ 2004-02-09 16:15 ` pinskia at gcc dot gnu dot org
  2004-02-09 16:23 ` [Bug c++/14085] [3.4/3.5 " pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-09 16:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-09 16:15 -------
Well the ICE might be gone but there is a diagnostic problem in 3.5.0 which makes this a regression:
pr14085.cc:6: error: `#`template_type_parm' not supported by dump_decl#<declaration error>::
first_argument_type' is not a type
pr14085.cc:6: error: `#`template_type_parm' not supported by dump_decl#<declaration error>::
second_argument_type' is not a type
pr14085.cc:7: error: ISO C++ forbids declaration of `a' with no type
pr14085.cc:7: error: ISO C++ forbids declaration of `b' with no type
pr14085.cc: In function `int main(int, char**)':
pr14085.cc:14: error: missing template arguments before ',' token

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
           Keywords|                            |diagnostic
      Known to work|                            |3.2.2 3.2.3 3.0.4 3.3.1
            Summary|Internal error when         |[3.5 Regression] when
                   |compiling template functors |compiling template functors
   Target Milestone|---                         |3.5.0


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


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

* [Bug c++/14085] [3.4/3.5 Regression] when compiling template functors
  2004-02-09 14:28 [Bug c++/14085] New: Internal error when compiling template functors dds at aueb dot gr
                   ` (2 preceding siblings ...)
  2004-02-09 16:15 ` [Bug c++/14085] [3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-02-09 16:23 ` pinskia at gcc dot gnu dot org
  2004-02-09 18:40 ` dds at aueb dot gr
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-09 16:23 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.5 Regression] when       |[3.4/3.5 Regression] when
                   |compiling template functors |compiling template functors
   Target Milestone|3.5.0                       |3.4.0


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


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

* [Bug c++/14085] [3.4/3.5 Regression] when compiling template functors
  2004-02-09 14:28 [Bug c++/14085] New: Internal error when compiling template functors dds at aueb dot gr
                   ` (3 preceding siblings ...)
  2004-02-09 16:23 ` [Bug c++/14085] [3.4/3.5 " pinskia at gcc dot gnu dot org
@ 2004-02-09 18:40 ` dds at aueb dot gr
  2004-02-12  9:40 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dds at aueb dot gr @ 2004-02-09 18:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dds at aueb dot gr  2004-02-09 18:40 -------
Subject: Re:  Internal error when compiling template functors

bangerth at dealii dot org wrote:
> ------- Additional Comments From bangerth at dealii dot org  2004-02-09 15:49 -------
> I can't confirm this with 3.2.3 on linux. Someone with a mingw 
> installation may want to check this. 

> I believe that this bug has been fixed later, btw. Can you try to 
> use a later gcc version? 

Thanks for the very speedy response!  I just submitted the bug, in case 
you found it a useful test case for something.  I am not even entirely 
sure the program is 100% valid C++, but I saved it because it generated 
an ICE.  I typically appreciate test cases that trigger internal errors 
in my code because they help me isolate bugs.  This bug is not important 
for me, but as I see, you found a regression with it.

Cheers,

Diomidis


-- 


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


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

* [Bug c++/14085] [3.4/3.5 Regression] when compiling template functors
  2004-02-09 14:28 [Bug c++/14085] New: Internal error when compiling template functors dds at aueb dot gr
                   ` (4 preceding siblings ...)
  2004-02-09 18:40 ` dds at aueb dot gr
@ 2004-02-12  9:40 ` pinskia at gcc dot gnu dot org
  2004-02-12  9:46 ` gdr at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-12  9:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-12 09:40 -------
Here is the redux for the error message:
template <class Op>
bool asfun(Op f, Op::first_argument_type a, Op::second_argument_type b)
{
        return Op(a, b);
}
pr14085.cc:2: error: `#`template_type_parm' not supported by dump_decl#<declaration 
error>::first_argument_type' is not a type
pr14085.cc:2: error: `#`template_type_parm' not supported by dump_decl#<declaration 
error>::second_argument_type' is not a type
pr14085.cc:3: error: ISO C++ forbids declaration of `a' with no type
pr14085.cc:3: error: ISO C++ forbids declaration of `b' with no type

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |3.4.0 3.5.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-12 09:40:46
               date|                            |


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


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

* [Bug c++/14085] [3.4/3.5 Regression] when compiling template functors
  2004-02-09 14:28 [Bug c++/14085] New: Internal error when compiling template functors dds at aueb dot gr
                   ` (5 preceding siblings ...)
  2004-02-12  9:40 ` pinskia at gcc dot gnu dot org
@ 2004-02-12  9:46 ` gdr at gcc dot gnu dot org
  2004-02-15 15:00 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-02-12  9:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-02-12 09:46 -------
Blah

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |gdr at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/14085] [3.4/3.5 Regression] when compiling template functors
  2004-02-09 14:28 [Bug c++/14085] New: Internal error when compiling template functors dds at aueb dot gr
                   ` (6 preceding siblings ...)
  2004-02-12  9:46 ` gdr at gcc dot gnu dot org
@ 2004-02-15 15:00 ` cvs-commit at gcc dot gnu dot org
  2004-02-15 15:06 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-15 15:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-15 15:00 -------
Subject: Bug 14085

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	gdr@gcc.gnu.org	2004-02-15 15:00:54

Modified files:
	gcc/cp         : ChangeLog error.c 
Added files:
	gcc/testsuite/g++.dg/other: nontype-1.C 

Log message:
	PR c++/14085
	* error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3956&r2=1.3957
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&r1=1.244&r2=1.245
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/nontype-1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/14085] [3.4/3.5 Regression] when compiling template functors
  2004-02-09 14:28 [Bug c++/14085] New: Internal error when compiling template functors dds at aueb dot gr
                   ` (7 preceding siblings ...)
  2004-02-15 15:00 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-15 15:06 ` cvs-commit at gcc dot gnu dot org
  2004-02-15 16:24 ` gdr at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-15 15:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-02-15 15:06 -------
Subject: Bug 14085

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	gdr@gcc.gnu.org	2004-02-15 15:06:02

Modified files:
	gcc/cp         : ChangeLog error.c 
Added files:
	gcc/testsuite/g++.dg/other: nontype-1.C 

Log message:
	PR c++/14085
	* error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.52&r2=1.3892.2.53
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.241.4.1&r2=1.241.4.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/nontype-1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug c++/14085] [3.4/3.5 Regression] when compiling template functors
  2004-02-09 14:28 [Bug c++/14085] New: Internal error when compiling template functors dds at aueb dot gr
                   ` (8 preceding siblings ...)
  2004-02-15 15:06 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-15 16:24 ` gdr at gcc dot gnu dot org
  2004-02-16 10:31 ` andreas dot meier_ at gmx dot de
  2004-02-16 12:08 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-02-15 16:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-02-15 16:24 -------
Fixed for 3.4 and mainline.

-- 


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


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

* [Bug c++/14085] [3.4/3.5 Regression] when compiling template functors
  2004-02-09 14:28 [Bug c++/14085] New: Internal error when compiling template functors dds at aueb dot gr
                   ` (9 preceding siblings ...)
  2004-02-15 16:24 ` gdr at gcc dot gnu dot org
@ 2004-02-16 10:31 ` andreas dot meier_ at gmx dot de
  2004-02-16 12:08 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: andreas dot meier_ at gmx dot de @ 2004-02-16 10:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From andreas dot meier_ at gmx dot de  2004-02-16 10:31 -------
So it can be closed

-- 


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


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

* [Bug c++/14085] [3.4/3.5 Regression] when compiling template functors
  2004-02-09 14:28 [Bug c++/14085] New: Internal error when compiling template functors dds at aueb dot gr
                   ` (10 preceding siblings ...)
  2004-02-16 10:31 ` andreas dot meier_ at gmx dot de
@ 2004-02-16 12:08 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-16 12:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-16 12:07 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2004-02-16 12:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-09 14:28 [Bug c++/14085] New: Internal error when compiling template functors dds at aueb dot gr
2004-02-09 14:29 ` [Bug c++/14085] " dds at aueb dot gr
2004-02-09 15:49 ` bangerth at dealii dot org
2004-02-09 16:15 ` [Bug c++/14085] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-02-09 16:23 ` [Bug c++/14085] [3.4/3.5 " pinskia at gcc dot gnu dot org
2004-02-09 18:40 ` dds at aueb dot gr
2004-02-12  9:40 ` pinskia at gcc dot gnu dot org
2004-02-12  9:46 ` gdr at gcc dot gnu dot org
2004-02-15 15:00 ` cvs-commit at gcc dot gnu dot org
2004-02-15 15:06 ` cvs-commit at gcc dot gnu dot org
2004-02-15 16:24 ` gdr at gcc dot gnu dot org
2004-02-16 10:31 ` andreas dot meier_ at gmx dot de
2004-02-16 12:08 ` pinskia 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).