public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Ada broken on i686-linux (some progress)
@ 2004-09-11 20:10 Zdenek Dvorak
  2004-09-12 17:52 ` Laurent GUERBY
  0 siblings, 1 reply; 10+ messages in thread
From: Zdenek Dvorak @ 2004-09-11 20:10 UTC (permalink / raw)
  To: kenner; +Cc: jh, gcc

Hello,

> >     It would be usefull to know the backtraces at least here.  The
> >     second
> >     problem looks like yet another tree node sharing problem, so in
> >     the
> >     case the failure is within tree-ssa-loop-ivopts, I will try to add
> >     more of unsave_exprs to uses that might result in sharing and lets
> >     see
> >     if it fix it.
> > 
> > I can confirm this is a loop issue because it doesn't happen when
> > I disable loop optimizations.
> 
> I will try to add the unsaves to dubious places in ivops tomorrow then.
> Ot helped in other cases with the same symptom.

could you please check whether this patch helps?

Zdenek

Index: tree-ssa-loop-ivopts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-ivopts.c,v
retrieving revision 2.9
diff -c -3 -p -r2.9 tree-ssa-loop-ivopts.c
*** tree-ssa-loop-ivopts.c	10 Sep 2004 08:56:36 -0000	2.9
--- tree-ssa-loop-ivopts.c	11 Sep 2004 17:15:30 -0000
*************** static tree
*** 1995,2004 ****
  get_computation_at (struct loop *loop,
  		    struct iv_use *use, struct iv_cand *cand, tree at)
  {
!   tree ubase = unsave_expr_now (use->iv->base);
!   tree ustep = unsave_expr_now (use->iv->step);
!   tree cbase = unsave_expr_now (cand->iv->base);
!   tree cstep = unsave_expr_now (cand->iv->step);
    tree utype = TREE_TYPE (ubase), ctype = TREE_TYPE (cbase);
    tree uutype;
    tree expr, delta;
--- 2007,2016 ----
  get_computation_at (struct loop *loop,
  		    struct iv_use *use, struct iv_cand *cand, tree at)
  {
!   tree ubase = use->iv->base;
!   tree ustep = use->iv->step;
!   tree cbase = cand->iv->base;
!   tree cstep = cand->iv->step;
    tree utype = TREE_TYPE (ubase), ctype = TREE_TYPE (cbase);
    tree uutype;
    tree expr, delta;
*************** iv_value (struct iv *iv, tree niter)
*** 2905,2911 ****
    tree type = TREE_TYPE (iv->base);
  
    niter = fold_convert (type, niter);
!   val = fold (build2 (MULT_EXPR, type, iv->step, unsave_expr_now (niter)));
  
    return fold (build2 (PLUS_EXPR, type, iv->base, val));
  }
--- 2917,2923 ----
    tree type = TREE_TYPE (iv->base);
  
    niter = fold_convert (type, niter);
!   val = fold (build2 (MULT_EXPR, type, iv->step, niter));
  
    return fold (build2 (PLUS_EXPR, type, iv->base, val));
  }
*************** rewrite_use_outer (struct ivopts_data *d
*** 4125,4130 ****
--- 4137,4143 ----
  	value = get_computation_at (data->current_loop,
  				    use, cand, last_stmt (exit->src));
  
+       value = unshare_expr (value);
        op = force_gimple_operand (value, &stmts, true, SSA_NAME_VAR (tgt));
  	  
        /* If we will preserve the iv anyway and we would need to perform

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Ada broken on i686-linux (some progress)
@ 2004-09-12  3:56 Richard Kenner
  2004-09-12 22:12 ` Zdenek Dvorak
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Kenner @ 2004-09-12  3:56 UTC (permalink / raw)
  To: rakdver; +Cc: gcc

    could you please check whether this patch helps?

I can't say for sure it if "helps" or not, but this failure is
still present:

../../xgcc -B../../ -c -g -O2      -W -Wall -gnatpg  g-regexp.adb -o g-regexp.o
g-regexp.adb: In function `GNAT.REGEXP.COMPILE.CREATE_PRIMARY_TABLE.CREATE_SIMPL
E':
g-regexp.adb:521: error: Missing definition
for SSA_NAME: k.620<D2244>_174
in statement:
#   TMT.1766<D3788>_352 = V_MAY_DEF <TMT.1766<D3788>_464>;
#   TMT.1767<D3789>_351 = V_MAY_DEF <TMT.1767<D3789>_518>;
#   TMT.1768<D3790>_340 = V_MAY_DEF <TMT.1768<D3790>_457>;
#   TMT.1769<D3791>_339 = V_MAY_DEF <TMT.1769<D3791>_529>;
#   C.617<D2240>_338 = V_MAY_DEF <C.617<D2240>_519>;
#   TMT.1771<D3793>_337 = V_MAY_DEF <TMT.1771<D3793>_416>;
#   TMT.1772<D3794>_336 = V_MAY_DEF <TMT.1772<D3794>_540>;
#   TMT.1773<D3795>_331 = V_MAY_DEF <TMT.1773<D3795>_485>;
#   TMT.1774<D3796>_326 = V_MAY_DEF <TMT.1774<D3796>_308>;
#   VUSE <T.900<D2548>_357>;
*T.898<D2546>_175 = gnat__regexp__set (T.900<D2548>, T.897<D2545>_170, k.620<D22
44>_174, T.594<D2211>_173);

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Ada broken on i686-linux (some progress)
@ 2004-09-11 14:16 Richard Kenner
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Kenner @ 2004-09-11 14:16 UTC (permalink / raw)
  To: hubicka; +Cc: gcc

    My problem is actually that GDB crash on gnat executable without even
    producing backtrace for crash within C part of the binarry making almost
    every debugging very inconvenient.

    Perhaps update will solve that..

I doubt it.  I've seen this in the past and it's been a GDB problem.
The latest GDB version does this less often but it does still happen and
is indeed quite annoying when it does.

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Ada broken on i686-linux (some progress)
@ 2004-09-10 12:09 Richard Kenner
  2004-09-11  3:19 ` Jan Hubicka
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Kenner @ 2004-09-10 12:09 UTC (permalink / raw)
  To: jh; +Cc: gcc

    It would be usefull to know the backtraces at least here.  The second
    problem looks like yet another tree node sharing problem, so in the
    case the failure is within tree-ssa-loop-ivopts, I will try to add
    more of unsave_exprs to uses that might result in sharing and lets see
    if it fix it.

I can confirm this is a loop issue because it doesn't happen when
I disable loop optimizations.

    What is the current situation of ada aware gdb?  I used to have one but
    it no longer works on 3.5 GCC produced dwarf and the default in my
    instalation just die horribly seeing ada.

I almost never used an Ada-aware GDB even in the few times I'm
debugging in the Ada part of the front end.  I am indeed having
problems finding a GDB that works well with 4.0-GCC-produced code, but
it does not seem related to Ada per se: it appears that it's just like
other issues where Ada produces more complex code that triggers latent
bugs either in debug output creation or reading.

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Ada broken on i686-linux (some progress)
@ 2004-09-09 22:08 Richard Kenner
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Kenner @ 2004-09-09 22:08 UTC (permalink / raw)
  To: laurent; +Cc: gcc

Most of those errors I've seen (and reported most).  I just tried a build
that disabled all loop optimizations (in tree-optimize.c).  That works
a lot better, though the ACATS profile is poor (mostly due to a
multiple definition s-fatgen.adb).

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Ada broken on i686-linux
@ 2004-09-09 10:28 Arnaud Charlet
  2004-09-09 10:41 ` Nathan Sidwell
  0 siblings, 1 reply; 10+ messages in thread
From: Arnaud Charlet @ 2004-09-09 10:28 UTC (permalink / raw)
  To: gcc

Bootstrapping with default options or -O0 yields:

stage1/xgcc -Bstage1/ -B/home/charlet/cvs/gcc-obj/install/i686-pc-linux-gnu/bin/ -c -g -O0      -gnatpg -gnata -g -O1 -fno-inline \
>  -I- -I. -Iada -I../../gcc-head/gcc/ada ../../gcc-head/gcc/ada/a-except.adb -o ada/a-except.o
+===========================GNAT BUG DETECTED==============================+
| 3.5.0 20040909 (experimental) (i686-pc-linux-gnu) GCC error:             |
| in peel_address, at tree-ssa-loop-ivopts.c:2554                          |
| Error detected at a-exexda.adb:312:8                                     |
[...]
+==========================================================================+

When forcing compilation of a-except.adb with -O0:

stage1/xgcc -Bstage1/ -B/home/charlet/cvs/gcc-obj/install/i686-pc-linux-gnu/bin/ -c -g -O0      -gnatpg -gnata -g -O0 -fno-inline  -I- -I. -Iada -I../../gcc-head/gcc/ada ../../gcc-head/gcc/ada/a-except.adb -o ada/a-except.o
+===========================GNAT BUG DETECTED==============================+
| 3.5.0 20040909 (experimental) (i686-pc-linux-gnu) GCC error:             |
| in create_tmp_var_for, at tree-nested.c:138                              |
| Error detected at a-exextr.adb:148:8                                     |
[...]
+==========================================================================+

Arno

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-09-12 19:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-11 20:10 Ada broken on i686-linux (some progress) Zdenek Dvorak
2004-09-12 17:52 ` Laurent GUERBY
  -- strict thread matches above, loose matches on Subject: below --
2004-09-12  3:56 Richard Kenner
2004-09-12 22:12 ` Zdenek Dvorak
2004-09-11 14:16 Richard Kenner
2004-09-10 12:09 Richard Kenner
2004-09-11  3:19 ` Jan Hubicka
2004-09-09 22:08 Richard Kenner
2004-09-09 10:28 Ada broken on i686-linux Arnaud Charlet
2004-09-09 10:41 ` Nathan Sidwell
2004-09-09 10:47   ` Arnaud Charlet
2004-09-09 16:14     ` Arnaud Charlet
2004-09-09 17:04       ` Arnaud Charlet
2004-09-09 17:24         ` Jan Hubicka
2004-09-09 21:49           ` Ada broken on i686-linux (some progress) Laurent GUERBY
2004-09-10  9:38             ` Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).