Bug 116068 - c++ code core dumps w/ -O flag on x86_64, works in gcc 3.3.2
Summary: c++ code core dumps w/ -O flag on x86_64, works in gcc 3.3.2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc
Version: 3.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-18 00:13 UTC by Lenny
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-05-12 03:40:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:142 0 normal SHIPPED_LIVE GCC bugfix update 2004-05-11 04:00:00 UTC

Description Lenny 2004-02-18 00:13:19 UTC
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:

Comment 2 John Flanagan 2004-05-12 03:40:21 UTC
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



Note You need to log in before you can comment on or make changes to this bug.