expr.c (expand_expr_real_1): Use SCOPE_FILE_SCOPE_P to check for global context.
authorRichard Biener <rguenther@suse.de>
Wed, 19 Jun 2013 08:15:31 +0000 (08:15 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 19 Jun 2013 08:15:31 +0000 (08:15 +0000)
2013-06-19  Richard Biener  <rguenther@suse.de>

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

From-SVN: r200190

gcc/ChangeLog
gcc/expr.c

index 9fc3562..c12d842 100644 (file)
@@ -1,3 +1,8 @@
+2013-06-19  Richard Biener  <rguenther@suse.de>
+
+       * expr.c (expand_expr_real_1): Use SCOPE_FILE_SCOPE_P to check
+       for global context.
+
 2013-06-19  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
 
        Revert:
index c68f489..2a7824b 100644 (file)
@@ -9353,7 +9353,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
       /* 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)