public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Re: Regression going from egcs-1.03 to egcs-19980803
       [not found] <35D5B548.B43CDC34@di.unipi.it>
@ 1998-08-15 17:46 ` Jeffrey A Law
  1998-08-18  4:40   ` Roberto Bagnara
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffrey A Law @ 1998-08-15 17:46 UTC (permalink / raw)
  To: Roberto Bagnara; +Cc: egcsbugs

  In message < 35D5B548.B43CDC34@di.unipi.it >you write:
  > Hi there,
  > 
  > there appears to be a regression going from egcs-1.03 to the latest
  > snapshot (egcs-19980803).
  > The problem is reproducible by means of a few lines of C (or C++:
  > it doesn't matter).
  > Everything is provided and explained below.
  > Keep up the good work


  > The program (admittedly dumb -- a much reduced version of a perfectly
  > reasonable function in real code):
  > 
  > #include <assert.h>
  > 
  > int foo(int x)
  > {
  >   // Removing this assertion eliminates the warning.
  >   assert(x >= 0);
  >   // The '= 5' was added later to answer the question:
  >   // "could it be so broken to give the warning also for a variable
  >   // that is explicitely initialized?"
  >   // The answer is: yes.
  >   int i = 5;
  >   // Replacing x+3 by, e.g., x eliminates the warning.
  >   for (i = 0; i < x+3; ++i)
  >     // Replacing i > 3 by, e.g., i == 3 eliminates the warning.
  >     if (i > 3)
  >       return i;
  >   return -1;
  > }
  > 
  > ---------------------------------------------------------------------------
  > ----
  > The result with egcs-19980803:
  > 
  > $ /u/local/bin/gcc -save-temps -O2 -Wall -c warnbug.cc
  > warnbug.cc: In function `int foo(int)':
  > warnbug.cc:11: warning: `int i' might be used uninitialized in this function
The code to detect potentially uninitialized variables is not very
good -- it reports many false positives.

-O2 optimization enables global cse, which happens to rearrange code
in a manner which triggers the false positive warnings.

This is not something we're likely to fix for egcs-1.1.  It would be
nice if someone could improve the uninitialized warning detection code
for a future release though.

jeff



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

* Re: Regression going from egcs-1.03 to egcs-19980803
  1998-08-15 17:46 ` Regression going from egcs-1.03 to egcs-19980803 Jeffrey A Law
@ 1998-08-18  4:40   ` Roberto Bagnara
  1998-08-18 11:14     ` Jeffrey A Law
  0 siblings, 1 reply; 4+ messages in thread
From: Roberto Bagnara @ 1998-08-18  4:40 UTC (permalink / raw)
  To: law; +Cc: egcsbugs

Jeffrey A Law wrote:
> The code to detect potentially uninitialized variables is not very
> good -- it reports many false positives.
> 
> -O2 optimization enables global cse, which happens to rearrange code
> in a manner which triggers the false positive warnings.
> 
> This is not something we're likely to fix for egcs-1.1.  It would be
> nice if someone could improve the uninitialized warning detection code
> for a future release though.

Jeffrey,

thank you very much for the quick reply.

Please, let me ask one question.
I have reported twice that -fprofile-arcs -ftest-coverage
has stopped working since the release of egcs-1.03
(in other words, there has been a regression from
egcs-1.02 to egcs-1.03).
I have submitted two bug reports concerning this but
got no replies whatsoever. And the situation is getting
worse as new snapshots appear.(1)

The question is: is -fprofile-arcs -ftest-coverage
begin phased out (thus removing the relevant sections
in the documentation)?
And the real question is: should I keep posting bug reports
concerning these options or should I forget about it?
Isn't this something that ought to work (again) for
egcs-1.1?

Unfortunately, I cannot revert to egcs-1.02 :(
Thanks again

          Roberto

(1) Reminder from my last bug report: try to compile
    the following one-liner

      #include <vector>

    with

      g++ -fprofile-arcs

    on a ix86-pc-linux-gnu. You will get a symbol

      T global constructors keyed to int lexicographical_compare_3way<signed
char const *,
        signed char const *>(signed char const *, signed char const *, signed
char const *,
        signed char const *)(volatile const)

    (note the T) in the resulting object file.
    You won't get this symbol if you omit the -fprofile-arcs option.
    As a result, if you have more than one module including
    <vector>, you won't be able to link your application.

P.S. I believe that coverage testing is crucial to any serious
     development work.

-- 
Roberto Bagnara
Department of Mathematics, University of Parma, Italy
http://www.di.unipi.it/~bagnara/bagnara.html
mailto:bagnara@di.unipi.it


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

* Re: Regression going from egcs-1.03 to egcs-19980803
  1998-08-18  4:40   ` Roberto Bagnara
@ 1998-08-18 11:14     ` Jeffrey A Law
  1998-08-19 10:03       ` Roberto Bagnara
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffrey A Law @ 1998-08-18 11:14 UTC (permalink / raw)
  To: Roberto Bagnara; +Cc: egcsbugs

  In message < 35D967A6.D3CAEE5F@di.unipi.it >you write:
  > Please, let me ask one question.
  > I have reported twice that -fprofile-arcs -ftest-coverage
  > has stopped working since the release of egcs-1.03
  > (in other words, there has been a regression from
  > egcs-1.02 to egcs-1.03).
  > I have submitted two bug reports concerning this but
  > got no replies whatsoever. And the situation is getting
  > worse as new snapshots appear.(1)
Well, this is a volunteer effort.  Nobody is required to fix bugs
or even respond to them.  Each person responds to whatever bugs
they want.  The "trick" is to find someone with the time and knowhow
to help with your bugs.


  > The question is: is -fprofile-arcs -ftest-coverage
  > begin phased out (thus removing the relevant sections
  > in the documentation)?
Not that I'm aware of.  Did someone remove them from the docs?

  > And the real question is: should I keep posting bug reports
  > concerning these options or should I forget about it?
  > Isn't this something that ought to work (again) for
  > egcs-1.1?
We do want -fprofile-arcs and -ftest-coverage to work, but there's
only so much time any one of us can devote to the project.  The best
way to ensure that they work is to investigate any failures yourself
and send patches :-)  

jeff


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

* Re: Regression going from egcs-1.03 to egcs-19980803
  1998-08-18 11:14     ` Jeffrey A Law
@ 1998-08-19 10:03       ` Roberto Bagnara
  0 siblings, 0 replies; 4+ messages in thread
From: Roberto Bagnara @ 1998-08-19 10:03 UTC (permalink / raw)
  To: law; +Cc: egcsbugs

Jeffrey A Law wrote:
>   > The question is: is -fprofile-arcs -ftest-coverage
>   > begin phased out (thus removing the relevant sections
>   > in the documentation)?
> Not that I'm aware of.  Did someone remove them from the docs?

Nobody did. What I was trying to say is that, IMHO, it makes
little sense to ship egcs-1.1 with the documentation advertizing
the test coverage options if

1) they do not work; and
2) there are no resources to fix them.

At the very least, point (1) should be listed among the
known bugs. This will save the time of many people.
Keep up the good work

         Roberto

-- 
Roberto Bagnara
Department of Mathematics, University of Parma, Italy
http://www.di.unipi.it/~bagnara/bagnara.html
mailto:bagnara@di.unipi.it


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

end of thread, other threads:[~1998-08-19 10:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <35D5B548.B43CDC34@di.unipi.it>
1998-08-15 17:46 ` Regression going from egcs-1.03 to egcs-19980803 Jeffrey A Law
1998-08-18  4:40   ` Roberto Bagnara
1998-08-18 11:14     ` Jeffrey A Law
1998-08-19 10:03       ` Roberto Bagnara

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