From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3258 invoked by alias); 25 Jan 2011 23:04:06 -0000 Received: (qmail 3244 invoked by uid 22791); 25 Jan 2011 23:04:04 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Jan 2011 23:04:00 +0000 From: "LpSolit at netscape dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/47228] New: likely improper segfault in generated code X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: LpSolit at netscape dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 25 Jan 2011 23:05:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-01/txt/msg02749.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47228 Summary: likely improper segfault in generated code Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: regehr@cs.utah.edu CC: chenyang@cs.utah.edu Host: i686-pc-linux-gnu Target: i686-pc-linux-gnu Build: i686-pc-linux-gnu regehr@home:~/volatile/bugs/tmp343$ current-gcc -O1 small.c -o small regehr@home:~/volatile/bugs/tmp343$ ./small Segmentation fault regehr@home:~/volatile/bugs/tmp343$ current-gcc -v Using built-in specs. COLLECT_GCC=current-gcc COLLECT_LTO_WRAPPER=/mnt/z/z/compiler-install/gcc-r168608-install/libexec/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: ../configure --with-libelf=/usr/local --enable-lto --prefix=/mnt/z/z/compiler-install/gcc-r168608-install --program-prefix=r168608- --enable-languages=c,c++ Thread model: posix gcc version 4.6.0 20110109 (experimental) (GCC) regehr@home:~/volatile/bugs/tmp343$ cat small.c struct S4 { unsigned f0:24; } __attribute__((__packed__)); struct S4 g_10 = { 6210831 }; struct S4 func_2 (int x) { struct S4 l_8[2] = { {0}, {0} }; g_10 = l_8[1]; for (; x<2; x++) { struct S4 tmp = { 11936567 }; l_8[x] = tmp; } return g_10; } int main (void) { func_2 (0); return 0; }