[arm-gnu] internal compiler error when using -fdata_sections
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[arm-gnu] internal compiler error when using -fdata_sections



The following program, when built with -fdata_section, triggers an internal compiler error from the compiler arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2010.09-50) 4.5.1:
const int echo = 5;
const int echo __attribute__ ((externally_visible));

int main(int argc, char* argv[])
{
    return (echo);
}

A console log with the error:
% arm-none-linux-gnueabi-gcc  --version
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2010.09-50) 4.5.1
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% arm-none-linux-gnueabi-gcc -c -x c -march=armv6 -fPIC -O2 -ffunction-sections -fdata-sections main.c
main.c:2:1: internal compiler error: in get_variable_section, at varasm.c:1216
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://support.codesourcery.com/GNUToolchain/> for instructions.

% cat main.c
const int echo = 5;
const int echo __attribute__ ((externally_visible));

int main(int argc, char* argv[])
{
    return (echo);
}