This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/63803] When GCC 4.9.2 compile with option -O2, the target is error.


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63803

--- Comment #3 from Airbak <airbak.li at huawei dot com> ---
Thank you for your reply!
"-fisolate-erroneous-paths-dereference" is a new option in GCC-4.9.x.
When I use GCC-4.8.x, it is OK and will not have this problem.
More and more people are switching GCC4.8 to GCC4.9, I think they will meet
this problem too. Please help me and tell me how to solve it, thanks.


1.
This code run after DDR init. DDR address range is 0x0 to 0x80000000.
Some operation will get and set the address 0x0.

2.
*((unsigned int *)0) is OK
*((volatile unsigned int *)0)  is not OK.
Why the "volatile"  makes different?

3. 
If I want to use option "-O2" and not contain
"-fisolate-erroneous-paths-dereference", how should I configure to compile a
cross-toolchain with  GCC-4.9.2?
I mean when  compile a file  with command "gcc -O2 a.c",  it will not contain
option "-fisolate-erroneous-paths-dereference".
like:
$SRCDIR/$GCC/configure --target=$TARGET \
    --prefix=$INSTALLDIR_NATIVE \
    --libexecdir=$INSTALLDIR_NATIVE/lib \
    --infodir=$INSTALLDIR_NATIVE_DOC/info \
    --mandir=$INSTALLDIR_NATIVE_DOC/man \
    --htmldir=$INSTALLDIR_NATIVE_DOC/html \
    --pdfdir=$INSTALLDIR_NATIVE_DOC/pdf \
    --enable-languages=c,c++ \
    --enable-plugins \
    --disable-decimal-float \
    --disable-libffi \
    --disable-libgomp \
    --disable-libmudflap \
    --disable-libquadmath \
    --disable-libssp \
    --disable-libstdcxx-pch \
    ...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]