This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Aug 2004 13:37:20 -0000
- Subject: [Bug tree-optimization/17016] New: [lno] ICE with struct passed as reference
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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