I am ok with the change
Sun

On Mon, Jan 16, 2012 at 4:48 PM, Gang Yu <[email protected]> wrote:
> Hi,
>
>  Could a gatekeeper please help review the following bug?
>
> Bug case:
> typedef signed char int8_t;
> typedef int int32_t;
> typedef long int int64_t;
> typedef unsigned long int uint64_t;
> struct S0 {
> };
> struct S1 {
>   int8_t f2;
> };
> int32_t g_45 = 4L;
> struct S0 * const g_376[9][1] = {
> };
> struct S0 * const *g_375 = &g_376[7][0];
> struct S1 g_611 = { 0U};
> void func_75()
> {
>   uint64_t l_79 = 0x024CA9A92ED16080LL;
>   int32_t *l_80 = &g_45;
>  lbl_732: (*l_80) &= l_79;
>   for (g_45 = (-28);
>        (g_45 <= (-6));
>        g_45 = safe_add_func_int32_t_s_s(g_45, 1)) {
>     for (l_79 = 0;
>          l_79 < 10;
>          l_79 += 10) {
>       struct S0 l_731[4] = {
>       };
>       (**g_375) = l_731[1];
>     }
>     if (l_79) goto lbl_732;
>     for (g_611.f2 = 5;
>          g_611.f2 < 6;
>          g_611.f2 += 1) {
>     }
>   }
> }
> opencc asserts:
> ### Assertion failure at line 921 of
> /fc/proj/ctires/open64/o64guru/src/Sun/trunk/osprey/be/opt/opt_verify.cxx:
> ### Compiler Error in file bug889-2.c during Global Optimization -- Verify
> Live-Range phase:
> ### sym9v3(cr16) live range overlapped with cur_version sym9v2(cr9) in bb3
> line 22
> Analysis:
> sym9 is the return_vsym and the assertion occurs at the second round DCE
> after the CFG optimisation. The Chi/Phis to return_vsym are marked live only
> when the return stmt in the exit BB is marked live and then propagated back
> to references in other BBs. However, in this case, the return stmt is
> deleted by DCE or (unreachable from the first BB). So, remaining stmts with
> Chi to return_vsym will get a reference error.
>
> Suggested patch:
> Since these are relative rarely-seen cases from auto-generated program and
> we'd better don't change the DCE algorithm for other good run cases.
> we accept this corner case and it does still preserve the right compiling.
>
> osprey/be/opt/opt_verify.cxx    -- 85c7d86..bd8b8ed 100644
> --- INDEX:/osprey/be/opt/opt_verify.cxx
> +++ WORKDIR:/osprey/be/opt/opt_verify.cxx
> @@ -915,6 +917,19 @@ Verify_version_CR(CODEREP *cr, OPT_STAB *opt_stab,
> BB_NODE *bb, INT32 linenum)
>      return;
>    }
> +  // open64.net bug889. The Chi/Phis to return_vsym are marked live only
> +  // when the return stmt in the exit BB is marked live and
> +  // then propagated back to references in other BBs. However, in the case
> of
> +  // return stmt is deleted by DCE or (unreachable from the first BB),
> +  // remaining stmts with Chi to return_vsym will get a reference error
> +  // we allow this corner case since we don't want change the main DCE
> algorithm
> +  // and allow this still do right compiling.
> +
> +  if (cr->Aux_id() == opt_stab->Return_vsym() &&
> +      !(opt_stab->Cfg()->Exit_bb()->Reached() ||
> +        opt_stab->Cfg()->Fake_exit_bb()->Reached()))
> +    return;
> +
> thanks.
>
> Regards
> Gang
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Mar 27 - Feb 2
> Save $400 by Jan. 27
> Register now!
> http://p.sf.net/sfu/rsa-sfdev2dev2
> _______________________________________________
> Open64-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/open64-devel
>

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to