Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1079415

Summary: Initializer element is not constant error on ppc archs
Product: Red Hat Enterprise Linux 6 Reporter: Susi Lehtola <susi.lehtola>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: mpolacek
Target Milestone: rc   
Target Release: 6.7   
Hardware: ppc64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-30 16:55:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Test file none

Description Susi Lehtola 2014-03-21 14:31:18 UTC
Created attachment 877305 [details]
Test file

#define X_FACTOR_C 0.9305257363491000250020102180716672510262
#define K_FACTOR_C 4.557799872345597137288163759599305358515
#define M_CBRT2         1.259921049894873164767210607278228350570L

static const double aa[2] = {    1.0,            M_CBRT2*0.07064/X_FACTOR_C};
static const double bb[2] = {    1.0/K_FACTOR_C, M_CBRT2*0.07064/X_FACTOR_C};

is valid C code. However, on RHEL5 and RHEL6 on the ppc and ppc64 architectures, respectively (for Fedora EPEL), gcc fails with

gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -o testbin /builddir/build/SOURCES/test.c
/builddir/build/SOURCES/test.c: In function 'main':
/builddir/build/SOURCES/test.c:10: error: initializer element is not constant
/builddir/build/SOURCES/test.c:10: error: (near initialization for 'aa[1]')
/builddir/build/SOURCES/test.c:11: error: initializer element is not constant
/builddir/build/SOURCES/test.c:11: error: (near initialization for 'bb[1]')
error: Bad exit status from /var/tmp/rpm-tmp.55318 (%build)

Comment 1 Susi Lehtola 2014-03-21 14:32:19 UTC
Above was on RHEL5, here's the output on RHEL6:

gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mminimal-toc -o testbin /builddir/build/SOURCES/test.c
/builddir/build/SOURCES/test.c: In function 'main':
/builddir/build/SOURCES/test.c:10: error: initializer element is not constant
/builddir/build/SOURCES/test.c:10: error: (near initialization for 'aa[1]')
/builddir/build/SOURCES/test.c:11: error: initializer element is not constant
/builddir/build/SOURCES/test.c:11: error: (near initialization for 'bb[1]')
error: Bad exit status from /var/tmp/rpm-tmp.jzqok8 (%build)

Comment 3 Marek Polacek 2014-03-23 22:13:54 UTC
This seems to be http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26374

Comment 4 Susi Lehtola 2014-04-22 18:06:49 UTC
Indeed it is.

Comment 6 RHEL Program Management 2014-09-30 16:55:51 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.