[Bug tree-optimization/40582] [4.5 Regression] ice for non-trivial conversion at assignment with -O2

2009-06-30 Thread jamborm at gcc dot gnu dot org


--- Comment #8 from jamborm at gcc dot gnu dot org  2009-06-30 11:39 ---
As you may have noticed, I changed the testcase a little bit so that
it ICEs as my i386 desktop too.  A freshly checked out trunk no longer
does.   So I believe this is indeed fixed.


-- 

jamborm at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/40582] [4.5 Regression] ice for non-trivial conversion at assignment with -O2

2009-06-30 Thread hjl at gcc dot gnu dot org


--- Comment #9 from hjl at gcc dot gnu dot org  2009-06-30 13:56 ---
Subject: Bug 40582

Author: hjl
Date: Tue Jun 30 13:55:43 2009
New Revision: 149097

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=149097
Log:
2009-06-30  H.J. Lu  hongjiu...@intel.com

Backport from mainline:
2009-06-30  Martin Jambor  mjam...@suse.cz

PR tree-optimization/40582
* gcc.c-torture/compile/pr40582.c: New test.

2009-06-29  Jason Merrill  ja...@redhat.com

PR c++/40274
* g++.dg/template/debug1.C: New.

2009-06-25  Martin Jambor  mjam...@suse.cz

PR tree-optimization/40493
* gcc.c-torture/execute/pr40493.c: New test.

Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/debug1.C
  - copied unchanged from r149095,
trunk/gcc/testsuite/g++.dg/template/debug1.C
branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr40582.c
  - copied unchanged from r149095,
trunk/gcc/testsuite/gcc.c-torture/compile/pr40582.c
branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/execute/pr40493.c
  - copied unchanged from r149096,
trunk/gcc/testsuite/gcc.c-torture/execute/pr40493.c
Modified:
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug tree-optimization/40582] [4.5 Regression] ice for non-trivial conversion at assignment with -O2

2009-06-29 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2009-06-29 11:10 ---
Confirmed.  -fno-tree-sra fixes this.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||mjambor at suse dot cz
 Status|UNCONFIRMED |NEW
  Component|c   |tree-optimization
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-06-29 11:10:17
   date||
Summary|ice for non-trivial |[4.5 Regression] ice for
   |conversion at assignment|non-trivial conversion at
   |with -O2|assignment with -O2
   Target Milestone|--- |4.5.0


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



[Bug tree-optimization/40582] [4.5 Regression] ice for non-trivial conversion at assignment with -O2

2009-06-29 Thread jamborm at gcc dot gnu dot org


--- Comment #3 from jamborm at gcc dot gnu dot org  2009-06-29 11:16 ---
OK, I'll have a look at it after I am done with PR 40554.


-- 

jamborm at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jamborm at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2009-06-29 11:10:17 |2009-06-29 11:16:14
   date||


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



[Bug tree-optimization/40582] [4.5 Regression] ice for non-trivial conversion at assignment with -O2

2009-06-29 Thread reichelt at gcc dot gnu dot org


--- Comment #4 from reichelt at gcc dot gnu dot org  2009-06-29 12:04 
---
Reduced tescase (crashes with -O):

=
struct A
{
  void* q;
  int i;
};

union U
{
  char* p;
  struct A a;
};

struct A foo(union U u)
{
  struct A a = { 0, 0 };
  a = u.a;
  return a;
}
=


-- 

reichelt at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||reichelt at gcc dot gnu dot
   ||org


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



[Bug tree-optimization/40582] [4.5 Regression] ice for non-trivial conversion at assignment with -O2

2009-06-29 Thread jamborm at gcc dot gnu dot org


--- Comment #5 from jamborm at gcc dot gnu dot org  2009-06-29 17:11 ---
Created an attachment (id=18094)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18094action=view)
Fix

It turns  out that build_ref_for_offset apparently needs  to check for
full type compatibility and  node just for useless_conversions.  It is
used  more generally but  also in  much stricter  same-type conditions
than I have originally intended to.

I will test this fix (alongside with another one) overnight and submit
it tomorrow if everything goes fine.


-- 


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