From: Richard Guenther Date: Thu, 20 Sep 2012 14:46:32 +0000 (+0000) Subject: re PR tree-optimization/54634 (miscompilation with -O3 -ftree-loop-distribution) X-Git-Tag: misc/gccgo-go1_1_2~726 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2ea3c151c65c472024cf22b2e772819578d2011;p=thirdparty%2Fgcc.git re PR tree-optimization/54634 (miscompilation with -O3 -ftree-loop-distribution) 2012-09-20 Richard Guenther PR tree-optimization/54634 * tree-data-ref.c (get_references_in_stmt): For now give up for pure functions. From-SVN: r191567 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8223bef2567c..e526b91555bc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-09-20 Richard Guenther + + PR tree-optimization/54634 + * tree-data-ref.c (get_references_in_stmt): For now give + up for pure functions. + 2012-09-20 Chen Wei-Ren doc/lto.texi: Correct typo. diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 4f6df91ec287..0d647d7c5ea9 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -4307,10 +4307,10 @@ get_references_in_stmt (gimple stmt, VEC (data_ref_loc, heap) **references) *references = NULL; /* ASM_EXPR and CALL_EXPR may embed arbitrary side effects. - Calls have side-effects, except those to const or pure - functions. */ + As we cannot model data-references to not spelled out + accesses give up if they may occur. */ if ((stmt_code == GIMPLE_CALL - && !(gimple_call_flags (stmt) & (ECF_CONST | ECF_PURE))) + && !(gimple_call_flags (stmt) & ECF_CONST)) || (stmt_code == GIMPLE_ASM && (gimple_asm_volatile_p (stmt) || gimple_vuse (stmt)))) clobbers_memory = true;