-fdata-sections and an attribute cause internal error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GCC |
New
|
Undecided
|
Unassigned |
Bug Description
The following small file causes an internal error when compiled with Linaro GCC for Arm 4.9, on Linux x86 (64 bit):
const int echo = 5;
const int echo __attribute__ ((externally_
int main(int argc, char* argv[])
{
return (echo);
}
Here is the command line and the output:
/work/gcc-
main.c:2:1: internal compiler error: in get_variable_
const int echo __attribute__ ((externally_
^
no stack trace because unwind library not available
Please submit a full bug report,
with preprocessed source if appropriate.
See <https:/
If the option -fdata-sections is omitted, the compilation succeeds. The same problem shows up with Linaro GCC for Arm 4.7 and 4.8, but not with x86 versions of GCC.