]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
avr.c: Add comment on why -fdelete-null-pointer-checks is disabled.
authorVishnu K S <Vishnu.k_s@atmel.com>
Thu, 24 Apr 2014 22:05:07 +0000 (22:05 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 24 Apr 2014 22:05:07 +0000 (16:05 -0600)
2014-04-24  Vishnu K S  <Vishnu.k_s@atmel.com>

* gcc/config/avr/avr.c: Add comment on why -fdelete-null-pointer-checks
is disabled.

2014-04-24  Vishnu K S  <Vishnu.k_s@atmel.com>

* gcc/testsuite/gcc.dg/tree-ssa/isolate-1.c: Skip test if
keeps_null_pointer_checks.
* gcc/testsuite/gcc.dg/tree-ssa/isolate-2.c: Ditto
* gcc/testsuite/gcc.dg/tree-ssa/isolate-3.c: Ditto
* gcc/testsuite/gcc.dg/tree-ssa/isolate-4.c: Ditto
* gcc/testsuite/gcc.dg/tree-ssa/isolate-5.c: Ditto

From-SVN: r209767

gcc/ChangeLog
gcc/config/avr/avr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/isolate-1.c
gcc/testsuite/gcc.dg/tree-ssa/isolate-2.c
gcc/testsuite/gcc.dg/tree-ssa/isolate-3.c
gcc/testsuite/gcc.dg/tree-ssa/isolate-4.c
gcc/testsuite/gcc.dg/tree-ssa/isolate-5.c

index f2fce0da6b6654a15bdff7a0bc3bce75c69a682f..cac9f8d657ea95959041de47256df964990cc1b2 100644 (file)
@@ -1,3 +1,8 @@
+2014-04-24  Vishnu K S  <Vishnu.k_s@atmel.com>
+
+       * gcc/config/avr/avr.c: Add comment on why -fdelete-null-pointer-checks
+       is disabled.
+
 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
 
        * tree.h (OMP_CLAUSE_LINEAR_GIMPLE_SEQ): Define.
index 99644ec927d02fdedf086b0c51f2c4527beaee8b..d4aa738e8998f33c61f190ba3a799d3b2d101503 100644 (file)
@@ -290,6 +290,12 @@ avr_to_int_mode (rtx x)
 static void
 avr_option_override (void)
 {
+  /* Disable -fdelete-null-pointer-checks option for AVR target.
+     This option compiler assumes that dereferencing of a null pointer
+     would halt the program.  For AVR this assumption is not true and
+     programs can safely dereference null pointers.  Changes made by this
+     option may not work properly for AVR.  So disable this option. */
+
   flag_delete_null_pointer_checks = 0;
 
   /* caller-save.c looks for call-clobbered hard registers that are assigned
index 5813e5e66e0de70ab222382b73b3b960277900be..cb863cb8ceb8c54b6815ec8b6966e071105503dd 100644 (file)
@@ -1,3 +1,12 @@
+2014-04-24  Vishnu K S  <Vishnu.k_s@atmel.com>
+
+       * gcc/testsuite/gcc.dg/tree-ssa/isolate-1.c: Skip test if
+       keeps_null_pointer_checks.
+       * gcc/testsuite/gcc.dg/tree-ssa/isolate-2.c: Ditto 
+       * gcc/testsuite/gcc.dg/tree-ssa/isolate-3.c: Ditto
+       * gcc/testsuite/gcc.dg/tree-ssa/isolate-4.c: Ditto
+       * gcc/testsuite/gcc.dg/tree-ssa/isolate-5.c: Ditto
+
 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
 
        * c-c++-common/gomp/atomic-16.c: Remove all dg-error directives.
index f1f3101d3d2b945515c0059ca03c60c6ba537702..3ed98aeb857cc143e69d8fea3eab8d13d4600405 100644 (file)
@@ -1,6 +1,7 @@
 
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -fdump-tree-isolate-paths" } */
+/* { dg-skip-if "" keeps_null_pointer_checks } */
 
 
 struct demangle_component
index bfcaa2b01daf8b889bc013c6efd8293e430f59ba..912d98e224617121ab7d3806f967dd8051276629 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -fisolate-erroneous-paths-attribute -fdump-tree-isolate-paths -fdump-tree-phicprop1" } */
+/* { dg-skip-if "" keeps_null_pointer_checks } */
 
 
 int z;
index 7dddd8062c0e9309631ba28af5aebec7c57d2516..9c2c5d55c2748a3d98a7ce37cb8c313adb37c9f9 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -fdump-tree-isolate-paths" } */
+/* { dg-skip-if "" keeps_null_pointer_checks } */
 
 
 typedef long unsigned int size_t;
index c9c074df62b39129b606552ff20988c2962b1d20..d50a2b27f472fb596a5f2d2443b4c051a5b8cd13 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -fisolate-erroneous-paths-attribute -fdump-tree-isolate-paths -fdump-tree-phicprop1" } */
+/* { dg-skip-if "" keeps_null_pointer_checks } */
 
 
 extern void foo(void *) __attribute__ ((__nonnull__ (1)));
index 4d01d5c6399420d53a2eda263ca55b4b2f2d7ad5..e6ae37a7f74b9e4a34c496cf342c42573dfc861d 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */ 
 /* { dg-options "-O2 -fdump-tree-isolate-paths -fdump-tree-optimized" } */
+/* { dg-skip-if "" keeps_null_pointer_checks } */
 
 struct demangle_component
 {