This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/21433] New: The COMPONENT_REF case of expand_expr_real_1 is probably wrong
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 May 2005 03:31:01 -0000
- Subject: [Bug middle-end/21433] New: The COMPONENT_REF case of expand_expr_real_1 is probably wrong
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
We have the following coverage for the COMPONENT_REF case.
-: 6997: case COMPONENT_REF:
-: 6998: /* If the operand is a CONSTRUCTOR, we can just extract the
-: 6999: appropriate field if it is present. */
75549: 7000: if (TREE_CODE (TREE_OPERAND (exp, 0)) == CONSTRUCTOR)
-: 7001: {
-: 7002: tree elt;
-: 7003:
#####: 7004: for (elt = CONSTRUCTOR_ELTS (TREE_OPERAND (exp, 0)); elt;
#####: 7005: elt = TREE_CHAIN (elt))
I don't think we should expect a CONSTRUCTOR as the first operand
of EXP. If TREE_OPERAND (exp, 0) is VAR_DECL, then we can expect
CONSTRUCTOR in DECL_INITIAL (TREE_OPERAND (exp, 0)).
--
Summary: The COMPONENT_REF case of expand_expr_real_1 is probably
wrong
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21433