When I use the -fdata-sections option, the compiler crashes
whenever it sees a global initialized variable. Any ideas on
how to fix this?
$ cat foo.c
static unsigned u = 1;
unsigned foo(void)
{
return u;
}
$ msp430-gcc -mmcu=msp430x4250 -g -Wall -W -Wpointer-arith -Wcast-align -Wshadow
-Wundef -Wwrite-strings -O1 -fomit-frame-pointer -fshort-double
-DENABLE_DIAG_PRINTF=1 -fno-builtin-memcpy -fno-builtin-memset
-DExternalReference=1 -DHasTempSensor=1 -ffunction-sections -fdata-sections -c
foo.c
foo.c:2: Internal compiler error in unique_section, at
config/msp430/msp430.c:1972
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
$ msp430-gcc --version
msp430-gcc (GCC) 3.2.3
Copyright (C) 2002 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.
--
Grant Edwards grante Yow! Is it FUN to be
at a MIDGET?
visi.com
Compiler crashes on initialized variables with -fdata-sections
Started by ●March 27, 2007
Reply by ●March 27, 20072007-03-27
In my case, if I add -fdata-sections I end up with [assembler] errors:
/var/tmp//ccCmGzjA.s: Assembler messages:
/var/tmp//ccCmGzjA.s:724: Error: unrecognized symbol type ""
/var/tmp//ccCmGzjA.s:724: Error: junk at end of line, first
unrecognized charact
er is `0'
We're running different versions of mspgcc (mine is 3.4.4, see my post
from the other thread).
--
mmihai
/var/tmp//ccCmGzjA.s: Assembler messages:
/var/tmp//ccCmGzjA.s:724: Error: unrecognized symbol type ""
/var/tmp//ccCmGzjA.s:724: Error: junk at end of line, first
unrecognized charact
er is `0'
We're running different versions of mspgcc (mine is 3.4.4, see my post
from the other thread).
--
mmihai
Reply by ●March 27, 20072007-03-27
On 2007-03-27, Mihai wrote:
>
> In my case, if I add -fdata-sections I end up with [assembler] errors:
>
> /var/tmp//ccCmGzjA.s: Assembler messages:
> /var/tmp//ccCmGzjA.s:724: Error: unrecognized symbol type ""
> /var/tmp//ccCmGzjA.s:724: Error: junk at end of line, first
> unrecognized charact
> er is `0'
>
> We're running different versions of mspgcc (mine is 3.4.4, see my post
> from the other thread).
It looks like -fdata-sections is pretty much broken. :/
--
Grant Edwards grante Yow! Yow! Now we can
at become alcoholics!
visi.com
>
> In my case, if I add -fdata-sections I end up with [assembler] errors:
>
> /var/tmp//ccCmGzjA.s: Assembler messages:
> /var/tmp//ccCmGzjA.s:724: Error: unrecognized symbol type ""
> /var/tmp//ccCmGzjA.s:724: Error: junk at end of line, first
> unrecognized charact
> er is `0'
>
> We're running different versions of mspgcc (mine is 3.4.4, see my post
> from the other thread).
It looks like -fdata-sections is pretty much broken. :/
--
Grant Edwards grante Yow! Yow! Now we can
at become alcoholics!
visi.com