This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bootstrap failure on sparc-linux-gnu
Laurent GUERBY <laurent@guerby.net> writes:
> On Thu, 2004-04-22 at 17:48, Eric Botcazou wrote:
> > A starting point would be to look at what dwarf2out.c is passed in both
> > cases.
>
> A wild guess in the same vein as my 2001-10-27 change:
> I looked at trans.c 1.50 vs 1.51 and this is the only place
> I could spot where more than one function is called
> is an argument list (a potential source of non-determinism).
>
> Could someone try this out on a platform where the problem occurs?
>
> Laurent
>
> 2004-04-22 Laurent Guerby <laurent@guerby.net>
>
> * trans.c (gigi): Fix non determinism leading to bootstrap
> comparison failures.
>
>
> Index: trans.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/ada/trans.c,v
> retrieving revision 1.52
> diff -w -u -r1.52 trans.c
> --- trans.c 19 Apr 2004 15:20:14 -0000 1.52
> +++ trans.c 22 Apr 2004 16:08:55 -0000
> @@ -2112,8 +2112,11 @@
> for (gnat_temp = First (Elsif_Parts (gnat_node));
> Present (gnat_temp); gnat_temp = Next (gnat_temp))
> {
> - tree gnu_elseif
> - = build_nt (IF_STMT, gnat_to_gnu (Condition (gnat_temp)),
> + tree gnu_cond, gnu_elseif;
> +
> + gnu_cond = gnat_to_gnu (Condition (gnat_temp))
Semicolon needed.
> + gnu_elseif
> + = build_nt (IF_STMT, gnu_cond,
> build_block_stmt (Then_Statements (gnat_temp)),
> NULL_TREE, NULL_TREE);
>
> @@ -2123,10 +2126,18 @@
> gnu_result = gnu_elseif;
> }
>
> - gnu_result = build_nt (IF_STMT, gnat_to_gnu (Condition (gnat_node)),
> - build_block_stmt (Then_Statements (gnat_node)),
> + {
> + tree gnu_cond, then_block, else_block;
> +
> + gnu_cond = gnat_to_gnu (Condition (gnat_node));
> + then_block = build_block_stmt (Then_Statements (gnat_node));
> + else_block = build_block_stmt (Else_Statements (gnat_node));
> +
> + gnu_result = build_nt (IF_STMT, gnu_cond,
> + then_block
Comma needed.
> nreverse (gnu_result),
> - build_block_stmt (Else_Statements (gnat_node)));
> + else_block);
> + }
> break;
>
> case N_Case_Statement:
I'm bootstrapping now.
Jim