--- Comment #3 from adeymo at dc dot uba dot ar 2009-03-01 05:08 ---
(From update of attachment 17380)
Compile with:
gcc -save-temps -O2 -Wall -Werror xqsort-small.c -o xqsort-small
Run with:
./xqsort-small && echo ok
If compiled with -O1 , the echo command must be
--- Comment #2 from adeymo at dc dot uba dot ar 2009-03-01 05:06 ---
Created an attachment (id=17380)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17380&action=view)
Testcase smaller and simpler
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39330
--- Comment #1 from adeymo at dc dot uba dot ar 2009-03-01 05:05 ---
Created an attachment (id=17379)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17379&action=view)
Testcase with debug information and explanation
Compile with:
gcc -save-temps -O2 -Wall -Werror xqso
27;t fix the problem.
*
* * If you compile with -O1 or -O0 the bug is NOT present.
*
**/
--
Summary: Bad program bahavior with -O2 optimization in plain C
Product: gcc
Version: 4.2.4
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: adeymo at dc dot uba dot ar
GCC build triplet: i486-linux-gnu
GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39330