From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31836 invoked by alias); 31 Aug 2005 17:00:06 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 31752 invoked by uid 48); 31 Aug 2005 17:00:01 -0000 Date: Wed, 31 Aug 2005 17:00:00 -0000 From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050831165957.23659.pinskia@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/23659] New: Should able to add dereferencing (statements with VUSE) without rerunning may_alias X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg03634.txt.bz2 List-Id: An example of this comes from PR 18298: extern "C" int strcmp (const char*, const char*); char s[2048] = "a"; inline bool foo(const char *str) { return !strcmp(s,str); } int main() { while(!(foo(""))) { s[0] = '\0'; } return 0; } In fab, we replace: # VUSE ; D.1754_4 = strcmp (&s[0], &""[0]); With D.1777_6 = (const unsigned char *) &s[0]; D.1778_9 = *D.1777_6; D.1779_3 = (int) D.1778_9; D.1754_4 = D.1779_3; And the " D.1778_9 = *D.1777_6;" statement does not have a VUSE which causes wrong code if we have a V_MAY_DEF/V_MUST_DEF above (which happens in the testcase). The main reason why I am asking this question so that in the tree combiner, I don't want to rerun may_alias after each time I run the tree combiner which just becomes too expensive. An example for the tree combiner would be: int f(char *a) { int b = strlen(a); return b == 0; } -- Summary: Should able to add dereferencing (statements with VUSE) without rerunning may_alias Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: tree-optimization AssignedTo: dnovillo at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23659