2014-04-24 Vishnu K S <Vishnu.k_s@atmel.com>
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Apr 2014 22:05:07 +0000 (22:05 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 24 Apr 2014 22:05:07 +0000 (22:05 +0000)
* 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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209767 138bc75d-0d04-0410-961f-82ee72b054a4

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 f2fce0d..cac9f8d 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 99644ec..d4aa738 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 5813e5e..cb863cb 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 f1f3101..3ed98ae 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 bfcaa2b..912d98e 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 7dddd80..9c2c5d5 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 c9c074d..d50a2b2 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 4d01d5c..e6ae37a 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
 {