//
// C testcase, compile with -O1

struct D
{
  int n;
  int c [8];
};

struct A
{
  int i;
  char *p;
};

struct B
{
  struct A *a;
  struct D *d;
};

int dtInsert1 (struct B *b)
{
  struct A a = { 0, 0 };
  struct D *d;

  b->a = &a;
  d = b->d;
  &d->c [d->n];
  return 0;
}

//

vi.i: In function ‘dtInsert1’:
vi.i:20: internal compiler error: in first_vi_for_offset, at
tree-ssa-structalias.c:2843

Backtrace:

Starting program: /home/ssb/src/build/gcc/cc1 -quiet
/home/ssb/src/bugs/pending/vi.i -O

Breakpoint 1, fancy_abort (
    file=0xc31230 "../../gcc41/gcc/tree-ssa-structalias.c", line=2843, 
    function=0xdf1c30 "first_vi_for_offset")
    at ../../gcc41/gcc/diagnostic.c:590
590       internal_error ("in %s, at %s:%d", function, trim_filename (file), 
line);
(gdb) bt
#0  fancy_abort (file=0xc31230 "../../gcc41/gcc/tree-ssa-structalias.c", 
    line=2843, function=0xdf1c30 "first_vi_for_offset")
    at ../../gcc41/gcc/diagnostic.c:590
#1  0x00000000009ded2f in first_vi_for_offset (start=0xed4320, offset=32)
    at ../../gcc41/gcc/tree-ssa-structalias.c:2843
#2  0x00000000009d5bfa in solution_set_add (set=0xed5100, offset=32)
    at ../../gcc41/gcc/tree-ssa-structalias.c:601
#3  0x00000000009d5fae in set_union_with_increment (to=0xed2ba0, 
    from=0xed2b60, inc=32) at ../../gcc41/gcc/tree-ssa-structalias.c:630
#4  0x00000000009da177 in solve_graph (graph=0xe9cda0)
    at ../../gcc41/gcc/tree-ssa-structalias.c:1716
#5  0x00000000009e153e in compute_points_to_sets (ai=0xebb2d0)
    at ../../gcc41/gcc/tree-ssa-structalias.c:3535
#6  0x000000000052f36d in compute_may_aliases ()
    at ../../gcc41/gcc/tree-ssa-alias.c:260
#7  0x00000000009b1bdc in execute_one_pass (pass=0xdde1c0)
    at ../../gcc41/gcc/passes.c:774

-- 
           Summary: ICE in first_vi_for_offset, at tree-ssa-
                    structalias.c:2843
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belyshev at depni dot sinp dot msu dot ru
                CC: dberlin at gcc dot gnu dot org,gcc-bugs at gcc dot gnu
                    dot org
GCC target triplet: x86_64-unknown-linux-gnu


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

Reply via email to