This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/21433] New: The COMPONENT_REF case of expand_expr_real_1 is probably wrong


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]