[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2012-03-13 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38747

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|4.4.7   |4.5.0

--- Comment #11 from Jakub Jelinek  2012-03-13 
13:04:27 UTC ---
Fixed in 4.5+, 4.4 is no longer supported.


[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2011-04-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38747

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|4.4.6   |4.4.7


[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2010-10-01 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38747

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|4.4.5   |4.4.6


[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2010-04-30 Thread jakub at gcc dot gnu dot org


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|4.4.4   |4.4.5


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2010-01-21 Thread jakub at gcc dot gnu dot org


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|4.4.3   |4.4.4


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2009-10-15 Thread jakub at gcc dot gnu dot org


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|4.4.2   |4.4.3


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2009-09-24 Thread rguenth at gcc dot gnu dot org


--- Comment #10 from rguenth at gcc dot gnu dot org  2009-09-24 13:48 
---
Fixed on trunk.  Trunk doesn't necessarily handle testcases like this correctly
anyway, so I am not considering in backporting the change ATM.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|rguenth at gcc dot gnu dot  |unassigned at gcc dot gnu
   |org |dot org
 Status|ASSIGNED|NEW
  Known to work|4.3.2   |4.3.2 4.5.0
Summary|[4.4/4.5 Regression] Wrong  |[4.4 Regression] Wrong code
   |code due to |due to VIEW_CONVERT_EXPR
   |VIEW_CONVERT_EXPR   |
   Target Milestone|4.4.0   |4.4.2


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2009-05-20 Thread rguenth at gcc dot gnu dot org


--- Comment #8 from rguenth at gcc dot gnu dot org  2009-05-20 15:26 ---
Mine.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|pinskia at gcc dot gnu dot  |rguenth at gcc dot gnu dot
   |org |org
 Status|REOPENED|ASSIGNED


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2009-05-20 Thread rguenth at gcc dot gnu dot org


--- Comment #7 from rguenth at gcc dot gnu dot org  2009-05-20 15:26 ---
On a second thought this transformation is even wrong for non-indirect
references.

extern "C" void abort (void);
inline void *operator new (__SIZE_TYPE__, void *__p) throw () { return __p; }

int __attribute__((noinline))
foo(void)
{
  float f = 0;
  int *i = new (&f) int (1);
  return *(int *)&f;
}

int main()
{
  if (foo() != 1)
abort ();
  return 0;
}

it is wrong to turn the float read into an int read converted via a
VIEW_CONVERT_EXPR.

I will remove all this VIEW_CONVERT_EXPR generation again.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

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


--- Comment #6 from hjl at gcc dot gnu dot org  2009-01-30 17:32 ---
Subject: Bug 38747

Author: hjl
Date: Fri Jan 30 17:31:24 2009
New Revision: 143798

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143798
Log:
2009-01-30  H.J. Lu  

2009-01-27  Richard Guenther  

PR tree-optimization/38503
* g++.dg/warn/Wstrict-aliasing-bogus-placement-new.C: New testcase.

2009-01-26  Richard Guenther  

PR tree-optimization/38745
* g++.dg/torture/pr38745.C: New testcase.

2009-01-26  Richard Guenther  

PR middle-end/38851
* g++.dg/warn/Wuninitialized-1.C: New testcase.

2009-01-20  Andrew Pinski  
Richard Guenther  

PR tree-optimization/38747
PR tree-optimization/38748
* gcc.dg/tree-ssa/struct-aliasing-1.c: New test.
* gcc.c-torture/execute/struct-aliasing-1.c: Likewise.

Added:
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/torture/pr38745.C
  - copied unchanged from r143797,
trunk/gcc/testsuite/g++.dg/torture/pr38745.C
   
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-placement-new.C
  - copied unchanged from r143797,
trunk/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-placement-new.C
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/warn/Wuninitialized-1.C
  - copied unchanged from r143797,
trunk/gcc/testsuite/g++.dg/warn/Wuninitialized-1.C
   
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/execute/struct-aliasing-1.c
  - copied unchanged from r143797,
trunk/gcc/testsuite/gcc.c-torture/execute/struct-aliasing-1.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/tree-ssa/struct-aliasing-1.c
  - copied unchanged from r143797,
trunk/gcc/testsuite/gcc.dg/tree-ssa/struct-aliasing-1.c
Modified:
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2009-01-20 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2009-01-20 17:10 ---
Subject: Bug 38747

Author: rguenth
Date: Tue Jan 20 17:10:40 2009
New Revision: 143523

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143523
Log:
2009-01-20  Andrew Pinski  
Richard Guenther  

PR tree-optimization/38747
PR tree-optimization/38748
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Disable the VCE
conversion if the base address is an indirect reference and the
aliasing sets could cause issues.

* gcc.dg/tree-ssa/struct-aliasing-1.c: New test.
* gcc.dg/tree-ssa/struct-aliasing-2.c: Likewise.
* gcc.c-torture/execute/struct-aliasing-1.c: Likewise.

Added:
trunk/gcc/testsuite/gcc.c-torture/execute/struct-aliasing-1.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/struct-aliasing-1.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/struct-aliasing-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-forwprop.c


-- 


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2009-01-20 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2009-01-20 17:10 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2009-01-16 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2009-01-16 09:23 ---
I think you should simply do the check for an indirect base only if the folding
of the view-convert-expr ended up in a view-convert-expr.  Playing with
alias-sets
here will still cause these nested v-c-es with -fno-strict-aliasing and loads
of unwanted (and likely unprofitable) v-c-es.  Your testcase should be still
optimized then.


-- 


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2009-01-15 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2009-01-15 23:26 ---
Created an attachment (id=17111)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17111&action=view)
Patch which should fix this and PR 38748

This patch still creates VCE for INDIRECT_REF based but only if the aliasing
sets are the same.  
This is to allow for the following to be optimized:
struct S { unsigned f; };
int __attribute__((noinline))
foo (float *r, struct S *p)
{
  int *q = (int *)&p->f;
  int i = *q;
  *r = 0.0;
  return i + *q;
}

Without a need for &p->f in the IR.


-- 


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2009-01-15 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P1


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2009-01-06 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2009-01-06 21:49 ---
Mine.  I am working on this with the other VCE issue.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-01-06 21:49:26
   date||


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

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


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.4.0


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