* config/avr/avr.c (avr_set_current_function): Check cfun->machine
authorgjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Sep 2012 16:17:02 +0000 (16:17 +0000)
committergjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Sep 2012 16:17:02 +0000 (16:17 +0000)
to be non-NULL.

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

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

index d453b8a..1748283 100644 (file)
@@ -1,5 +1,10 @@
 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
        * config/avr/t-avr: Use ALL_COMPILERFLAGS instead of ALL_CFLAGS
        for sources compiled with COMPILER.
index 78fb312..f23a7e8 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;