[Bug c++/23099] [4.0/4.1 regression] ICE in build_simple_base_path, at cp/class.c:460

2005-08-29 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-08-29 
13:56 ---
Subject: Bug 23099

CVSROOT:/cvs/gcc
Module name:gcc
Branch: gcc-4_0-branch
Changes by: [EMAIL PROTECTED]   2005-08-29 13:56:48

Modified files:
gcc/cp : cp-tree.h decl.c init.c name-lookup.c pt.c 
 ChangeLog 
gcc/testsuite/g++.dg/init: member1.C 
gcc/testsuite  : ChangeLog 
Added files:
gcc/testsuite/g++.dg/template: static13.C static14.C 

Log message:
PR c++/23099
* cp-tree.h (saved_scope): Add skip_evaluation.
* decl.c (start_decl): Use DECL_INITIALIZED_IN_CLASS_P, not
DECL_INITIAL, to determine whether or not a static data member was
initialized in the class-specifier.
(cp_finish_decl): Add comment.
* init.c (integral_constant_value): Subtitute into the
initializers for static data members in templates.
* name-lookup.c (push_to_top_level): Save skip_evaluation.
(pop_from_top_level): Restore it.
* pt.c (instantiate_class_template): Do not substitute into the
intializers of static data members when instantiating a class.
(regenerate_decl_from_template): Simplify.
(instantiate_decl): Tidy.  Substitute into the initializer for a
static data member even when the definition of the data member is
not available.

PR c++/23099
* g++.dg/init/member1.C: Make sure erroneous static data member
definitions are required.
* g++.dg/template/static13.C: New test.
* g++.dg/template/static14.C: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.1106.2.12r2=1.1106.2.13
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.1371.2.19r2=1.1371.2.20
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/init.c.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.412.2.7r2=1.412.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.109.4.6r2=1.109.4.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.978.2.19r2=1.978.2.20
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.4648.2.84r2=1.4648.2.85
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/member1.C.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.1.10.1r2=1.1.10.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/static13.C.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=NONEr2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/static14.C.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=NONEr2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcconly_with_tag=gcc-4_0-branchr1=1.5084.2.358r2=1.5084.2.359



-- 


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


[Bug c++/23099] [4.0/4.1 regression] ICE in build_simple_base_path, at cp/class.c:460

2005-08-29 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-08-29 
14:15 ---
Subject: Bug 23099

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2005-08-29 14:09:08

Modified files:
gcc/cp : cp-tree.h decl.c init.c name-lookup.c pt.c 
 ChangeLog 
gcc/testsuite/g++.dg/init: member1.C 
gcc/testsuite  : ChangeLog 
Added files:
gcc/testsuite/g++.dg/template: static13.C static14.C 

Log message:
PR c++/23099
* cp-tree.h (saved_scope): Add skip_evaluation.
* decl.c (start_decl): Use DECL_INITIALIZED_IN_CLASS_P, not
DECL_INITIAL, to determine whether or not a static data member was
initialized in the class-specifier.
(cp_finish_decl): Add comment.
* init.c (integral_constant_value): Subtitute into the
initializers for static data members in templates.
* name-lookup.c (push_to_top_level): Save skip_evaluation.
(pop_from_top_level): Restore it.
* pt.c (instantiate_class_template): Do not substitute into the
intializers of static data members when instantiating a class.
(regenerate_decl_from_template): Simplify.
(instantiate_decl): Tidy.  Substitute into the initializer for a
static data member even when the definition of the data member is
not available.

PR c++/23099
* g++.dg/init/member1.C: Make sure erroneous static data member
definitions are required.
* g++.dg/template/static13.C: New test.
* g++.dg/template/static14.C: Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gccr1=1.1159r2=1.1160
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gccr1=1.1420r2=1.1421
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/init.c.diff?cvsroot=gccr1=1.427r2=1.428
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gccr1=1.137r2=1.138
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gccr1=1.1026r2=1.1027
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gccr1=1.4861r2=1.4862
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/member1.C.diff?cvsroot=gccr1=1.1r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/static13.C.diff?cvsroot=gccr1=1.1r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/static14.C.diff?cvsroot=gccr1=1.1r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gccr1=1.5976r2=1.5977



-- 


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


[Bug c++/23099] [4.0/4.1 regression] ICE in build_simple_base_path, at cp/class.c:460

2005-08-29 Thread mmitchel at gcc dot gnu dot org

--- Additional Comments From mmitchel at gcc dot gnu dot org  2005-08-29 
14:18 ---
Fixed in 4.0.2.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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


[Bug c++/23099] [4.0/4.1 regression] ICE in build_simple_base_path, at cp/class.c:460

2005-08-28 Thread mmitchel at gcc dot gnu dot org


-- 
   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=23099


[Bug c++/23099] [4.0/4.1 regression] ICE in build_simple_base_path, at cp/class.c:460

2005-08-28 Thread mmitchel at gcc dot gnu dot org

--- Additional Comments From mmitchel at gcc dot gnu dot org  2005-08-28 
18:11 ---
The fundamental problem here is that G++ is not honoring [temp.inst], which
requires that:

in particular, the initialization (and any associated side-effects) of a static
data member does not occur unless the static data member is itself used in a way
that requires the definition of the static data member to exist.

It is instead performing the initialization immediately when instantiating
ADerived*.  I am looking into the issue.





-- 


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


[Bug c++/23099] [4.0/4.1 regression] ICE in build_simple_base_path, at cp/class.c:460

2005-07-27 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-27 
19:03 ---
Confirmed.

-- 
   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
   Keywords||ice-on-valid-code
   Last reconfirmed|-00-00 00:00:00 |2005-07-27 19:03:08
   date||
Summary|[4.0 regression] ICE in |[4.0/4.1 regression] ICE in
   |build_simple_base_path, at  |build_simple_base_path, at
   |cp/class.c:460  |cp/class.c:460
   Target Milestone|--- |4.0.2


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