[Bug tree-optimization/39506] PTA TBAA pruning wrong for -fargument-noalias-*

2009-03-20 Thread rguenth at gcc dot gnu dot org
--- Comment #9 from rguenth at gcc dot gnu dot org 2009-03-20 14:20 --- "Fixed" on a-i branch. "Invalid" for trunk (not that this makes these switches usable somehow ...) -- rguenth at gcc dot gnu dot org changed: What|Removed |Added -

[Bug tree-optimization/39506] PTA TBAA pruning wrong for -fargument-noalias-*

2009-03-20 Thread rguenth at gcc dot gnu dot org
--- Comment #8 from rguenth at gcc dot gnu dot org 2009-03-20 14:19 --- Subject: Bug 39506 Author: rguenth Date: Fri Mar 20 14:19:08 2009 New Revision: 144976 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144976 Log: 2009-03-20 Richard Guenther PR tree-optimization/

[Bug tree-optimization/39506] PTA TBAA pruning wrong for -fargument-noalias-*

2009-03-20 Thread rguenth at gcc dot gnu dot org
--- Comment #7 from rguenth at gcc dot gnu dot org 2009-03-20 10:31 --- Hm? In the testcase the argument points to NULL. I do not see that 1) assigning sth else to the parameter is forbidden by the optimization switch 2) we prevent the compiler from coalescing an unrelated SSA_NAME

[Bug tree-optimization/39506] PTA TBAA pruning wrong for -fargument-noalias-*

2009-03-19 Thread dnovillo at gcc dot gnu dot org
--- Comment #6 from dnovillo at gcc dot gnu dot org 2009-03-19 17:12 --- (In reply to comment #5) > I agree with pinskia, and think this should be closed as invalid. Likewise. At most we could emit a warning when we see p = &i. Diego. -- http://gcc.gnu.org/bugzilla/show_bug.cg

[Bug tree-optimization/39506] PTA TBAA pruning wrong for -fargument-noalias-*

2009-03-19 Thread dberlin at gcc dot gnu dot org
--- Comment #5 from dberlin at gcc dot gnu dot org 2009-03-19 17:10 --- I agree with pinskia, and think this should be closed as invalid. fargument-noalias-* is an assertion by you, the user, that these things will never alias. You are telling the compiler it is allowed to assume it is a

[Bug tree-optimization/39506] PTA TBAA pruning wrong for -fargument-noalias-*

2009-03-19 Thread pinskia at gcc dot gnu dot org
--- Comment #4 from pinskia at gcc dot gnu dot org 2009-03-19 17:03 --- -fargument-noalias- is not flow sensitive at all and not supposed to be. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39506

[Bug tree-optimization/39506] PTA TBAA pruning wrong for -fargument-noalias-*

2009-03-19 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2009-03-19 17:02 --- > int foo (int *p, int b) > { > if (b) >p = &i; I think this is invalid for -fargument-noalias-*. I don't think you can assign to another pointer to p with this option turned on with defined results because i

[Bug tree-optimization/39506] PTA TBAA pruning wrong for -fargument-noalias-*

2009-03-19 Thread rguenth at gcc dot gnu dot org
--- Comment #2 from rguenth at gcc dot gnu dot org 2009-03-19 17:00 --- int i; int __attribute__((noinline)) foo (int *p, int b) { if (b) p = &i; i = 1; *p = 0; return i; } extern void abort (void); int main() { if (foo((void *)0, 1) != 0) abort (); return 0; } --

[Bug tree-optimization/39506] PTA TBAA pruning wrong for -fargument-noalias-*

2009-03-19 Thread rguenth at gcc dot gnu dot org
--- Comment #1 from rguenth at gcc dot gnu dot org 2009-03-19 16:58 --- Mine. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned