From 1dc8c799c1c482350660699dff557a4b24b09a8a Mon Sep 17 00:00:00 2001
From: Stefan Behnel <stefan_ml@behnel.de>
Date: Thu, 2 Jan 2014 22:13:22 +0100
Subject: [PATCH] remove some useless temping (not sure if it's needed at all,
 but lacks tests)

---
 Cython/Compiler/Nodes.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py
index f54095ca4..5173d333c 100644
--- a/Cython/Compiler/Nodes.py
+++ b/Cython/Compiler/Nodes.py
@@ -4640,7 +4640,7 @@ class SingleAssignmentNode(AssignmentNode):
             dtype = self.lhs.type
 
         self.rhs = self.rhs.coerce_to(dtype, env)
-        if use_temp or self.rhs.is_attribute:
+        if use_temp or (self.rhs.is_attribute and not self.lhs.is_name):
             # (cdef) attribute access is not safe as it traverses pointers
             self.rhs = self.rhs.coerce_to_temp(env)
         elif self.rhs.type.is_pyobject:
-- 
2.30.9