public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15554] New: ICE in tsubst_copy, at cp/pt.c:7433
@ 2004-05-21 17:17 gcc-bugzilla at gcc dot gnu dot org
  2004-05-21 17:32 ` [Bug c++/15554] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-05-21 17:17 UTC (permalink / raw)
  To: gcc-bugs


g++ ICE on two-line code using May 18 CVS gcc-3_4-branch (I do not
have the 3.4 relese to test):

template <int n> struct T1 { enum { N = 3 }; };
template <int n> struct T2 { enum { N = 3, N1 = T1<N>::N }; };

Environment:

System: AIX vlad 1 5 0005BA2F4C00
host: powerpc-ibm-aix5.1.0.0
build: powerpc-ibm-aix5.1.0.0
target: powerpc-ibm-aix5.1.0.0
configured with: /.../configure --prefix=... --with-local-prefix=... --enable-languages=c,c++,java --enable-version-specific-runtime-libs --disable-nls

How-To-Repeat:

cat > ice.C << EOF
template <int n> struct T1 { enum { N = 3 }; };
template <int n> struct T2 { enum { N = 3, N1 = T1<N>::N }; };
EOF
g++ -c ice.C      
ice.C:2: internal compiler error: in tsubst_copy, at cp/pt.c:7433
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 
           Summary: ICE in tsubst_copy, at cp/pt.c:7433
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hzoli at austin dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-ibm-aix5.1.0.0
  GCC host triplet: powerpc-ibm-aix5.1.0.0
GCC target triplet: powerpc-ibm-aix5.1.0.0


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


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

* [Bug c++/15554] [3.4/3.5 Regression] ICE in tsubst_copy, at cp/pt.c:7433
  2004-05-21 17:17 [Bug c++/15554] New: ICE in tsubst_copy, at cp/pt.c:7433 gcc-bugzilla at gcc dot gnu dot org
@ 2004-05-21 17:32 ` pinskia at gcc dot gnu dot org
  2004-06-05 19:39 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-21 17:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-20 17:21 -------
Confirmed.

The mainline has a slightly different ICE:
pr15554.cc:2: internal compiler error: tree check: expected enumeral_type, have integer_type in 
tsubst_copy, at cp/pt.c:7436

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
  GCC build triplet|powerpc-ibm-aix5.1.0.0      |
   GCC host triplet|powerpc-ibm-aix5.1.0.0      |
 GCC target triplet|powerpc-ibm-aix5.1.0.0      |
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |3.4.0 3.5.0
      Known to work|                            |3.3.3
   Last reconfirmed|0000-00-00 00:00:00         |2004-05-20 17:21:06
               date|                            |
            Summary|ICE in tsubst_copy, at      |[3.4/3.5 Regression] ICE in
                   |cp/pt.c:7433                |tsubst_copy, at cp/pt.c:7433
   Target Milestone|---                         |3.4.1


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


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

* [Bug c++/15554] [3.4/3.5 Regression] ICE in tsubst_copy, at cp/pt.c:7433
  2004-05-21 17:17 [Bug c++/15554] New: ICE in tsubst_copy, at cp/pt.c:7433 gcc-bugzilla at gcc dot gnu dot org
  2004-05-21 17:32 ` [Bug c++/15554] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-06-05 19:39 ` mmitchel at gcc dot gnu dot org
  2004-06-07 15:52 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-05 19:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-06-05 19:39 -------
Working on a fix.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/15554] [3.4/3.5 Regression] ICE in tsubst_copy, at cp/pt.c:7433
  2004-05-21 17:17 [Bug c++/15554] New: ICE in tsubst_copy, at cp/pt.c:7433 gcc-bugzilla at gcc dot gnu dot org
  2004-05-21 17:32 ` [Bug c++/15554] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
  2004-06-05 19:39 ` mmitchel at gcc dot gnu dot org
@ 2004-06-07 15:52 ` cvs-commit at gcc dot gnu dot org
  2004-06-07 15:54 ` cvs-commit at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-07 15:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-07 15:52 -------
Subject: Bug 15554

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-06-07 15:52:23

Modified files:
	gcc            : ChangeLog c-common.c 
	gcc/cp         : ChangeLog except.c parser.c pt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/eh: throw1.C 
	gcc/testsuite/g++.dg/expr: sizeof3.C 
	gcc/testsuite/g++.dg/template: access14.C enum1.C 

Log message:
	PR c++/15337
	* error.c (c_sizeof_or_alignof_type): Use more detailed error
	message.
	
	PR c++/15766
	* parser.c (cp_parser_iteration_statement): Fix typo in error
	message.
	
	PR c++/14777
	* pt.c (tsubst_default_argument): Do not defer access checks
	while substituting into the default argument.
	
	PR c++/15554
	* pt.c (tsubst_copy): Do not try to substitute for an enumeration
	constant in a non-dependent context.
	
	PR c++/15057
	* except.c (build_throw): Ensure that temp_expr has been
	initialized.
	
	PR c++/15337
	* g++.dg/expr/sizeof3.C: New test.
	
	PR c++/14777
	* g++.dg/template/access14.C: New test.
	
	PR c++/15554
	* g++.dg/template/enum1.C: New test.
	
	PR c++/15057
	* g++.dg/eh/throw1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.470&r2=2.2326.2.471
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.476.4.6&r2=1.476.4.7
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.115&r2=1.3892.2.116
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/except.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.164.4.4&r2=1.164.4.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.157.2.31&r2=1.157.2.32
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.816.2.28&r2=1.816.2.29
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.197&r2=1.3389.2.198
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/eh/throw1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/sizeof3.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/access14.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/enum1.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=15554


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

* [Bug c++/15554] [3.4/3.5 Regression] ICE in tsubst_copy, at cp/pt.c:7433
  2004-05-21 17:17 [Bug c++/15554] New: ICE in tsubst_copy, at cp/pt.c:7433 gcc-bugzilla at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-06-07 15:52 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-07 15:54 ` cvs-commit at gcc dot gnu dot org
  2004-06-07 16:24 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-07 15:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-07 15:54 -------
Subject: Bug 15554

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-06-07 15:54:15

Modified files:
	gcc            : ChangeLog c-common.c 
	gcc/cp         : ChangeLog except.c parser.c pt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/eh: throw1.C 
	gcc/testsuite/g++.dg/expr: sizeof3.C 
	gcc/testsuite/g++.dg/template: access14.C enum1.C 

Log message:
	PR c++/15337
	* error.c (c_sizeof_or_alignof_type): Use more detailed error
	message.
	
	PR c++/15766
	* parser.c (cp_parser_iteration_statement): Fix typo in error
	message.
	
	PR c++/14777
	* pt.c (tsubst_default_argument): Do not defer access checks
	while substituting into the default argument.
	
	PR c++/15554
	* pt.c (tsubst_copy): Do not try to substitute for an enumeration
	constant in a non-dependent context.
	
	PR c++/15057
	* except.c (build_throw): Ensure that temp_expr has been
	initialized.
	
	PR c++/15337
	* g++.dg/expr/sizeof3.C: New test.
	
	PR c++/14777
	* g++.dg/template/access14.C: New test.
	
	PR c++/15554
	* g++.dg/template/enum1.C: New test.
	
	PR c++/15057
	* g++.dg/eh/throw1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3859&r2=2.3860
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&r1=1.509&r2=1.510
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4083&r2=1.4084
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/except.c.diff?cvsroot=gcc&r1=1.167&r2=1.168
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.200&r2=1.201
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.859&r2=1.860
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3816&r2=1.3817
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/eh/throw1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/sizeof3.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/access14.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/enum1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


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


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

* [Bug c++/15554] [3.4/3.5 Regression] ICE in tsubst_copy, at cp/pt.c:7433
  2004-05-21 17:17 [Bug c++/15554] New: ICE in tsubst_copy, at cp/pt.c:7433 gcc-bugzilla at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-06-07 15:54 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-07 16:24 ` mmitchel at gcc dot gnu dot org
  2004-06-07 16:33 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-07 16:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-06-07 16:24 -------
Fixed in GCC 3.4.1.

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


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


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

* [Bug c++/15554] [3.4/3.5 Regression] ICE in tsubst_copy, at cp/pt.c:7433
  2004-05-21 17:17 [Bug c++/15554] New: ICE in tsubst_copy, at cp/pt.c:7433 gcc-bugzilla at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-06-07 16:24 ` mmitchel at gcc dot gnu dot org
@ 2004-06-07 16:33 ` mmitchel at gcc dot gnu dot org
  2004-06-08 16:46 ` hzoli at austin dot ibm dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-07 16:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-06-07 16:33 -------
*** Bug 15063 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ivan at sierra-da dot com


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


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

* [Bug c++/15554] [3.4/3.5 Regression] ICE in tsubst_copy, at cp/pt.c:7433
  2004-05-21 17:17 [Bug c++/15554] New: ICE in tsubst_copy, at cp/pt.c:7433 gcc-bugzilla at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-06-07 16:33 ` mmitchel at gcc dot gnu dot org
@ 2004-06-08 16:46 ` hzoli at austin dot ibm dot com
  2004-06-08 16:55 ` hzoli at austin dot ibm dot com
  2004-06-08 18:16 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: hzoli at austin dot ibm dot com @ 2004-06-08 16:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hzoli at austin dot ibm dot com  2004-06-08 16:46 -------
(In reply to comment #5)
> Fixed in GCC 3.4.1.

The ICE is fixed, however the real construct I am trying to
use is still not working.  Consider a slight modification
of the testcase:

template <int n> struct T1 { enum { N = 3 }; };
template <int n> struct T2 { enum { N = n, N1 = T1<N>::N }; };

This gives the following error message:

ice.C:2: error: non-constant `n' cannot be used as template argument
ice.C:2: error: `N' is not a member of `<declaration error>'

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


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


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

* [Bug c++/15554] [3.4/3.5 Regression] ICE in tsubst_copy, at cp/pt.c:7433
  2004-05-21 17:17 [Bug c++/15554] New: ICE in tsubst_copy, at cp/pt.c:7433 gcc-bugzilla at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-06-08 16:46 ` hzoli at austin dot ibm dot com
@ 2004-06-08 16:55 ` hzoli at austin dot ibm dot com
  2004-06-08 18:16 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: hzoli at austin dot ibm dot com @ 2004-06-08 16:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From hzoli at austin dot ibm dot com  2004-06-08 16:55 -------
(In reply to comment #7)
> template <int n> struct T2 { enum { N = n, N1 = T1<N>::N }; };

It seems it does not like incomplete enums, since this works:

template <int n> struct T2
{ enum { N = n }; enum { N1 = T1<N>::N }; };


-- 


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


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

* [Bug c++/15554] [3.4/3.5 Regression] ICE in tsubst_copy, at cp/pt.c:7433
  2004-05-21 17:17 [Bug c++/15554] New: ICE in tsubst_copy, at cp/pt.c:7433 gcc-bugzilla at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2004-06-08 16:55 ` hzoli at austin dot ibm dot com
@ 2004-06-08 18:16 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-08 18:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-08 18:15 -------
I opened PR 15877 to track the different bug.
So closing this one as fixed.

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


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


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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-21 17:17 [Bug c++/15554] New: ICE in tsubst_copy, at cp/pt.c:7433 gcc-bugzilla at gcc dot gnu dot org
2004-05-21 17:32 ` [Bug c++/15554] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-06-05 19:39 ` mmitchel at gcc dot gnu dot org
2004-06-07 15:52 ` cvs-commit at gcc dot gnu dot org
2004-06-07 15:54 ` cvs-commit at gcc dot gnu dot org
2004-06-07 16:24 ` mmitchel at gcc dot gnu dot org
2004-06-07 16:33 ` mmitchel at gcc dot gnu dot org
2004-06-08 16:46 ` hzoli at austin dot ibm dot com
2004-06-08 16:55 ` hzoli at austin dot ibm dot com
2004-06-08 18:16 ` 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).