public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/36400]  New: points-to results wrong
@ 2008-05-31 10:23 rguenth at gcc dot gnu dot org
  2008-05-31 10:34 ` [Bug tree-optimization/36400] " rguenth at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-31 10:23 UTC (permalink / raw)
  To: gcc-bugs

In

struct barstruct { char const* some_string; };

void changethepointer(struct barstruct***);

void baz()
{
  struct barstruct bar1;
  struct barstruct* barptr = &bar1;
  struct barstruct** barptr2 = &barptr;
  changethepointer(&barptr2);
  barptr->some_string = "Everything OK";
}

the store to barptr->some_string is removed because points-to figures that
barptr points to bar1, which it doesn't necessarily do after the call to
changethepointer - it should point to anything.


-- 
           Summary: points-to results wrong
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Keywords: wrong-code, alias
          Severity: normal
          Priority: P3
         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=36400


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

* [Bug tree-optimization/36400] points-to results wrong
  2008-05-31 10:23 [Bug tree-optimization/36400] New: points-to results wrong rguenth at gcc dot gnu dot org
@ 2008-05-31 10:34 ` rguenth at gcc dot gnu dot org
  2008-06-12 10:25 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-31 10:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-05-31 10:33 -------
The patch from

http://gcc.gnu.org/ml/gcc-patches/2008-05/msg02060.html

seems to work.


-- 

rguenth 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         |2008-05-31 10:33:32
               date|                            |


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


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

* [Bug tree-optimization/36400] points-to results wrong
  2008-05-31 10:23 [Bug tree-optimization/36400] New: points-to results wrong rguenth at gcc dot gnu dot org
  2008-05-31 10:34 ` [Bug tree-optimization/36400] " rguenth at gcc dot gnu dot org
@ 2008-06-12 10:25 ` rguenth at gcc dot gnu dot org
  2008-06-12 13:32 ` [Bug tree-optimization/36400] [4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-12 10:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-06-12 10:24 -------
The patch that rewrites call-clobbering deals with this.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|dberlin at gcc dot gnu dot  |rguenth at gcc dot gnu dot
                   |org                         |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug tree-optimization/36400] [4.2/4.3/4.4 Regression] points-to results wrong
  2008-05-31 10:23 [Bug tree-optimization/36400] New: points-to results wrong rguenth at gcc dot gnu dot org
  2008-05-31 10:34 ` [Bug tree-optimization/36400] " rguenth at gcc dot gnu dot org
  2008-06-12 10:25 ` rguenth at gcc dot gnu dot org
@ 2008-06-12 13:32 ` rguenth at gcc dot gnu dot org
  2008-06-27 18:55 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-12 13:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-06-12 13:31 -------
Actually this is a regression.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.2.4 4.3.1 4.4.0
      Known to work|                            |4.1.2
           Priority|P3                          |P2
            Summary|points-to results wrong     |[4.2/4.3/4.4 Regression]
                   |                            |points-to results wrong
   Target Milestone|---                         |4.2.5


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


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

* [Bug tree-optimization/36400] [4.2/4.3/4.4 Regression] points-to results wrong
  2008-05-31 10:23 [Bug tree-optimization/36400] New: points-to results wrong rguenth at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-06-12 13:32 ` [Bug tree-optimization/36400] [4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
@ 2008-06-27 18:55 ` rguenth at gcc dot gnu dot org
  2008-06-27 21:56 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-27 18:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2008-06-27 18:54 -------
Subject: Bug 36400

Author: rguenth
Date: Fri Jun 27 18:53:43 2008
New Revision: 137197

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137197
Log:
2008-06-27  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/36400
        PR tree-optimization/36373
        PR tree-optimization/36344
        * tree-ssa-structalias.c (var_escaped, escaped_tree, escaped_id,
        var_nonlocal, nonlocal_tree, nonlocal_id): New globals
        (update_alias_info): Remove call clobbering code.
        (make_constraint_to): New helper function.
        (make_escape_constraint): Likewise.
        (handle_rhs_call): Use it on all pointer containing arguments.
        Also mark the static chain escaped.
        (handle_lhs_call): Make constraints from NONLOCAL and ESCAPED
        instead of ANYTHING.
        (make_constraint_from): New helper split out from ...
        (make_constraint_from_anything): ... here.
        (find_func_aliases): Add constraints for escape sites.
        (intra_create_variable_infos): Make constraints from NONLOCAL
        for parameters.
        (find_what_p_points_to): Interpret NONLOCAL and ESCAPED the same
        as ANYTHING.
        (clobber_what_p_points_to): Remove.
        (clobber_what_escaped): New function.
        (init_base_vars): Init NONLOCAL and ESCAPED.
        (do_sd_constraint): Do not propagate the solution from ESCAPED
        but use ESCAPED as a placeholder.
        (solve_graph): Likewise.
        * tree-flow.h (clobber_what_p_points_to): Remove.
        (clobber_what_escaped): Declare.
        * tree-ssa-alias.c (set_initial_properties): Call it.
        Remove code clobbering escaped pointers.

        * gcc.dg/torture/pr36373-1.c: New testcase.
        * gcc.dg/torture/pr36373-2.c: Likewise.
        * gcc.dg/torture/pr36373-3.c: Likewise.
        * gcc.dg/torture/pr36373-4.c: Likewise.
        * gcc.dg/torture/pr36373-5.c: Likewise.
        * gcc.dg/torture/pr36373-6.c: Likewise.
        * gcc.dg/torture/pr36373-7.c: Likewise.
        * gcc.dg/torture/pr36373-8.c: Likewise.
        * gcc.dg/torture/pr36373-9.c: Likewise.
        * gcc.dg/torture/pr36373-10.c: Likewise.
        * gcc.dg/torture/pr36400.c: Likewise.
        * gcc.c-torture/execute/pta-field-1.c: Likewise.
        * gcc.c-torture/execute/pta-field-2.c: Likewise.
        * gcc.dg/tree-ssa/loadpre8.c: Remove XFAIL.
        * gcc.dg/tree-ssa/pr24287.c: XFAIL.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/tree-ssa/loadpre8.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr24287.c
    trunk/gcc/tree-flow.h
    trunk/gcc/tree-ssa-alias.c
    trunk/gcc/tree-ssa-structalias.c


-- 


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


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

* [Bug tree-optimization/36400] [4.2/4.3/4.4 Regression] points-to results wrong
  2008-05-31 10:23 [Bug tree-optimization/36400] New: points-to results wrong rguenth at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-06-27 18:55 ` rguenth at gcc dot gnu dot org
@ 2008-06-27 21:56 ` rguenth at gcc dot gnu dot org
  2008-06-28 11:20 ` [Bug tree-optimization/36400] [4.2/4.3 " rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-27 21:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2008-06-27 21:55 -------
Subject: Bug 36400

Author: rguenth
Date: Fri Jun 27 21:54:42 2008
New Revision: 137204

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137204
Log:
2008-06-27  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/36400
        PR tree-optimization/36373
        PR tree-optimization/36344
        * tree-ssa-structalias.c (var_escaped, escaped_tree, escaped_id,
        var_nonlocal, nonlocal_tree, nonlocal_id): New globals
        (update_alias_info): Remove call clobbering code.
        (make_constraint_to): New helper function.
        (make_escape_constraint): Likewise.
        (handle_rhs_call): Use it on all pointer containing arguments.
        Also mark the static chain escaped.
        (handle_lhs_call): Make constraints from NONLOCAL and ESCAPED
        instead of ANYTHING.
        (make_constraint_from): New helper split out from ...
        (make_constraint_from_anything): ... here.
        (find_func_aliases): Add constraints for escape sites.
        (intra_create_variable_infos): Make constraints from NONLOCAL
        for parameters.
        (find_what_p_points_to): Interpret NONLOCAL and ESCAPED the same
        as ANYTHING.
        (clobber_what_p_points_to): Remove.
        (clobber_what_escaped): New function.
        (init_base_vars): Init NONLOCAL and ESCAPED.
        (do_sd_constraint): Do not propagate the solution from ESCAPED
        but use ESCAPED as a placeholder.
        (solve_graph): Likewise.
        * tree-flow.h (clobber_what_p_points_to): Remove.
        (clobber_what_escaped): Declare.
        * tree-ssa-alias.c (set_initial_properties): Call it.
        Remove code clobbering escaped pointers.

        * gcc.dg/torture/pr36373-1.c: New testcase.
        * gcc.dg/torture/pr36373-2.c: Likewise.
        * gcc.dg/torture/pr36373-3.c: Likewise.
        * gcc.dg/torture/pr36373-4.c: Likewise.
        * gcc.dg/torture/pr36373-5.c: Likewise.
        * gcc.dg/torture/pr36373-6.c: Likewise.
        * gcc.dg/torture/pr36373-7.c: Likewise.
        * gcc.dg/torture/pr36373-8.c: Likewise.
        * gcc.dg/torture/pr36373-9.c: Likewise.
        * gcc.dg/torture/pr36373-10.c: Likewise.
        * gcc.dg/torture/pr36400.c: Likewise.
        * gcc.c-torture/execute/pta-field-1.c: Likewise.
        * gcc.c-torture/execute/pta-field-2.c: Likewise.
        * gcc.dg/tree-ssa/loadpre8.c: Remove XFAIL.
        * gcc.dg/tree-ssa/pr24287.c: XFAIL.

Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/pta-field-1.c
    trunk/gcc/testsuite/gcc.c-torture/execute/pta-field-2.c
    trunk/gcc/testsuite/gcc.dg/torture/pr36373-1.c
    trunk/gcc/testsuite/gcc.dg/torture/pr36373-10.c
    trunk/gcc/testsuite/gcc.dg/torture/pr36373-2.c
    trunk/gcc/testsuite/gcc.dg/torture/pr36373-3.c
    trunk/gcc/testsuite/gcc.dg/torture/pr36373-4.c
    trunk/gcc/testsuite/gcc.dg/torture/pr36373-5.c
    trunk/gcc/testsuite/gcc.dg/torture/pr36373-6.c
    trunk/gcc/testsuite/gcc.dg/torture/pr36373-7.c
    trunk/gcc/testsuite/gcc.dg/torture/pr36373-8.c
    trunk/gcc/testsuite/gcc.dg/torture/pr36373-9.c
    trunk/gcc/testsuite/gcc.dg/torture/pr36400.c


-- 


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


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

* [Bug tree-optimization/36400] [4.2/4.3 Regression] points-to results wrong
  2008-05-31 10:23 [Bug tree-optimization/36400] New: points-to results wrong rguenth at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-06-27 21:56 ` rguenth at gcc dot gnu dot org
@ 2008-06-28 11:20 ` rguenth at gcc dot gnu dot org
  2009-01-15 10:38 ` ramana at icerasemi dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-28 11:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2008-06-28 11:19 -------
Fixed for 4.4.0.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.2.4 4.3.1 4.4.0           |4.2.4 4.3.1
      Known to work|4.1.2                       |4.1.2 4.4.0
            Summary|[4.2/4.3/4.4 Regression]    |[4.2/4.3 Regression] points-
                   |points-to results wrong     |to results wrong


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


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

* [Bug tree-optimization/36400] [4.2/4.3 Regression] points-to results wrong
  2008-05-31 10:23 [Bug tree-optimization/36400] New: points-to results wrong rguenth at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-06-28 11:20 ` [Bug tree-optimization/36400] [4.2/4.3 " rguenth at gcc dot gnu dot org
@ 2009-01-15 10:38 ` ramana at icerasemi dot com
  2009-01-16 23:10 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ramana at icerasemi dot com @ 2009-01-15 10:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ramana at icerasemi dot com  2009-01-15 10:38 -------
Change CC addresses.


-- 

ramana at icerasemi dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|ramana at icerasemi dot com |ramana dot r at gmail dot
                   |                            |com


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


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

* [Bug tree-optimization/36400] [4.2/4.3 Regression] points-to results wrong
  2008-05-31 10:23 [Bug tree-optimization/36400] New: points-to results wrong rguenth at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-01-15 10:38 ` ramana at icerasemi dot com
@ 2009-01-16 23:10 ` rguenth at gcc dot gnu dot org
  2009-03-31 20:53 ` [Bug tree-optimization/36400] [4.3 " jsm28 at gcc dot gnu dot org
  2009-06-17 12:38 ` rguenth at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-16 23:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2009-01-16 23:10 -------
I have no plans for fixing this on the branches.


-- 

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


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


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

* [Bug tree-optimization/36400] [4.3 Regression] points-to results wrong
  2008-05-31 10:23 [Bug tree-optimization/36400] New: points-to results wrong rguenth at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-01-16 23:10 ` rguenth at gcc dot gnu dot org
@ 2009-03-31 20:53 ` jsm28 at gcc dot gnu dot org
  2009-06-17 12:38 ` rguenth at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 20:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jsm28 at gcc dot gnu dot org  2009-03-31 20:52 -------
Closing 4.2 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.2/4.3 Regression] points-|[4.3 Regression] points-to
                   |to results wrong            |results wrong
   Target Milestone|4.2.5                       |4.3.4


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


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

* [Bug tree-optimization/36400] [4.3 Regression] points-to results wrong
  2008-05-31 10:23 [Bug tree-optimization/36400] New: points-to results wrong rguenth at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2009-03-31 20:53 ` [Bug tree-optimization/36400] [4.3 " jsm28 at gcc dot gnu dot org
@ 2009-06-17 12:38 ` rguenth at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-06-17 12:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from rguenth at gcc dot gnu dot org  2009-06-17 12:38 -------
WONTFIX for 4.3.  Alias fixes are considered too risky at this stage.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|4.2.4 4.3.1                 |4.2.4 4.3.1 4.3.4
         Resolution|                            |FIXED
   Target Milestone|4.3.4                       |4.4.0


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


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

end of thread, other threads:[~2009-06-17 12:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-31 10:23 [Bug tree-optimization/36400] New: points-to results wrong rguenth at gcc dot gnu dot org
2008-05-31 10:34 ` [Bug tree-optimization/36400] " rguenth at gcc dot gnu dot org
2008-06-12 10:25 ` rguenth at gcc dot gnu dot org
2008-06-12 13:32 ` [Bug tree-optimization/36400] [4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
2008-06-27 18:55 ` rguenth at gcc dot gnu dot org
2008-06-27 21:56 ` rguenth at gcc dot gnu dot org
2008-06-28 11:20 ` [Bug tree-optimization/36400] [4.2/4.3 " rguenth at gcc dot gnu dot org
2009-01-15 10:38 ` ramana at icerasemi dot com
2009-01-16 23:10 ` rguenth at gcc dot gnu dot org
2009-03-31 20:53 ` [Bug tree-optimization/36400] [4.3 " jsm28 at gcc dot gnu dot org
2009-06-17 12:38 ` rguenth 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).