public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Ada files now checked in
@ 2001-10-06  9:40 dewar
  2001-10-06 10:02 ` Zack Weinberg
  0 siblings, 1 reply; 6+ messages in thread
From: dewar @ 2001-10-06  9:40 UTC (permalink / raw)
  To: dewar, zack; +Cc: bosch, gcc, kenner

<<Completely agreed, and there is work in progress to improve these
warnings.
>>

Ah, that's *very* interesting, can you tell me more? In particular that
news means I can probably retire the work on trying to do this in the
GNAT front end (we already catch quite a bit there, but do not yet catch
cases involving conditionals).

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

* Re: Ada files now checked in
  2001-10-06  9:40 Ada files now checked in dewar
@ 2001-10-06 10:02 ` Zack Weinberg
  2001-10-06 13:39   ` Diego Novillo
  0 siblings, 1 reply; 6+ messages in thread
From: Zack Weinberg @ 2001-10-06 10:02 UTC (permalink / raw)
  To: dewar; +Cc: bosch, gcc, kenner

On Sat, Oct 06, 2001 at 12:39:45PM -0400, dewar@gnat.com wrote:
> <<Completely agreed, and there is work in progress to improve these
> warnings.
> >>
> 
> Ah, that's *very* interesting, can you tell me more? In particular that
> news means I can probably retire the work on trying to do this in the
> GNAT front end (we already catch quite a bit there, but do not yet catch
> cases involving conditionals).

I'm not sure if anyone has actually *proposed* this, but code is being
written to do data flow analysis on whole-function trees; since trees
retain much more information about user variables and source
positions, it would be possible to tag the exact location that the
compiler thought an uninitialized value could reach.

You might want to check out the ast-optimizer-branch.

zw

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

* Re: Ada files now checked in
  2001-10-06 10:02 ` Zack Weinberg
@ 2001-10-06 13:39   ` Diego Novillo
  2001-10-06 13:59     ` Joseph S. Myers
       [not found]     ` <Pine.BSF.4.33.0110091731510.1398-100000@naos.dbai.tuwien.ac.at>
  0 siblings, 2 replies; 6+ messages in thread
From: Diego Novillo @ 2001-10-06 13:39 UTC (permalink / raw)
  To: Zack Weinberg; +Cc: dewar, bosch, gcc, kenner

On Sat, 06 Oct 2001, Zack Weinberg wrote:

> On Sat, Oct 06, 2001 at 12:39:45PM -0400, dewar@gnat.com wrote:
> > <<Completely agreed, and there is work in progress to improve these
> > warnings.
> > >>
> > 
> > Ah, that's *very* interesting, can you tell me more? In particular that
> > news means I can probably retire the work on trying to do this in the
> > GNAT front end (we already catch quite a bit there, but do not yet catch
> > cases involving conditionals).
> 
> I'm not sure if anyone has actually *proposed* this, but code is being
> written to do data flow analysis on whole-function trees; since trees
> retain much more information about user variables and source
> positions, it would be possible to tag the exact location that the
> compiler thought an uninitialized value could reach.
> 
> You might want to check out the ast-optimizer-branch.
> 
Yes, this is already implemented in the ast-optimizer-branch.
The compiler computes reaching definitions for local variables
and emits a warning for every variable that might be used
uninitialized (tree-ssa.c:analyze_rdefs).

Diego.

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

* Re: Ada files now checked in
  2001-10-06 13:39   ` Diego Novillo
@ 2001-10-06 13:59     ` Joseph S. Myers
  2001-10-06 14:10       ` Diego Novillo
       [not found]     ` <Pine.BSF.4.33.0110091731510.1398-100000@naos.dbai.tuwien.ac.at>
  1 sibling, 1 reply; 6+ messages in thread
From: Joseph S. Myers @ 2001-10-06 13:59 UTC (permalink / raw)
  To: Diego Novillo; +Cc: gcc

On Sat, 6 Oct 2001, Diego Novillo wrote:

> Yes, this is already implemented in the ast-optimizer-branch.
> The compiler computes reaching definitions for local variables
> and emits a warning for every variable that might be used
> uninitialized (tree-ssa.c:analyze_rdefs).

Does this fix some or all of the XFAILing gcc.dg/uninit-*.c testcases?

-- 
Joseph S. Myers
jsm28@cam.ac.uk

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

* Re: Ada files now checked in
  2001-10-06 13:59     ` Joseph S. Myers
@ 2001-10-06 14:10       ` Diego Novillo
  0 siblings, 0 replies; 6+ messages in thread
From: Diego Novillo @ 2001-10-06 14:10 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc

On Sat, 06 Oct 2001, Joseph S. Myers wrote:

> On Sat, 6 Oct 2001, Diego Novillo wrote:
> 
> > Yes, this is already implemented in the ast-optimizer-branch.
> > The compiler computes reaching definitions for local variables
> > and emits a warning for every variable that might be used
> > uninitialized (tree-ssa.c:analyze_rdefs).
> 
> Does this fix some or all of the XFAILing gcc.dg/uninit-*.c testcases?
> 
Dunno.  I didn't know these existed.  Thanks for pointing it out.

Right now I'm shaking off false positives by bootstrapping with
-Wuninitialized.  Once I'm confident it's more or less stable, I
will add the flag to the regression tests.

First I need to disable the original warning, otherwise we won't
know which of the two are emitting the warning.

Diego.

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

* Re: ast-optimizer-branch (was: Ada files now checked in)
       [not found]     ` <Pine.BSF.4.33.0110091731510.1398-100000@naos.dbai.tuwien.ac.at>
@ 2001-10-09  8:56       ` Diego Novillo
  0 siblings, 0 replies; 6+ messages in thread
From: Diego Novillo @ 2001-10-09  8:56 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Nathan Sidwell, gcc

On Tue, 09 Oct 2001, Gerald Pfeifer wrote:

> (Offlist, but feel free to reply to the list if you prefer!)
> 
OK.  I was going to post something along these lines.  Thanks for
bringing it up.

> On Sat, 6 Oct 2001, Diego Novillo wrote:
> > Yes, this is already implemented in the ast-optimizer-branch.
> > The compiler computes reaching definitions for local variables
> > and emits a warning for every variable that might be used
> > uninitialized (tree-ssa.c:analyze_rdefs).
> 
> Any news/time-frame concerning merging this branch back to mainline?
> 
> It would be awesome to have this in GCC 3.1, but for that to happen, the
> merger probably (at least) has to be started within the next seven days.
> 
I was considering submitting it this week.  I am a little
uncertain about timing, though.  There is quite a bit of new
code.  It's fairly stable, though, and it doesn't really affect
code generation.

I would only merge the tree SSA patches, of course.  I'm not sure
what the status of Nathan's work is.


Diego.

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

end of thread, other threads:[~2001-10-09  8:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-06  9:40 Ada files now checked in dewar
2001-10-06 10:02 ` Zack Weinberg
2001-10-06 13:39   ` Diego Novillo
2001-10-06 13:59     ` Joseph S. Myers
2001-10-06 14:10       ` Diego Novillo
     [not found]     ` <Pine.BSF.4.33.0110091731510.1398-100000@naos.dbai.tuwien.ac.at>
2001-10-09  8:56       ` ast-optimizer-branch (was: Ada files now checked in) Diego Novillo

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).