Fix LTO kernel build ICE

Submitted by Richard Guenther on June 19, 2013, 8:15 a.m.

Details

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

Commit Message

Richard Guenther June 19, 2013, 8:15 a.m.
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.

Patch hide | download patch | download mbox

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)