[Bug tree-optimization/37868] [4.3 Regression] code that breaks TBAA is misoptimized even with -fno-strict-aliasing

2008-11-20 Thread rguenth at gcc dot gnu dot org


--- Comment #8 from rguenth at gcc dot gnu dot org  2008-11-20 12:13 ---
Subject: Bug 37868

Author: rguenth
Date: Thu Nov 20 12:12:01 2008
New Revision: 142040

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=142040
Log:
2008-11-20  Richard Guenther  [EMAIL PROTECTED]

PR tree-optimization/37868
* tree-ssa-structalias.c (set_uids_in_ptset): Add SFTs based on
pointed to variable and access size.

* gcc.dg/torture/pr37868.c: New testcase.
* gcc.c-torture/execute/pr38048-1.c: Likewise.
* gcc.c-torture/execute/pr38048-2.c: Likewise.

Backport from mainline:
2008-07-07  Richard Guenther  [EMAIL PROTECTED]

* tree-ssa-structalias.c (struct variable_info): Add is_full_var flag.
(new_var_info): Set it to false.
(solution_set_add): Correctly handle pointers outside a var and
inside a field.
(type_safe): Treat variables with is_full_var properly.
(do_sd_constraint): Likewise.
(do_ds_constraint): Likewise.
(process_constraint): Remove zeroing offset for !use_field_sensitive.
(get_constraint_for_ptr_offset): New function.
(get_constraint_for_component_ref): Handle is_full_vars properly.
(get_constraint_for): Handle POINTER_PLUS_EXPR.
(handle_ptr_arith): Remove.
(find_func_aliases): Handle POINTER_PLUS_EXPR through generic
get_constraint_for code.
(create_function_info_for): For parameter and result varinfos set
is_full_var flag.
(create_variable_info_for): Set is_full_var flag whenever we
just created a single varinfo for a decl.
(init_alias_vars): Initialize use_field_sensitive from
max-fields-for-field-sensitive parameter.

* gcc.dg/torture/pta-ptrarith-1.c: New testcase.
* gcc.dg/torture/pta-ptrarith-2.c: Likewise.

Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/execute/pr38048-1.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/execute/pr38048-2.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/torture/pr37868.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/torture/pta-ptrarith-1.c
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/torture/pta-ptrarith-2.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
branches/gcc-4_3-branch/gcc/tree-ssa-structalias.c


-- 


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



[Bug tree-optimization/37868] [4.3 Regression] code that breaks TBAA is misoptimized even with -fno-strict-aliasing

2008-11-20 Thread rguenth at gcc dot gnu dot org


--- Comment #9 from rguenth at gcc dot gnu dot org  2008-11-20 12:14 ---
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=37868



[Bug tree-optimization/37868] [4.3 Regression] code that breaks TBAA is misoptimized even with -fno-strict-aliasing

2008-11-20 Thread rguenth at gcc dot gnu dot org


--- Comment #10 from rguenth at gcc dot gnu dot org  2008-11-20 12:26 
---
Subject: Bug 37868

Author: rguenth
Date: Thu Nov 20 12:25:26 2008
New Revision: 142041

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=142041
Log:
2008-11-20  Richard Guenther  [EMAIL PROTECTED]

PR tree-optimization/37868
* gcc.dg/torture/pr37868.c: New testcase.
* gcc.c-torture/execute/pr38048-1.c: Likewise.
* gcc.c-torture/execute/pr38048-2.c: Likewise.

Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr38048-1.c
trunk/gcc/testsuite/gcc.c-torture/execute/pr38048-2.c
trunk/gcc/testsuite/gcc.dg/torture/pr37868.c
Modified:
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug tree-optimization/37868] [4.3 Regression] code that breaks TBAA is misoptimized even with -fno-strict-aliasing

2008-11-07 Thread rguenth at gcc dot gnu dot org


--- Comment #7 from rguenth at gcc dot gnu dot org  2008-11-07 12:50 ---
*** Bug 38048 has been marked as a duplicate of this bug. ***


-- 


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



[Bug tree-optimization/37868] [4.3 Regression] code that breaks TBAA is misoptimized even with -fno-strict-aliasing

2008-11-03 Thread jakub at gcc dot gnu dot org


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P2


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



[Bug tree-optimization/37868] [4.3 Regression] code that breaks TBAA is misoptimized even with -fno-strict-aliasing

2008-10-22 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2008-10-22 11:46 ---
4.2 works, so this is a regression.  Mine.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
  Known to work|4.4.0   |4.2.4 4.4.0
   Last reconfirmed|2008-10-18 22:42:54 |2008-10-22 11:46:45
   date||
Summary|code that breaks TBAA is|[4.3 Regression] code that
   |misoptimized even with -fno-|breaks TBAA is misoptimized
   |strict-aliasing |even with -fno-strict-
   ||aliasing
   Target Milestone|--- |4.3.3


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



[Bug tree-optimization/37868] [4.3 Regression] code that breaks TBAA is misoptimized even with -fno-strict-aliasing

2008-10-22 Thread rguenth at gcc dot gnu dot org


--- Comment #6 from rguenth at gcc dot gnu dot org  2008-10-22 13:49 ---
Backporting the fix turns out to be tricky...


-- 


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