Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 5919
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Mark Mitchell <mmitchel@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: he@marel.is
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 5919 depends on: Show dependency tree
Show dependency graph
Bug 5919 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2002-03-12 04:26
g++3.0.4 gives an internal compiler error when compiling the
attached code

Release:
3.0.4, 3.1

Environment:
System: Linux marel2023 2.4.9-31.1 #1 Mon Mar 11 06:52:10 EST 2002 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.0.4/configure --prefix=/usr/local/gcc3 --enable-threading=posix

How-To-Repeat:
Try to compile the attached code

#include<vector>
#include<algorithm>
 
int main() {
        std::vector<int> v1, v2;
        int score[v1.size()+1][v2.size()+1];
        std::fill(score, score+(v1.size()+1)*(v2.size()+1), 0);
        return 0;
}

------- Comment #1 From he@marel.is 2002-03-12 04:26 -------
Fix:
http://gcc.gnu.org/ml/gcc-patches/2002-12/msg00034.html

------- Comment #2 From Kriang Lerdsuwanakij 2002-05-20 07:23 -------
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed.

------- Comment #3 From Volker Reichelt 2002-11-29 14:29 -------
From: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
To: he@marel.is, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
        nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/5919: [3.2/3.3 regression] ICE when passing variable array to template function
Date: Fri, 29 Nov 2002 14:29:29 +0100

 Here's a reduced testcase:
 
 -------------------------snip here------------------
 template<typename T> void foo(T);
 
 void bar()
 {
     int i;
     int A[i][i];
     foo(A);
 }
 -------------------------snip here------------------
 
 It crashes gcc 3.0.x, 3.2-branch and mainline.
 gcc 2.95.3 issued a regular error message.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5919
 
 

------- Comment #4 From Mark Mitchell 2002-12-01 10:32 -------
Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-Why: Working on a fix.

------- Comment #5 From Mark Mitchell 2002-12-01 12:47 -------
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed in GCC 3.2.2, GCC 3.3.

------- Comment #6 From Mark Mitchell 2002-12-01 20:46 -------
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/5919
Date: 1 Dec 2002 20:46:09 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2002-12-01 12:46:09
 
 Modified files:
 	gcc/cp         : ChangeLog pt.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/template: varmod1.C 
 
 Log message:
 	PR c++/5919
 	* g++.dg/template/varmod1.C: New test.
 	
 	PR c++/5919
 	* pt.c (unify): Use variably_modified_type_p to test validity of
 	template argument types.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3062&r2=1.3063
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.633&r2=1.634
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2244&r2=1.2245
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/varmod1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 


------- Comment #7 From Mark Mitchell 2002-12-01 20:46 -------
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/5919
Date: 1 Dec 2002 20:46:09 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	mmitchel@gcc.gnu.org	2002-12-01 12:46:09
 
 Modified files:
 	gcc/cp         : ChangeLog pt.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/template: varmod1.C 
 
 Log message:
 	PR c++/5919
 	* g++.dg/template/varmod1.C: New test.
 	
 	PR c++/5919
 	* pt.c (unify): Use variably_modified_type_p to test validity of
 	template argument types.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3062&r2=1.3063
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.633&r2=1.634
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2244&r2=1.2245
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/varmod1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
 


------- Comment #8 From Mark Mitchell 2002-12-01 20:52 -------
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/5919
Date: 1 Dec 2002 20:52:56 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-branch
 Changes by:	mmitchel@gcc.gnu.org	2002-12-01 12:52:56
 
 Modified files:
 	gcc/cp         : ChangeLog pt.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/template: varmod1.C 
 
 Log message:
 	PR c++/5919
 	* g++.dg/template/varmod1.C: New test.
 	
 	PR c++/5919
 	* pt.c (unify): Use variably_modified_type_p to test validity of
 	template argument types.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.2685.2.114.2.47&r2=1.2685.2.114.2.48
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.578.2.11.2.5&r2=1.578.2.11.2.6
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1672.2.166.2.62&r2=1.1672.2.166.2.63
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/varmod1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.2.1
 


------- Comment #9 From Mark Mitchell 2002-12-01 20:52 -------
From: mmitchel@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/5919
Date: 1 Dec 2002 20:52:56 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-branch
 Changes by:	mmitchel@gcc.gnu.org	2002-12-01 12:52:56
 
 Modified files:
 	gcc/cp         : ChangeLog pt.c 
 	gcc/testsuite  : ChangeLog 
 Added files:
 	gcc/testsuite/g++.dg/template: varmod1.C 
 
 Log message:
 	PR c++/5919
 	* g++.dg/template/varmod1.C: New test.
 	
 	PR c++/5919
 	* pt.c (unify): Use variably_modified_type_p to test validity of
 	template argument types.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.2685.2.114.2.47&r2=1.2685.2.114.2.48
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.578.2.11.2.5&r2=1.578.2.11.2.6
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1672.2.166.2.62&r2=1.1672.2.166.2.63
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/varmod1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.2.1

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug