re PR middle-end/67651 (Optimizer assumes nothing can reside at address 0 despite...
authorRichard Biener <rguenther@suse.de>
Mon, 21 Sep 2015 12:33:23 +0000 (12:33 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 21 Sep 2015 12:33:23 +0000 (12:33 +0000)
2015-09-21  Richard Biener  <rguenther@suse.de>

PR middle-end/67651
* rtlanal.c (nonzero_address_p): SYMBOL_REFs may have zero
address with -fno-delete-null-pointer-checks.

From-SVN: r227968

gcc/ChangeLog
gcc/rtlanal.c

index ce9a20f0eb12e5f0694a74a26bba4193541526f6..246237b78c6440c77b355745e8d181a2dbf14a9d 100644 (file)
@@ -1,3 +1,9 @@
+2015-09-21  Richard Biener  <rguenther@suse.de>
+
+       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  <alan.lawrence@arm.com>
 
        * config/rs6000/altivec.md (reduc_splus_<mode>): Rename to...
index b1be4db0dc1abb065d1cf94ad2049b11153be7e3..815fc49800f7222796c990bee2c9fe502b3824a8 100644 (file)
@@ -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;