Red Hat Bugzilla – Bug 226706
Attached code crashes the compiler, error at: reload1.c:9508
Last modified: 2007-11-16 20:14:46 EST
From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9 Description of problem: A GCC internal error results from attempting to compile the following code with g++ and the -fnon-call-exceptions, -O2, and -fPIC options: void foo() { try { float y = 10; while (y > 0) { double z = (y / 10); y = z; } } catch (...) {} } when using the following command line: Version-Release number of selected component (if applicable): gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-49) How reproducible: Always Steps to Reproduce: 1. Copy the code given in the description of this bug report to foo.cpp. 2. Attempt to build foo.os using the command line: g++ -o foo.os -c -fnon-call-exceptions -O2 -fPIC foo.cpp 3. Compilation will fail, indicating an internal compiler error at reload1.c:9508. Actual Results: The compilation fails, here is the full error message from gcc: foo.cpp: In function `void foo()': foo.cpp:13: Internal compiler error in fixup_abnormal_edges, at reload1.c:9508 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. Preprocessed source stored into /tmp/ccW0oA9V.out file, please attach this to your bugreport. Expected Results: Should have built successfully. Additional info:
Created attachment 147106 [details] File referenced for attachment in error message.
Created attachment 147957 [details] Patch that fixes the bug This bug is already fixed in GCC 4.1, as part of a patch that fixes a bigger problem introduced afterwards. This is a "backport" for 3.2 of the relevant portion of the larger patch.
Fixed in gcc-3.2.3-59.
An advisory 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/RHSA-2007-0473.html