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 tree-optimization/17016] New: [lno] ICE with struct passed as reference


Compiling the following valid code snippet with "g++ -O" on the lno-branch
I get an ICE.

=================================
struct A
{
    int i[2];
};

void foo(A& a)
{
    for (int j=0; j<2; ++j)
        a.i[j]=0;
}
=================================

bug.cc: In function `void foo(A&)':
bug.cc:7: internal compiler error: tree check: expected integer_type or
enumeral_type or boolean_type or char_type or real_type, have reference_type in
number_of_iterations_cond, at tree-ssa-loop-niter.c:161
Please submit a full bug report, [etc.]

The ICE goes away if I pass the struct via a pointer.

-- 
           Summary: [lno] ICE with struct passed as reference
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, monitored
          Severity: critical
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17016


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