AnsweredAssumed Answered

QorIQ SDK2.0 compile float

Question asked by shunping lin on Oct 11, 2017
Latest reply on Jul 15, 2018 by 涛 尹

Now, I use the SDK2.0 to compile my program which had float variable, but gcc display:

MPFR: Can't allocate memory (size=4294967288)
hello.c: In function 'main':
hello.c:5:5: internal compiler error: Aborted
float a=1.0;

 

 

 

The program:

#include <stdio.h>

 

int main()
{
   float a=1.0;
   a += 2;
   printf("a:%f \n",a);
    return 0;
}

compile the program with the flowing command:

arm-fsl-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=/opt/fsl-qoriq/2.0/sysroots/cortexa7hf-vfp-neon-fsl-linux-gnueabi hello.c -o hello
MPFR: Can't allocate memory (size=4294967288)
hello.c: In function 'main':
hello.c:5:5: internal compiler error: Aborted
float a=1.0;
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

 

It seems that gcc MPFR's bug, then I how to fix it?

Outcomes