Patchwork Fix LTO kernel build ICE

login
register
mail settings
Submitter Richard Guenther
Date June 19, 2013, 8:15 a.m.
Message ID <alpine.LNX.2.00.1306191014260.22313@zhemvz.fhfr.qr>
Download mbox | patch
Permalink /patch/252516/
State New
Headers show

Comments

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

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)