I'd say the problem comes from the
int retval = retval;
in isr_tr_complete_low, which is supposedly inlined into the function
containing err = istr_tr_complete_low (mEp);
At least replacing that with retval = 0; makes the warning go away.
Reduced testcase for -Os -Wall:
struct A { struct A *a, *b; };
struct D { struct A e; };
struct E { unsigned char f; struct { struct A e; } g; };
struct F { struct E i[32]; };
extern int fn0 (void);
extern int fn1 (struct E *, struct D *);
static inline __attribute__ ((always_inline)) int
fn2 (const struct A *x)
{
return x->a == x;
}
static int
fn3 (struct E *x)
{
struct D *l, *m;
int retval = retval;
if (fn2 (&x->g.e))
return 0;
for (l = (struct D *) x->g.e.a, m = (struct D *) l->e.a; &l->e != &x->g.e; l
= m, m = (struct D *) m->e.a)
retval = fn1 (x, l);
return retval;
}
void
fn4 (struct F *x, unsigned k)
{
unsigned i;
for (i = 0; i < k; i++)
{
struct E *y = &x->i[i];
int err = -22;
err = fn3 (y);
if (y->f == 0)
{
if (err > 0)
err = fn0 ();
if (err < 0)
fn0 ();
}
}
}
I believe if fn2 returns zero, then the for body will be run at least
once, but perhaps it isn't simplified as such early enough.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1175744
Title:
[4.8 Regression] wrong -Wmaybe-uninitialized warning with -Os
To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1175744/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs