The following code crashes the GCC 3.3.2 compiler when variable 'a' is initialized with an incomplete list of values. Normally, the rest of the values in a structure are assumed to be zeroed if left unspecified. The compiler does not crash if the {1} below is edited to a {0}. The crash appears to happen regardless of the -march or -mcpu setting. typedef int v8qi __attribute__((mode(V8QI))); int main() { v8qi a={1}; } Compiling displays the following: simd.c: In function `main': simd.c:5: warning: unused variable `a' simd.c:5: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Confirmed, A regression from 3.3. From Phil's regression hunter: Search converges between 2003-07-24-3.3 (#174) and 2003-07 -25-3.3 (#175). Patch which caused this: <http://gcc.gnu.org/ml/gcc-patches/2003-07/msg02401.html>. Fixed on the mainline: Search converges between 2003-06-19-trunk (#318) and 2003-06-20- trunk (#319). Patch which fixed it on the mainline: <http://gcc.gnu.org/ml/gcc-patches/2003-06/ msg02231.html>. I will take care of back porting this patch (it is a small one).
Subject: Bug 13475 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: pinskia@gcc.gnu.org 2003-12-23 18:41:00 Modified files: gcc : expr.c ChangeLog Log message: 2003-12-23 Andrew Pinski <pinskia@physics.uc.edu> PR middle-end/13475 Backport from mainline: 2003-06-19 Aldy Hernandez <aldyh@redhat.com> * expr.c (const_vector_from_tree): Initialize remaining elements to 0. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/expr.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.498.2.23&r2=1.498.2.24 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.859&r2=1.16114.2.860
Fixed.