------- Comment #20 from dberlin at gcc dot gnu dot org  2007-07-16 22:29 
-------
Subject: Re:  [4.2/4.3 Regression] -fstrict-aliasing causes skipped code

Oh, for 4.2 you need to add make_constraint_to_escaped_var

On 16 Jul 2007 15:51:44 -0000, rguenth at gcc dot gnu dot org
<[EMAIL PROTECTED]> wrote:
>
>
> ------- Comment #19 from rguenth at gcc dot gnu dot org  2007-07-16 15:51 
> -------
> The backported patch causes
>
> FAIL: gcc.c-torture/execute/pr28778.c execution,  -O2
> FAIL: gcc.c-torture/execute/pr28778.c execution,  -Os
>
> DCE removes
>
> -
> -<L1>:;
> -  list[3] = 42;
>
> we have one added constraint:
>
>  blist.0_7 = blist_1
> +*blist.0_7 = &ANYTHING
>  ESCAPED_VARS = blist.0_7
>
> IL differences after alias1 are
>
> @@ -251,12 +247,11 @@
>    list[3] = 42;
>    blist_6 = &list;
>
> -  # list_8 = PHI <list_4(3), list_5(4)>;
>    # blist_1 = PHI <blist_3(3), blist_6(4)>;
>  <L2>:;
>    blist.0_7 = (const GLint *) blist_1;
> -  #   list_10 = V_MAY_DEF <list_8>;
> -  #   NONLOCAL.44_11 = V_MAY_DEF <NONLOCAL.44_9>;
> +  #   NONLOCAL.44_10 = V_MAY_DEF <NONLOCAL.44_8>;
> +  #   SMT.45_11 = V_MAY_DEF <SMT.45_9>;
>    aglChoosePixelFormat (blist.0_7);
>    return;

This is something that was fixed on 4.3 by proper SMT pruning.
What is happening is it decides to prune the list access even though
it's illegal to do so.


-- 


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

Reply via email to