public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21681] New: Internal Compiler Error
@ 2005-05-20 17:06 dave at boost-consulting dot com
  2005-05-20 17:08 ` [Bug c++/21681] " dave at boost-consulting dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: dave at boost-consulting dot com @ 2005-05-20 17:06 UTC (permalink / raw)
  To: gcc-bugs

Compile the enclosed source for an ICE

-- 
           Summary: Internal Compiler Error
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dave at boost-consulting dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/21681] Internal Compiler Error
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
@ 2005-05-20 17:08 ` dave at boost-consulting dot com
  2005-05-20 17:33 ` pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dave at boost-consulting dot com @ 2005-05-20 17:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dave at boost-consulting dot com  2005-05-20 17:08 -------
Created an attachment (id=8938)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8938&action=view)
preprocessed source


-- 


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


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

* [Bug c++/21681] Internal Compiler Error
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
  2005-05-20 17:08 ` [Bug c++/21681] " dave at boost-consulting dot com
@ 2005-05-20 17:33 ` pinskia at gcc dot gnu dot org
  2005-05-20 18:05 ` dave at boost-consulting dot com
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-20 17:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-20 17:33 -------
This code is invalid.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
           Keywords|                            |ice-on-invalid-code


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


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

* [Bug c++/21681] Internal Compiler Error
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
  2005-05-20 17:08 ` [Bug c++/21681] " dave at boost-consulting dot com
  2005-05-20 17:33 ` pinskia at gcc dot gnu dot org
@ 2005-05-20 18:05 ` dave at boost-consulting dot com
  2005-05-20 19:27 ` [Bug c++/21681] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dave at boost-consulting dot com @ 2005-05-20 18:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dave at boost-consulting dot com  2005-05-20 18:05 -------
(In reply to comment #2)
> This code is invalid.

How did you come to that determination?

-- 


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


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

* [Bug c++/21681] [4.0/4.1 Regression] Internal Compiler Error
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
                   ` (2 preceding siblings ...)
  2005-05-20 18:05 ` dave at boost-consulting dot com
@ 2005-05-20 19:27 ` pinskia at gcc dot gnu dot org
  2005-05-20 19:56 ` dave at boost-consulting dot com
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-20 19:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-20 19:27 -------
Maybe not.
But in 3.4.0, I do get a warning:
copy.cpp: In function `int test_main(int, char**)':
copy.cpp:25: error: no match for call to `(const boost::sequence::algorithm::copy_) (const boost::
array<char, 6u>&, boost::array<char, 11u>&)'
copy.cpp:29: error: no match for 'operator+' in 'buf + 11u'
copy.cpp:32: error: no matching function for call to `equal(boost::array<char, 10u>&, char*, const 
char[5])'

And from ICC (with modifing the source removing some GCCisms):
copy.cpp(25): error: no instance of function template "boost::sequence::algorithm::copy_::operator()" 
matches the argument list
            argument types are: (const boost::array<char, 6U>, boost::array<char, 11U>)
            object type is: const boost::sequence::algorithm::copy_
          sequence::algorithm::copy(hello, buf)
          ^


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-invalid-code         |
      Known to fail|                            |4.0.0
      Known to work|                            |3.4.0
            Summary|Internal Compiler Error     |[4.0/4.1 Regression]
                   |                            |Internal Compiler Error


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


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

* [Bug c++/21681] [4.0/4.1 Regression] Internal Compiler Error
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
                   ` (3 preceding siblings ...)
  2005-05-20 19:27 ` [Bug c++/21681] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-05-20 19:56 ` dave at boost-consulting dot com
  2005-05-20 19:59 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dave at boost-consulting dot com @ 2005-05-20 19:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dave at boost-consulting dot com  2005-05-20 19:56 -------
The code is definitely invalid; I was just wondering how you decided that so
quickly ;-)

It still should never cause an ICE, of course ;-)

-- 


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


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

* [Bug c++/21681] [4.0/4.1 Regression] Internal Compiler Error
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
                   ` (4 preceding siblings ...)
  2005-05-20 19:56 ` dave at boost-consulting dot com
@ 2005-05-20 19:59 ` pinskia at gcc dot gnu dot org
  2005-05-20 23:12 ` dave at boost-consulting dot com
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-20 19:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-20 19:59 -------
(In reply to comment #5)
> The code is definitely invalid; I was just wondering how you decided that so
> quickly ;-)

I looked into the source and found where it crashing.  It was obvious from where the crash was it was 
invalid code as there was a function call as a template argument.

-- 


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


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

* [Bug c++/21681] [4.0/4.1 Regression] Internal Compiler Error
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
                   ` (5 preceding siblings ...)
  2005-05-20 19:59 ` pinskia at gcc dot gnu dot org
@ 2005-05-20 23:12 ` dave at boost-consulting dot com
  2005-05-21 14:49 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dave at boost-consulting dot com @ 2005-05-20 23:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dave at boost-consulting dot com  2005-05-20 23:12 -------
Subject: Re:  [4.0/4.1 Regression] Internal Compiler Error

"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

> ------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-20 19:59 -------
> (In reply to comment #5)
>> The code is definitely invalid; I was just wondering how you decided that so
>> quickly ;-)
>
> I looked into the source and found where it crashing.  It was obvious from where the crash was it was 
> invalid code as there was a function call as a template argument.

That wasn't a function call; it was a function type.

  template <class T> struct x {};
  x<int(int, int)> legal;



-- 


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


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

* [Bug c++/21681] [4.0/4.1 Regression] Internal Compiler Error
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
                   ` (6 preceding siblings ...)
  2005-05-20 23:12 ` dave at boost-consulting dot com
@ 2005-05-21 14:49 ` pinskia at gcc dot gnu dot org
  2005-05-24 15:06 ` reichelt at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-21 14:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-21 14:49 -------
Confirmed, reduced testcase:
template <class Signature> struct dispatch { typedef int result; };
struct copy_
{
    template <class Range1>
    typename dispatch<copy_()>::result
    operator()(Range1 const& src) const
    {
        return dispatch<copy_(Range1)>::a::execute(src);
    }
};

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-05-21 14:49:05
               date|                            |
   Target Milestone|---                         |4.0.1


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


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

* [Bug c++/21681] [4.0/4.1 Regression] Internal Compiler Error
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
                   ` (7 preceding siblings ...)
  2005-05-21 14:49 ` pinskia at gcc dot gnu dot org
@ 2005-05-24 15:06 ` reichelt at gcc dot gnu dot org
  2005-05-24 17:17 ` [Bug c++/21681] [4.0/4.1 Regression] ICE with nested types in template reichelt at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-05-24 15:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-05-24 14:46 -------
Even shorter testcase:

================================
template<int> struct A;

struct B
{
    template<int N> void foo()
    {
        A<N>::X::Y;
    }
};
================================


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
           Keywords|                            |monitored


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


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

* [Bug c++/21681] [4.0/4.1 Regression] ICE with nested types in template
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
                   ` (8 preceding siblings ...)
  2005-05-24 15:06 ` reichelt at gcc dot gnu dot org
@ 2005-05-24 17:17 ` reichelt at gcc dot gnu dot org
  2005-05-24 18:01 ` nathan at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-05-24 17:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-05-24 16:53 -------
Nathan, this appeared with your binfo work last summer:
http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00902.html
http://gcc.gnu.org/ml/gcc-cvs/2004-07/msg00663.html

Could you please have a look?


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nathan at gcc dot gnu dot
                   |                            |org
            Summary|[4.0/4.1 Regression]        |[4.0/4.1 Regression] ICE
                   |Internal Compiler Error     |with nested types in
                   |                            |template


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


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

* [Bug c++/21681] [4.0/4.1 Regression] ICE with nested types in template
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
                   ` (9 preceding siblings ...)
  2005-05-24 17:17 ` [Bug c++/21681] [4.0/4.1 Regression] ICE with nested types in template reichelt at gcc dot gnu dot org
@ 2005-05-24 18:01 ` nathan at gcc dot gnu dot org
  2005-05-27 14:13 ` nathan at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-05-24 18:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nathan at gcc dot gnu dot org  2005-05-24 17:46 -------
ok

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |nathan at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-05-21 14:49:05         |2005-05-24 17:46:00
               date|                            |


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


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

* [Bug c++/21681] [4.0/4.1 Regression] ICE with nested types in template
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
                   ` (10 preceding siblings ...)
  2005-05-24 18:01 ` nathan at gcc dot gnu dot org
@ 2005-05-27 14:13 ` nathan at gcc dot gnu dot org
  2005-05-27 14:37 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-05-27 14:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nathan at gcc dot gnu dot org  2005-05-27 14:08 -------
Fixed on mainline
2005-05-27  Nathan Sidwell  <nathan@codesourcery.com>

	PR c++/21681
	* parser.c (cp_parser_late_parsing_for_member): Disable access
	checking for template functions.

-- 


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


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

* [Bug c++/21681] [4.0/4.1 Regression] ICE with nested types in template
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
                   ` (11 preceding siblings ...)
  2005-05-27 14:13 ` nathan at gcc dot gnu dot org
@ 2005-05-27 14:37 ` cvs-commit at gcc dot gnu dot org
  2005-05-27 15:17 ` [Bug c++/21681] [4.0 " nathan at gcc dot gnu dot org
  2005-05-27 15:23 ` cvs-commit at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-27 14:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-05-27 14:24 -------
Subject: Bug 21681

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	nathan@gcc.gnu.org	2005-05-27 14:23:52

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/cp         : ChangeLog parser.c 
Added files:
	gcc/testsuite/g++.dg/parse: template16.C 

Log message:
	cp:
	PR c++/21681
	* parser.c (cp_parser_late_parsing_for_member): Disable access
	checking for template functions.
	testsuite:
	PR c++/21681
	* g++.dg/parse/template16.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/template16.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5544&r2=1.5545
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4758&r2=1.4759
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.333&r2=1.334



-- 


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


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

* [Bug c++/21681] [4.0 Regression] ICE with nested types in template
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
                   ` (12 preceding siblings ...)
  2005-05-27 14:37 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-27 15:17 ` nathan at gcc dot gnu dot org
  2005-05-27 15:23 ` cvs-commit at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-05-27 15:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nathan at gcc dot gnu dot org  2005-05-27 15:15 -------
fixed on 4.0 branch
2005-05-27  Nathan Sidwell  <nathan@codesourcery.com>

	PR c++/21681
	* parser.c (cp_parser_late_parsing_for_member): Disable access
	checking for template functions.


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


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


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

* [Bug c++/21681] [4.0 Regression] ICE with nested types in template
  2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
                   ` (13 preceding siblings ...)
  2005-05-27 15:17 ` [Bug c++/21681] [4.0 " nathan at gcc dot gnu dot org
@ 2005-05-27 15:23 ` cvs-commit at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-27 15:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-05-27 15:17 -------
Subject: Bug 21681

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	nathan@gcc.gnu.org	2005-05-27 15:17:27

Modified files:
	gcc/cp         : ChangeLog parser.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/parse: template16.C 

Log message:
	cp:
	PR c++/21681
	* parser.c (cp_parser_late_parsing_for_member): Disable access
	checking for template functions.
	testsuite:
	PR c++/21681
	* g++.dg/parse/template16.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.45&r2=1.4648.2.46
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.319.2.7&r2=1.319.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.200&r2=1.5084.2.201
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/template16.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

end of thread, other threads:[~2005-05-27 15:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-20 17:06 [Bug c++/21681] New: Internal Compiler Error dave at boost-consulting dot com
2005-05-20 17:08 ` [Bug c++/21681] " dave at boost-consulting dot com
2005-05-20 17:33 ` pinskia at gcc dot gnu dot org
2005-05-20 18:05 ` dave at boost-consulting dot com
2005-05-20 19:27 ` [Bug c++/21681] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-05-20 19:56 ` dave at boost-consulting dot com
2005-05-20 19:59 ` pinskia at gcc dot gnu dot org
2005-05-20 23:12 ` dave at boost-consulting dot com
2005-05-21 14:49 ` pinskia at gcc dot gnu dot org
2005-05-24 15:06 ` reichelt at gcc dot gnu dot org
2005-05-24 17:17 ` [Bug c++/21681] [4.0/4.1 Regression] ICE with nested types in template reichelt at gcc dot gnu dot org
2005-05-24 18:01 ` nathan at gcc dot gnu dot org
2005-05-27 14:13 ` nathan at gcc dot gnu dot org
2005-05-27 14:37 ` cvs-commit at gcc dot gnu dot org
2005-05-27 15:17 ` [Bug c++/21681] [4.0 " nathan at gcc dot gnu dot org
2005-05-27 15:23 ` cvs-commit 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).