public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/24351]  New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325
@ 2005-10-13 12:05 rguenth at gcc dot gnu dot org
  2005-10-13 12:06 ` [Bug tree-optimization/24351] " rguenth at gcc dot gnu dot org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-13 12:05 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]

/usr/lib/gcc/i586-suse-linux/4.1.0/cc1plus -fpreprocessed test_bind.ii -quiet
-dumpbase test_bind.cc -march=i586 -mtune=i686 -auxbase-strip test_bind.o -O2
-Wall -version -fmessage-length=0 -o test_bind.s
test_bind.cc: In function ‘int main()’:
test_bind.cc:62: internal compiler error: Segmentation fault

#0  0x0869fd5b in do_simple_structure_copy (lhs=
      {type = SCALAR, var = 15, offset = 0}, rhs=
      {type = SCALAR, var = 13, offset = 0}, size=64)
    at tree-ssa-structalias.c:2325
#1  0x086a030d in do_structure_copy (lhsop=0x4027dbb8, rhsop=0x40287108)
    at tree-ssa-structalias.c:2495
#2  0x086a1fe8 in find_func_aliases (t=0x4028345c, ai=0x8988a08)
    at tree-ssa-structalias.c:2796
#3  0x086a4d3b in compute_points_to_sets (ai=0x8988a08)
    at tree-ssa-structalias.c:3639
#4  0x0829ba81 in compute_may_aliases () at tree-ssa-alias.c:263


-- 
           Summary: [4.1 Regression] ICE in do_simple_structure_copy at
                    tree-ssa-structalias.c:2325
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, alias
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
@ 2005-10-13 12:06 ` rguenth at gcc dot gnu dot org
  2005-10-13 13:47 ` pinskia at gcc dot gnu dot org
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-13 12:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2005-10-13 12:05 -------
Created an attachment (id=9982)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9982&action=view)
testcase

Reduced testcase from libsigc++2


-- 


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
  2005-10-13 12:06 ` [Bug tree-optimization/24351] " rguenth at gcc dot gnu dot org
@ 2005-10-13 13:47 ` pinskia at gcc dot gnu dot org
  2005-10-13 15:09 ` pinskia at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-13 13:47 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dberlin at gcc dot gnu dot
                   |                            |org
   Target Milestone|---                         |4.1.0


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
  2005-10-13 12:06 ` [Bug tree-optimization/24351] " rguenth at gcc dot gnu dot org
  2005-10-13 13:47 ` pinskia at gcc dot gnu dot org
@ 2005-10-13 15:09 ` pinskia at gcc dot gnu dot org
  2005-10-13 15:48 ` rguenth at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-13 15:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2005-10-13 15:09 -------
Confirmed, nice small testcase:
struct adaptor_base {
};
struct bound_argument {
  bound_argument();
};
template <class T_functor> struct adaptor_functor : public adaptor_base {
  explicit adaptor_functor(const T_functor& _A_functor) : functor_(_A_functor)
{
  }
  T_functor functor_;
  bound_argument bound_;
};
template <class T_functor> struct adapts : public adaptor_base {
  explicit adapts(const T_functor& _A_functor) : functor_(_A_functor) {
  }
  adaptor_functor<T_functor> functor_;
};
int main() {
  adapts<adapts<int> > a (adapts<int>(1));
}


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-10-13 15:09:23
               date|                            |


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-10-13 15:09 ` pinskia at gcc dot gnu dot org
@ 2005-10-13 15:48 ` rguenth at gcc dot gnu dot org
  2005-10-13 23:09 ` [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code pinskia at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-13 15:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2005-10-13 15:48 -------
*** Bug 23949 has been marked as a duplicate of this bug. ***


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marcus at jet dot franken
                   |                            |dot de


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-10-13 15:48 ` rguenth at gcc dot gnu dot org
@ 2005-10-13 23:09 ` pinskia at gcc dot gnu dot org
  2005-10-24 10:46 ` rguenth at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-13 23:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2005-10-13 23:09 -------
Here is a simplified testcase without templates, just in case you get confused
what the structs look in the source:
struct adaptor_base {};
struct bound_argument {
  bound_argument();
};
struct adaptor_functorint : public adaptor_base {};
struct adaptsint : public adaptor_base {
  adaptsint(const int& _A_functor);
  adaptor_functorint functor_;
};
struct adaptor_functor_adaptsint {
  adaptor_functor_adaptsint(const adaptsint& _A_functor) : functor_(_A_functor)
  {}
  adaptsint functor_;
  bound_argument bound_;
};
struct adapts_adaptsint {
  adapts_adaptsint(const adaptsint& _A_functor) : functor_(_A_functor)
  {}
  adaptor_functor_adaptsint functor_;
};
int main() {
  adapts_adaptsint a (adaptsint(1));
}


-- 


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-10-13 23:09 ` [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code pinskia at gcc dot gnu dot org
@ 2005-10-24 10:46 ` rguenth at gcc dot gnu dot org
  2005-10-24 11:01 ` rguenth at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-24 10:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2005-10-24 10:46 -------
We are trying to copy 16 bits of

$5 = {id = 8, name = 0x896d7d0 "D.1877", decl = 0x4019ae18, offset = 8, 
  size = 8, fullsize = 16, next = 0x0, node = 8, address_taken = 0, 
  indirect_target = 0, is_artificial_var = 0, is_special_var = 0, 
  is_unknown_size_var = 0, has_union = 0, is_heap_var = 0, 
  solution = 0x8999708, variables = 0x8999718, complex = 0x0}

to

$1 = {id = 6, name = 0x898aaf7 "a", decl = 0x4019a7e8, offset = 8, size = 8, 
  fullsize = 24, next = 0x899ca54, node = 6, address_taken = 1, 
  indirect_target = 0, is_artificial_var = 0, is_special_var = 0, 
  is_unknown_size_var = 0, has_union = 0, is_heap_var = 0, 
  solution = 0x89996c8, variables = 0x89996d8, complex = 0x0}
$2 = {id = 7, name = 0x896d7c4 "a.bound_", decl = 0x4019a7e8, offset = 16, 
  size = 8, fullsize = 24, next = 0x0, node = 7, address_taken = 1, 
  indirect_target = 0, is_artificial_var = 0, is_special_var = 0, 
  is_unknown_size_var = 0, has_union = 0, is_heap_var = 0, 
  solution = 0x89996e8, variables = 0x89996f8, complex = 0x0}

not counting the non-existant 8 bits padding(?)

static void
do_simple_structure_copy (const struct constraint_expr lhs,
                          const struct constraint_expr rhs,
                          const unsigned HOST_WIDE_INT size)
{
  varinfo_t p = get_varinfo (lhs.var);
  unsigned HOST_WIDE_INT pstart, last;
  pstart = p->offset;
  last = p->offset + size;
  for (; p && p->offset < last; p = p->next)


not adding p->offset to last would fix that.  Hmm, too obvious?


-- 


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-10-24 10:46 ` rguenth at gcc dot gnu dot org
@ 2005-10-24 11:01 ` rguenth at gcc dot gnu dot org
  2005-10-24 11:56 ` rguenth at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-24 11:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2005-10-24 11:01 -------
Also, while we have the same types for lhs and rhs in do_structure_copy, namely

(gdb) call debug_tree(lhstype)
 <record_type 0x40232c94 adaptsint sizes-gimplified needs-constructing type_1
type_5 HI
    size <integer_cst 0x4018d300 type <integer_type 0x4019f05c bit_size_type>
constant invariant 16>
    unit size <integer_cst 0x4018d318 type <integer_type 0x4019f000 unsigned
int> constant invariant 2>
    align 8 symtab 0 alias set -1
    fields <field_decl 0x40232f18 functor_
        type <record_type 0x40232bdc adaptor_functorint sizes-gimplified type_1
type_5 QI
            size <integer_cst 0x4018d1f8 constant invariant 8>
            unit size <integer_cst 0x4018d210 constant invariant 1>
            align 8 symtab 0 alias set -1 fields <type_decl 0x40212c30
adaptor_functorint>
            X() X(constX&) this=(X&) n_parents=1 use_template=0
interface-unknown
            pointer_to_this <pointer_type 0x402377e8> chain <type_decl
0x40212bc8 adaptor_functorint>>
        nonlocal decl_3 QI file /suse/rguenther/src/tests/pr24351.C line 8 size
<integer_cst 0x4018d1f8 8> unit size <integer_cst 0x4018d210 1>
        align 8 offset_align 128
        offset <integer_cst 0x4018d198 constant invariant 0> bit offset
<integer_cst 0x4018d1f8 8> context <record_type 0x40232c94 adaptsint>
        chain <type_decl 0x40212d68 adaptsint type <record_type 0x40232c94
adaptsint>
            nonlocal decl_4 VOID file /suse/rguenther/src/tests/pr24351.C line
6
            align 1 context <record_type 0x40232c94 adaptsint>
           >>
   needs-constructor X(constX&) this=(X&) n_parents=1 use_template=0
interface-unknown
    pointer_to_this <pointer_type 0x40232e60> chain <type_decl 0x40212d00
adaptsint>>

the full sizes from the variable infos for lhs/rhs do not match:

(gdb) print *get_varinfo(lhs.var)
$9 = {id = 6, name = 0x898aaf7 "a", decl = 0x4019a7e8, offset = 8, size = 8, 
  fullsize = 24, next = 0x899ca54, node = 6, address_taken = 1, 
  indirect_target = 0, is_artificial_var = 0, is_special_var = 0, 
  is_unknown_size_var = 0, has_union = 0, is_heap_var = 0, 
  solution = 0x89996c8, variables = 0x89996d8, complex = 0x0}
(gdb) print *get_varinfo(rhs.var)
$10 = {id = 8, name = 0x896d7d0 "D.1877", decl = 0x4019ae18, offset = 8, 
  size = 8, fullsize = 16, next = 0x0, node = 8, address_taken = 0, 
  indirect_target = 0, is_artificial_var = 0, is_special_var = 0, 
  is_unknown_size_var = 0, has_union = 0, is_heap_var = 0, 
  solution = 0x8999708, variables = 0x8999718, complex = 0x0}


This is during the assignment of

(gdb) call debug_generic_expr(t)
#   SFT.2D.1881_20 = V_MAY_DEF <SFT.2D.1881_17>;
#   VUSE <SFT.0D.1879_8>;
aD.1849.functor_D.1824.functor_D.1764 = D.1877

i.e. during the second may-alias pass.

So another workaround may be in do_structure_copy:


      /* The size only really matters insofar as we don't set more or less of
         the variable.  If we hit an unknown size var, the size should be the
         whole darn thing.  */
      if (get_varinfo (rhs.var)->is_unknown_size_var)
        rhssize = ~0;
      else
        rhssize = get_varinfo (rhs.var)->fullsize; /*TREE_INT_CST_LOW
(rhstypesize);*/

      if (get_varinfo (lhs.var)->is_unknown_size_var)
        lhssize = ~0;
      else
        lhssize = get_varinfo (lhs.var)->fullsize; /*TREE_INT_CST_LOW
(lhstypesize);*/


Oh well.


-- 


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-10-24 11:01 ` rguenth at gcc dot gnu dot org
@ 2005-10-24 11:56 ` rguenth at gcc dot gnu dot org
  2005-10-24 12:55 ` dberlin at dberlin dot org
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-24 11:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2005-10-24 11:55 -------
All of the fixes are wrong.  The only safe thing papering over the problem is
disallowing this case with

Index: tree-ssa-structalias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-structalias.c,v
retrieving revision 2.32
diff -c -3 -p -r2.32 tree-ssa-structalias.c
*** tree-ssa-structalias.c      6 Oct 2005 21:36:52 -0000       2.32
--- tree-ssa-structalias.c      24 Oct 2005 11:54:56 -0000
*************** check_for_overlaps (VEC (fieldoff_s,heap
*** 3033,3038 ****
--- 3033,3041 ----

    for (i = 0; VEC_iterate (fieldoff_s, fieldstack, i, fo); i++)
      {
+       if (lastoffset == -1
+         && fo->offset != 0)
+       return true;
        if (fo->offset == lastoffset)
        return true;
        lastoffset = fo->offset;


-- 


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-10-24 11:56 ` rguenth at gcc dot gnu dot org
@ 2005-10-24 12:55 ` dberlin at dberlin dot org
  2005-10-24 14:09 ` rguenth at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: dberlin at dberlin dot org @ 2005-10-24 12:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dberlin at gcc dot gnu dot org  2005-10-24 12:55 -------
Subject: Re:  [4.1 Regression] ICE in
        do_simple_structure_copy with some C++ code

On Mon, 2005-10-24 at 11:55 +0000, rguenth at gcc dot gnu dot org wrote:
> 
> ------- Comment #7 from rguenth at gcc dot gnu dot org  2005-10-24 11:55 -------
> All of the fixes are wrong.  The only safe thing papering over the problem is
> disallowing this case with

If you look, you'll note that while the assignments have the same type,
one is embedded in a structure and the other isn't.

If you stare at that structure it is embedded in, you'll discover the
empty base for one of the classes seems to appear twice, which is where
we get the fullsize of 16.

Thus, we end up with an extra "field" on one side of the assignment.

We reasonably expect that an assignment between two of the same types
will have the same fields on both sides.

This is really another effect of the problem in 24288, AFAICT.  The
empty base for struct adaptor_base appears twice in one of the
structures, even though it's "not really there" twice.


-- 


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2005-10-24 12:55 ` dberlin at dberlin dot org
@ 2005-10-24 14:09 ` rguenth at gcc dot gnu dot org
  2005-10-31  6:16 ` mmitchel at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-24 14:09 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2005-10-24 14:09 ` rguenth at gcc dot gnu dot org
@ 2005-10-31  6:16 ` mmitchel at gcc dot gnu dot org
  2005-10-31 13:54 ` dberlin at dberlin dot org
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-31  6:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from mmitchel at gcc dot gnu dot org  2005-10-31 06:16 -------
Danny, when you refer to PR 24288, do you mean a different PR?  I don't see the
relevance of PR 24288, but I do remember discussing this issue with you and
Jason.

Anyhow, for the time being, I think it's fair to punish the C++ front-end by
disabling this optimization logic there.  The type information we're giving you
really isn't right.


-- 


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2005-10-31  6:16 ` mmitchel at gcc dot gnu dot org
@ 2005-10-31 13:54 ` dberlin at dberlin dot org
  2005-10-31 19:17 ` rguenth at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: dberlin at dberlin dot org @ 2005-10-31 13:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from dberlin at gcc dot gnu dot org  2005-10-31 13:53 -------
Subject: Re:  [4.1 Regression] ICE in
        do_simple_structure_copy with some C++ code

On Mon, 2005-10-31 at 06:16 +0000, mmitchel at gcc dot gnu dot org
wrote:
> 
> ------- Comment #9 from mmitchel at gcc dot gnu dot org  2005-10-31 06:16 -------
> Danny, when you refer to PR 24288, do you mean a different PR?  I don't see the
> relevance of PR 24288, but I do remember discussing this issue with you and
> Jason.

I was actually wrong.  This one is due to empty base differences.
The structure on the LHS gets an extra empty base, and it places it in
the padding of one of the types so that we think the LHS and RHS have a
different number of fields, but in actuality they differ only in empty
bases.  We expect that types on the LHS and RHS of a simple structure
assignment have exactly the same number of fields.

I have a patch for this (which is uglier than i'd like, but c'est la
vie)


> 
> 


-- 


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2005-10-31 13:54 ` dberlin at dberlin dot org
@ 2005-10-31 19:17 ` rguenth at gcc dot gnu dot org
  2005-10-31 19:31 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-31 19:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rguenth at gcc dot gnu dot org  2005-10-31 19:17 -------
And that patch doesn't fix the testcase which is attached.


-- 


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2005-10-31 19:17 ` rguenth at gcc dot gnu dot org
@ 2005-10-31 19:31 ` rguenth at gcc dot gnu dot org
  2005-10-31 19:34 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-31 19:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from rguenth at gcc dot gnu dot org  2005-10-31 19:31 -------
Oh, and this really is a blocker.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2005-10-31 19:31 ` rguenth at gcc dot gnu dot org
@ 2005-10-31 19:34 ` rguenth at gcc dot gnu dot org
  2005-10-31 19:56 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-31 19:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from rguenth at gcc dot gnu dot org  2005-10-31 19:34 -------
Seems it's not my call.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2005-10-31 19:34 ` rguenth at gcc dot gnu dot org
@ 2005-10-31 19:56 ` rguenth at gcc dot gnu dot org
  2005-11-02  2:04 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-31 19:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from rguenth at gcc dot gnu dot org  2005-10-31 19:56 -------
Mark, this looks more like a P1 issue.  It makes all packages that use
libsigc++ (part of the gtk--) fail to compile.  It is related to 24288 but the
patch there doesn't fix this issue.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mmitchel at gcc dot gnu dot
                   |                            |org


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (15 preceding siblings ...)
  2005-10-31 19:56 ` rguenth at gcc dot gnu dot org
@ 2005-11-02  2:04 ` mmitchel at gcc dot gnu dot org
  2005-11-02  2:30 ` dberlin at dberlin dot org
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-02  2:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from mmitchel at gcc dot gnu dot org  2005-11-02 02:04 -------
Showstopper: we're falling over on popular packages on a primary architecture.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (16 preceding siblings ...)
  2005-11-02  2:04 ` mmitchel at gcc dot gnu dot org
@ 2005-11-02  2:30 ` dberlin at dberlin dot org
  2005-11-02  2:33 ` dberlin at dberlin dot org
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: dberlin at dberlin dot org @ 2005-11-02  2:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from dberlin at gcc dot gnu dot org  2005-11-02 02:30 -------
Subject: Re:  [4.1 Regression] ICE in
        do_simple_structure_copy with some C++ code

On Wed, 2005-11-02 at 02:04 +0000, mmitchel at gcc dot gnu dot org
wrote:
> 
> ------- Comment #15 from mmitchel at gcc dot gnu dot org  2005-11-02 02:04 -------
> Showstopper: we're falling over on popular packages on a primary architecture.
> 


-- 


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (17 preceding siblings ...)
  2005-11-02  2:30 ` dberlin at dberlin dot org
@ 2005-11-02  2:33 ` dberlin at dberlin dot org
  2005-11-03 15:39 ` dberlin at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: dberlin at dberlin dot org @ 2005-11-02  2:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from dberlin at gcc dot gnu dot org  2005-11-02 02:32 -------
Subject: Re:  [4.1 Regression] ICE in
        do_simple_structure_copy with some C++ code

On Tue, 2005-11-01 at 21:29 -0500, Daniel Berlin wrote:
> On Wed, 2005-11-02 at 02:04 +0000, mmitchel at gcc dot gnu dot org
> wrote:
> > 
> > ------- Comment #15 from mmitchel at gcc dot gnu dot org  2005-11-02 02:04 -------
> > Showstopper: we're falling over on popular packages on a primary architecture.
> > 
> 

Just as a status update, their is currently a patch in the hands of
Richard Guenther for testing on distro builds.

It fixes all the testcases (attached and reduced)


-- 


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (18 preceding siblings ...)
  2005-11-02  2:33 ` dberlin at dberlin dot org
@ 2005-11-03 15:39 ` dberlin at gcc dot gnu dot org
  2005-11-03 15:42 ` dberlin at gcc dot gnu dot org
  2005-11-03 15:44 ` dberlin at gcc dot gnu dot org
  21 siblings, 0 replies; 23+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2005-11-03 15:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from dberlin at gcc dot gnu dot org  2005-11-03 15:39 -------
Subject: Bug 24351

Author: dberlin
Date: Thu Nov  3 15:39:48 2005
New Revision: 106437

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106437
Log:
2005-11-03  Daniel Berlin  <dberlin@dberlin.org>

        Fix PR tree-optimization/24351

        * tree-ssa-structalias.c (struct variable_info): Add
        collapsed_into.
        (get_varinfo_fc): New function to follow collapsing.
        (new_var_info): Set collapsed_to to NULL.
        (dump_constraint): Follow collapsing.
        (build_constraint_graph): Handle collapsing.
        (do_simple_structure_copy): Return false if something bad
        happened.
        (collapse_rest_of_var): New function.
        (do_structure_copy): Collapse if do_simple_structure_copy returns
        false.


Added:
    trunk/gcc/testsuite/g++.dg/tree-ssa/pr24351-1.C
    trunk/gcc/testsuite/g++.dg/tree-ssa/pr24351-2.C
    trunk/gcc/testsuite/g++.dg/tree-ssa/pr24351-3.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-structalias.c


-- 


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (19 preceding siblings ...)
  2005-11-03 15:39 ` dberlin at gcc dot gnu dot org
@ 2005-11-03 15:42 ` dberlin at gcc dot gnu dot org
  2005-11-03 15:44 ` dberlin at gcc dot gnu dot org
  21 siblings, 0 replies; 23+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2005-11-03 15:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from dberlin at gcc dot gnu dot org  2005-11-03 15:42 -------
Fixed


-- 


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code
  2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
                   ` (20 preceding siblings ...)
  2005-11-03 15:42 ` dberlin at gcc dot gnu dot org
@ 2005-11-03 15:44 ` dberlin at gcc dot gnu dot org
  21 siblings, 0 replies; 23+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2005-11-03 15:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from dberlin at gcc dot gnu dot org  2005-11-03 15:44 -------
Fixed


-- 

dberlin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2005-11-03 15:44 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-13 12:05 [Bug tree-optimization/24351] New: [4.1 Regression] ICE in do_simple_structure_copy at tree-ssa-structalias.c:2325 rguenth at gcc dot gnu dot org
2005-10-13 12:06 ` [Bug tree-optimization/24351] " rguenth at gcc dot gnu dot org
2005-10-13 13:47 ` pinskia at gcc dot gnu dot org
2005-10-13 15:09 ` pinskia at gcc dot gnu dot org
2005-10-13 15:48 ` rguenth at gcc dot gnu dot org
2005-10-13 23:09 ` [Bug tree-optimization/24351] [4.1 Regression] ICE in do_simple_structure_copy with some C++ code pinskia at gcc dot gnu dot org
2005-10-24 10:46 ` rguenth at gcc dot gnu dot org
2005-10-24 11:01 ` rguenth at gcc dot gnu dot org
2005-10-24 11:56 ` rguenth at gcc dot gnu dot org
2005-10-24 12:55 ` dberlin at dberlin dot org
2005-10-24 14:09 ` rguenth at gcc dot gnu dot org
2005-10-31  6:16 ` mmitchel at gcc dot gnu dot org
2005-10-31 13:54 ` dberlin at dberlin dot org
2005-10-31 19:17 ` rguenth at gcc dot gnu dot org
2005-10-31 19:31 ` rguenth at gcc dot gnu dot org
2005-10-31 19:34 ` rguenth at gcc dot gnu dot org
2005-10-31 19:56 ` rguenth at gcc dot gnu dot org
2005-11-02  2:04 ` mmitchel at gcc dot gnu dot org
2005-11-02  2:30 ` dberlin at dberlin dot org
2005-11-02  2:33 ` dberlin at dberlin dot org
2005-11-03 15:39 ` dberlin at gcc dot gnu dot org
2005-11-03 15:42 ` dberlin at gcc dot gnu dot org
2005-11-03 15:44 ` dberlin at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).