Red Hat Bugzilla – Bug 178062
gcc crash when compiling AltiVec code
Last modified: 2007-11-30 17:07:22 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
Description of problem:
gcc encounters internal compiler error when compiling code initializing an array of vectors. If the variable is a single vector instead of an array of vectors, compiler executes correctly. Source code and gcc output will be added as an attachment.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. compile attached code using gcc -maltivec -mabi=altivec
Actual Results: Compiler caught internal error and halted.
Expected Results: Compiler should have produced executable.
gcc -g -maltivec -mabi=altivec a.c -o a.out
a.c: In function `main':
a.c:7: internal compiler error: in copy_constant, at varasm.c:2466
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/ccQnwvma.out file, please attach this to your bugreport.
Created attachment 123311 [details]
Source code which triggers compiler error.
Created attachment 123312 [details]
Preprocessed source code from gcc from a.c.
Created attachment 123322 [details]
Modified source code that prevents the internal compiler error.
The attached file b.c has the changes that must be made for gcc to no longer
crash. With the changes, it compiles and generates correct code.
I have verified that the bug is not present in gcc4-4.0.0-0.14.EL4
This issue is on Red Hat Engineering's list of planned work items
for the upcoming Red Hat Enterprise Linux 4.4 release. Engineering
resources have been assigned and barring unforeseen circumstances, Red
Hat intends to include this item in the 4.4 release.
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.