Description of problem: The following code snippit fails when compiled w/ optimization enabled on gcc 3.2.3-24. It works when you don't compile w/ -O. It also works with gcc 3.3.2. Version-Release number of selected component (if applicable): gcc-3.2.3-24 (x86_64) How reproducible: Always Steps to Reproduce: $ /usr/bin/g++ -m64 -O3 test.cpp $ ./a.out Testing 1... Testing 1 OK Testing 2... Segmentation fault (core dumped) Source for test.cpp: #include <iostream> using namespace std; void test1(...) { } void test2(int i, ...) { } int main(int, char **) { cout << "Testing 1..." << endl; test1(1, 1.2); cout << "Testing 1 OK" << endl; cout << "Testing 2..." << endl; test2(1, 1.2); cout << "Testing 2 OK" << endl; return 1; } Actual results: Expected results: Additional info:
Should be fixed by: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.17048&r2=1.17049 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&r1=1.547&r2=1.548 which will be added in gcc-3.2.3-29.
An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2004-142.html