This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19640] New: ICE when using the "(type) {...}" syntax array constructor expression syntax
- From: "blaisorblade_spam at yahoo dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jan 2005 13:53:33 -0000
- Subject: [Bug c++/19640] New: ICE when using the "(type) {...}" syntax array constructor expression syntax
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In C++ mode (not in C) this code invariably creates an ICE (segmentation fault):
typedef int matrix[4];
matrix foo = (matrix) {1,2,3,4};
This one does too:
int mat[1] = (int[1]) {2};
While removing the "(type)" part makes it compile perfectly:
typedef int matrix[4];
matrix foo = {1,2,3,4};
int mat[1] = {2};
Datas about the system (generated with gccbug):
System: Linux zion 2.6.10-gentoo-r6-skas3-v7 #1 Thu Jan 20 19:09:53 CET 2005
i686 AMD Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux
Architecture: i686
configured with: /var/tmp/portage/gcc-3.4.3/work/gcc-3.4.3/configure --enable-
version-specific-runtime-libs --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-
bin/3.4 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/include --datadir=/
usr/share/gcc-data/i686-pc-linux-gnu/3.4 --mandir=/usr/share/gcc-data/i686-pc-
linux-gnu/3.4/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4/info --
with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/include/g++-v3 --
host=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext
--enable-__cxa_atexit --enable-clocale=gnu --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --enable-shared --enable-
threads=posix --disable-multilib --disable-libgcj --enable-languages=c,c++
--
Summary: ICE when using the "(type) {...}" syntax array
constructor expression syntax
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: blaisorblade_spam at yahoo dot it
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19640