avr.c (avr_set_current_function): Check cfun->machine to be non-NULL.
authorGeorg-Johann Lay <avr@gjlay.de>
Tue, 25 Sep 2012 16:17:02 +0000 (16:17 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Tue, 25 Sep 2012 16:17:02 +0000 (16:17 +0000)
* config/avr/avr.c (avr_set_current_function): Check cfun->machine
to be non-NULL.

From-SVN: r191715

gcc/ChangeLog
gcc/config/avr/avr.c

index d453b8a5ab89a2d5c6a46a46424d5552219acd0a..174828378b08359b94c4fb5817fff3512a49231a 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-25  Georg-Johann Lay  <avr@gjlay.de>
+
+       * config/avr/avr.c (avr_set_current_function): Check cfun->machine
+       to be non-NULL.
+
 2012-09-25  Georg-Johann Lay  <avr@gjlay.de>
 
        PR target/54641
index 78fb3127fd86bf27c5aa5798be9b5cf9a9b0d43f..f23a7e80283173a82aa9e9d8acea42500d0cbfa9 100644 (file)
@@ -550,6 +550,7 @@ avr_set_current_function (tree decl)
   if (decl == NULL_TREE
       || current_function_decl == NULL_TREE
       || current_function_decl == error_mark_node
+      || ! cfun->machine
       || cfun->machine->attributes_checked_p)
     return;