Bug 26462 - initializer element is not computable at load time
Summary: initializer element is not computable at load time
Status: RESOLVED DUPLICATE of bug 26374
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-24 21:02 UTC by Pawel Sikora
Modified: 2006-02-24 21:04 UTC (History)
3 users (show)

See Also:
Host: ppc-linux
Target: ppc-linux
Build: ppc-linux
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Sikora 2006-02-24 21:02:14 UTC
$ cat const.c
#define B0 (+1.0l/5/1/6)

const double c0 = B0; // initializer element is not computable at load time
const double c0_tab[1] = { B0 }; // initializer element is not constant

#define B1 (+1.0l/5)

const double c1 = B1; // ok.
const double c1_tab[1] = { B1 }; // initializer element is not constant

$ gcc const.c
const.c:3: error: initializer element is not computable at load time
const.c:4: error: initializer element is not constant
const.c:4: error: (near initialization for 'c0_tab[0]')
const.c:9: error: initializer element is not constant
const.c:9: error: (near initialization for 'c1_tab[0]')

gcc-4.1.0-rc1 with long-double-128 patchset.
Comment 1 Andrew Pinski 2006-02-24 21:04:14 UTC
This is a dup of bug 26374.  The problem is that the middle-end does not fold IBM 128bit long double format currently.  See PR 19405 for history on why.

*** This bug has been marked as a duplicate of 26374 ***