aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-05-03 13:20:48 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-05-03 09:20:48 -0400
commit32919a0dd2047067e8586102a3a248ad9fb270e9 (patch)
tree879c3daef7db43b2e7148d743dbf149b4b800c6b /gcc/expr.c
parentd9a7d592ed00c2fa2f5973231fed2d729c71faf0 (diff)
downloadgcc-32919a0dd2047067e8586102a3a248ad9fb270e9.zip
gcc-32919a0dd2047067e8586102a3a248ad9fb270e9.tar.gz
gcc-32919a0dd2047067e8586102a3a248ad9fb270e9.tar.bz2
expr.c (expand_expr, [...]): Don't check for checking memory usage if not in a function.
* expr.c (expand_expr, case COMPONENT_REF): Don't check for checking memory usage if not in a function. * varasm.c (initializer_constant_valid_p, case ADDR_EXPR): Only return address if static. From-SVN: r33629
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index bc1bbf4..ce4ecc7 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6734,7 +6734,8 @@ expand_expr (exp, target, tmode, modifier)
}
/* Check the access. */
- if (current_function_check_memory_usage && GET_CODE (op0) == MEM)
+ if (cfun != 0 && current_function_check_memory_usage
+ && GET_CODE (op0) == MEM)
{
enum memory_use_mode memory_usage;
memory_usage = get_memory_usage_from_modifier (modifier);