diff mbox

Fix LTO kernel build ICE

Message ID alpine.LNX.2.00.1306191014260.22313@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener June 19, 2013, 8:15 a.m. UTC
As reported by Andi the following trivial fix fixes the ICE.

Committed as obvious.

Richard.

2013-06-19  Richard Biener  <rguenther@suse.de>

	* expr.c (expand_expr_real_1): Use SCOPE_FILE_SCOPE_P to check
	for global context.
diff mbox

Patch

Index: gcc/expr.c
===================================================================
--- gcc/expr.c	(revision 200189)
+++ gcc/expr.c	(working copy)
@@ -9353,7 +9353,7 @@  expand_expr_real_1 (tree exp, rtx target
       /* Variables inherited from containing functions should have
 	 been lowered by this point.  */
       context = decl_function_context (exp);
-      gcc_assert (!context
+      gcc_assert (SCOPE_FILE_SCOPE_P (context)
 		  || context == current_function_decl
 		  || TREE_STATIC (exp)
 		  || DECL_EXTERNAL (exp)