From: Richard Kenner Date: Sun, 5 Jan 1997 03:21:27 +0000 (-0500) Subject: (staticp, case COMPONENT_REF, BIT_FIELD_REF): Not static if bitfield. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f7fa6ef9c7e369c662149c43e18a63eee4dd63cb;p=gcc.git (staticp, case COMPONENT_REF, BIT_FIELD_REF): Not static if bitfield. From-SVN: r13376 --- diff --git a/gcc/tree.c b/gcc/tree.c index c54cf6ec6f3..f8b1a6ecd26 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -2174,9 +2174,14 @@ staticp (arg) case STRING_CST: return 1; + /* If we are referencing a bitfield, we can't evaluate an + ADDR_EXPR at compile time and so it isn't a constant. */ case COMPONENT_REF: + return (! DECL_BIT_FIELD (TREE_OPERAND (arg, 1)) + && staticp (TREE_OPERAND (arg, 0))); + case BIT_FIELD_REF: - return staticp (TREE_OPERAND (arg, 0)); + return 0; #if 0 /* This case is technically correct, but results in setting