From: Richard Biener Date: Mon, 21 Sep 2015 12:33:23 +0000 (+0000) Subject: re PR middle-end/67651 (Optimizer assumes nothing can reside at address 0 despite... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06da803c9fb2c7feadf1c7fbc7c67430547d37ab;p=gcc.git re PR middle-end/67651 (Optimizer assumes nothing can reside at address 0 despite -fno-delete-null-pointer-checks) 2015-09-21 Richard Biener PR middle-end/67651 * rtlanal.c (nonzero_address_p): SYMBOL_REFs may have zero address with -fno-delete-null-pointer-checks. From-SVN: r227968 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ce9a20f0eb1..246237b78c6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-09-21 Richard Biener + + PR middle-end/67651 + * rtlanal.c (nonzero_address_p): SYMBOL_REFs may have zero + address with -fno-delete-null-pointer-checks. + 2015-09-21 Alan Lawrence * config/rs6000/altivec.md (reduc_splus_): Rename to... diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index b1be4db0dc1..815fc49800f 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -723,7 +723,7 @@ nonzero_address_p (const_rtx x) switch (code) { case SYMBOL_REF: - return !SYMBOL_REF_WEAK (x); + return flag_delete_null_pointer_checks && !SYMBOL_REF_WEAK (x); case LABEL_REF: return true;