public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/49413] New: over-optimization that causes valid code to segfault
@ 2011-06-15  0:32 gattis at gmail dot com
  2011-06-15  0:35 ` [Bug c/49413] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: gattis at gmail dot com @ 2011-06-15  0:32 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: over-optimization that causes valid code to segfault
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gattis@gmail.com


Created attachment 24529
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24529
source code

The attached short .c code compiles without warnings and segfaults when -O3 is
used.  The code runs fine with -O1 or if I declare v as "volatile double *"
instead of just "double *".  This was triggered in a much larger code base. 
I've managed to strip everything else out and reduce it to this.  I'm pretty
sure the code left is correct, so I think it's a GCC bug.

GCC Version: 4.6.0 w/ gmp-5.0.2, mpc-0.9, mpfr-3.0.1
System: CentOS 5 x86_64 (AMD Istanbull)
GCC ./configure flags: --enable-languages=c,c++,fortran
Source compilation command: gcc -O3 volatile.c -o volatile


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-08-04  9:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-15  0:32 [Bug c/49413] New: over-optimization that causes valid code to segfault gattis at gmail dot com
2011-06-15  0:35 ` [Bug c/49413] " pinskia at gcc dot gnu.org
2011-06-15  0:38 ` gattis at gmail dot com
2011-06-15  0:39 ` gattis at gmail dot com
2011-06-15  1:01 ` [Bug tree-optimization/49413] " paolo.carlini at oracle dot com
2011-06-15  1:10 ` gattis at gmail dot com
2011-06-15  1:13 ` pinskia at gcc dot gnu.org
2011-06-15  1:20 ` gattis at gmail dot com
2011-08-04  3:59 ` gabriel at teuton dot org
2011-08-04  4:21 ` gattis at gmail dot com
2011-08-04  9:36 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).