Commit f7fa6ef9 by Richard Kenner

(staticp, case COMPONENT_REF, BIT_FIELD_REF): Not static if bitfield.

From-SVN: r13376
parent 0d15e60c
...@@ -2174,9 +2174,14 @@ staticp (arg) ...@@ -2174,9 +2174,14 @@ staticp (arg)
case STRING_CST: case STRING_CST:
return 1; 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: case COMPONENT_REF:
return (! DECL_BIT_FIELD (TREE_OPERAND (arg, 1))
&& staticp (TREE_OPERAND (arg, 0)));
case BIT_FIELD_REF: case BIT_FIELD_REF:
return staticp (TREE_OPERAND (arg, 0)); return 0;
#if 0 #if 0
/* This case is technically correct, but results in setting /* This case is technically correct, but results in setting
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment