Compilation of the file leads to error_build_modify_expr.cpp: In constructor `foo<D>::foo() [with int D = 1]': error_build_modify_expr.cpp:15: instantiated from here error_build_modify_expr.cpp:11: Internal compiler error in build_modify_expr, at cp/typeck.c:5494 Please submit a full bug report, with preprocessed source if appropriate. See <URL:https://qa.mandrakesoft.com/> for instructions. Release: gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk) Environment: Fresh Mandrake 9.0 installation (gcc-2.96 is also installed) How-To-Repeat: Compile the file with no special flags g++ error_build_modify_expr.cpp
Fix: http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01874.html
State-Changed-From-To: open->analyzed State-Changed-Why: Confirmed.
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu> To: gcc-gnats@gcc.gnu.org Cc: Subject: Re: c++/8160: ICE in build_modify_expr, at cp/typeck.c:5494: Array initialization Date: Wed, 30 Oct 2002 11:24:23 -0600 (CST) Regression vs. 2.95. Reduced code is this: ------------------------- template <int D> struct C { int d[3]; C(); }; template<int D> C<D>::C() : d((int[]){1,2,3}) {}; template class C<1>; ----------------------------- I think, this code is actually using a gcc extension with the (int[]){1,2,3} thingy. I am also not exactly sure whether this is legal (using "int[]" over "int[3]"), and changing it to the latter form makes the bug go away as well. Nevertheless, it worked with 2.95. W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth
State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed in GCC 3.2.1.
From: mmitchel@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: c++/8160 Date: 31 Oct 2002 00:02:36 -0000 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_2-branch Changes by: mmitchel@gcc.gnu.org 2002-10-30 16:02:36 Modified files: gcc/testsuite : ChangeLog gcc/cp : ChangeLog decl.c typeck2.c Added files: gcc/testsuite/g++.dg/template: complit1.C typename4.C Log message: PR c++/8160 * g++.dg/template/complit1.C: New test. PR c++/8149 * g++.dg/template/typename4.C: Likewise. PR c++/8160 * typeck2.c (process_init_constructor): Call complete_array_type. PR c++/8149 * decl.c (make_typename_type): Issue errors about invalid results. Patches: 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.43&r2=1.1672.2.166.2.44 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/complit1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/typename4.C.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.2.1 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.37&r2=1.2685.2.114.2.38 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.866.2.36.2.11&r2=1.866.2.36.2.12 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck2.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.117.2.2.2.1&r2=1.117.2.2.2.2
From: mmitchel@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: c++/8160 Date: 31 Oct 2002 00:04:13 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2002-10-30 16:04:13 Modified files: gcc/testsuite : ChangeLog gcc/cp : ChangeLog decl.c typeck2.c Added files: gcc/testsuite/g++.dg/template: complit1.C typename4.C Log message: PR c++/8160 * typeck2.c (process_init_constructor): Call complete_array_type. PR c++/8149 * decl.c (make_typename_type): Issue errors about invalid results. PR c++/8160 * g++.dg/template/complit1.C: New test. PR c++/8149 * g++.dg/template/typename4.C: Likewise. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2193&r2=1.2194 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/complit1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/typename4.C.diff?cvsroot=gcc&r1=1.1&r2=1.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3032&r2=1.3033 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.958&r2=1.959 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck2.c.diff?cvsroot=gcc&r1=1.131&r2=1.132