Summary: | tree-ssa-alias.c:find_used_portions considers foo(&var) use all elements of var | ||
---|---|---|---|
Product: | gcc | Reporter: | Richard Biener <rguenth> |
Component: | tree-optimization | Assignee: | Richard Biener <rguenth> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dberlin, gcc-bugs |
Priority: | P3 | Keywords: | alias, compile-time-hog, memory-hog, patch |
Version: | 4.2.0 | ||
Target Milestone: | 4.2.0 | ||
URL: | http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01803.html | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2006-02-23 13:45:49 | |
Bug Depends on: | 26439 | ||
Bug Blocks: |
Description
Richard Biener
2006-02-22 15:57:16 UTC
Really for this example: For this case V_MAY_DEF's are dead anyways at least for the other SFT's besides the one for a.i. Try thinking what about: typedef struct { int i; int j; int k; } Foo; void bar(Foo*); void bar1(Foo); void foo(void) { Foo a; a.i = 1; bar(&a); bar1(a); } I get <bb 2>: # SFT.0D.1534_2 = V_MUST_DEF <SFT.0D.1534_1>; aD.1532.iD.1521 = 1; # SFT.0D.1534_3 = V_MAY_DEF <SFT.0D.1534_2>; bar (&aD.1532); # SFT.0D.1534_4 = V_MAY_DEF <SFT.0D.1534_3>; bar2 (aD.1532); for this case. Patch posted, but now stdarg-5.c ICEs. Subject: Bug number PR26421 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01803.html updated patch was posted. Subject: Bug 26421 Author: rguenth Date: Sun Feb 26 21:02:43 2006 New Revision: 111461 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111461 Log: 2006-02-26 Richard Guenther <rguenther@suse.de> PR tree-optimization/26421 * tree-ssa-alias.c (find_used_portions): Don't treat parameters in function calls that are ADDR_EXPRs as using the whole structure. * gcc.dg/tree-ssa/pr26421.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/tree-ssa/pr26421.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-alias.c Fixed. This testcase fails on the mainline. It will stop failing once I revert my bandaid fix, but I'll just fix the testcase. |