This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] ipa-icf.c: Fix issues generated by original latest commit
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Chen Gang S <gang dot chen at sunrus dot com dot cn>
- Cc: Jeff Law <law at redhat dot com>, "joseph\ at codesourcery dot com \>\> Joseph S. Myers" <joseph at codesourcery dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 10 Jan 2015 10:14:43 +0100
- Subject: Re: [PATCH] ipa-icf.c: Fix issues generated by original latest commit
- Authentication-results: sourceware.org; auth=none
- References: <54B0EAFC dot 5030009 at sunrus dot com dot cn>
Chen Gang S <gang.chen@sunrus.com.cn> writes:
> The related commit is "275e275 IPA ICF: target and optimization flags
> comparison.". For sem_function::equals_private(), fix the typo issue,
> and for target_opts_for_fn(), fix access NULL issue.
The NULL pointer dereference issue also broke Solaris/SPARC bootstrap...
> This issue can be found for cross compiling gcc "make all-target-libgcc"
> under h8300, after fix this issue, it can continue to cross compiling to
> meet the next building issue for h8300.
>
> 2015-01-10 Chen Gang <gang.chen.5i5j@gmail.com>
>
> * ipa-icf.c (sem_function::equals_private): Use '&&' instead of
> '||' to fix typo issue.
>
> * gcc/tree.h (target_opts_for_fn): Check NULL_TREE since it can
> accept and return NULL.
... and I've use a similar patch to fix it.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University