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 optimization/13681] New: [tree-ssa] ICE in get_expr_operands with out-of-bounds access


Seems like tree-ssa is getting too good at optimizing :-) 
 
Here's an out-of-bounds access that ICEs tree-ssa: 
---------------------------- 
struct X { 
    double values[1]; 
 
    double & foo (const unsigned int index) 
      { return values[index]; } 
}; 
 
void foo() { 
  double d; 
  X h1; 
  h1.foo(1) = d; 
} 
------------------------- 
Note that if I call h1.foo(0), then everything is fine, since we 
stay inside the bounds of the values array. However, with the code 
as shown, we get 
 
deal.II/base> c++ -c -O2 x.cc 
x.cc: In function `void foo()': 
x.cc:8: internal compiler error: in get_expr_operands, at 
tree-ssa-operands.c:918 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
This is with yesterday's tree-ssa branch. I hope it will be reasonable 
simple to fix, since this is the last ICE I presently get with tree-ssa, 
and if it is fixed I'll switch on a nightly tester for tree-ssa that 
compiles our library. I can then also finally try to run the generated 
code and find all those code-gen bugs :-) 
 
Thanks 
  W.

-- 
           Summary: [tree-ssa] ICE in get_expr_operands with out-of-bounds
                    access
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: critical
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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