Re: [current tinderbox] failure on ia64/ia64

From: Ruslan Ermilov <ru_at_freebsd.org>
Date: Wed, 17 Mar 2004 22:03:07 +0200
On Wed, Mar 17, 2004 at 01:39:31PM +0200, Ruslan Ermilov wrote:
> On Wed, Mar 17, 2004 at 11:22:28AM +0100, Dag-Erling Sm?rgrav wrote:
> > FreeBSD Tinderbox <tinderbox_at_freebsd.org> writes:
> > > /other/tinderbox/CURRENT/ia64/ia64/src/sys/dev/sound/pci/vibes.c: In function `sv_mix_setrecsrc':
> > > /other/tinderbox/CURRENT/ia64/ia64/src/sys/dev/sound/pci/vibes.c:541: warning: `i' might be used uninitialized in this function
> > > *** Error code 1
> > 
> > Now that is wierd...  and I can't reproduce it.  There is no way i can
> > be used uninitialized, it is not referenced anywhere outside this
> > loop:
> > 
> >         for(i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
> >                 if ((1 << i) & mask) {
> >                         v |= mt[i].iselect;
> >                 }
> >         }
> > 
> > If the problem persists, we'll have to conclude that gcc is broken
> > somehow.
> > 
> I cannot reproduce it either, but perhaps this is the same reason why
> we still have -Wno-uninitialized in <bsd.sys.mk> for normal WARNS
> levels.
> 
Actually, this is easily reproduceable by compiling the corresponding
module on pluto1 with CFLAGS="-O2 -pipe" set in environment.  There's
clearly a bug in gcc(1), as:

- substituting 2 instead of SOUND_MIXER_NRDEVICES in the line below
  makes it compile without a warning;

        for(i = 0; i < SOUND_MIXER_NRDEVICES; i++) {

- Bumping it to 3 or greater gives this mis-warning.


Cheers,
-- 
Ruslan Ermilov
FreeBSD committer
ru_at_FreeBSD.org

Received on Wed Mar 17 2004 - 11:05:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:47 UTC