This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bootstrap failure in stage 2 on i386.c


> My builds for the last couple of days have all been failing in stage 2
> like so:
>
> /home/arth/src/gcc/gcc/config/i386/i386.c: In function ‘rtx_def* ix86_expand_bui
> ltin(tree, rtx, rtx, machine_mode, int)’:
> /home/arth/src/gcc/gcc/config/i386/i386.c:38407:18: error: ‘fcn’ may be used uni
> nitialized in this function [-Werror=maybe-uninitialized]
>         emit_insn (fcn (target, accum, wide_reg, mem));
>         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Anyone else seeing this?

I'm seeing it too. The code is new, but the 'may be used unitialized'
warning itself is, probably, an instance of the old PR36550.

I have reduced this testcase to:

//------------------------------------------------------------------------
/* { dg-do compile } */
/* { dg-options "-O2 -Wuninitialized" } */

int force_reg (int, int);
int expand_expr_real (int, int);
void f (int);

void ix86_expand_builtin (int fcode, int pmode)
{
  int fcn;
  int i, addr, masked = 1;

  switch (fcode)
    {
    case 1:
      fcn = 1;
      masked = 0;
      goto s4fma_expand;

    case 2:
      fcn = 2;
      masked = 0;
      goto s4fma_expand;

    case 4:
      {
      s4fma_expand:
	for (i = 0; i < 4; i++)
	  expand_expr_real (0, 0);

	addr = expand_expr_real (0, 0);
	force_reg ((pmode ? 0 : 2), addr);

	if (! masked)
	  f (fcn);
      }
    }
}
//------------------------------------------------------------------------

It fails with every gcc version down to 3.2 (the oldest one I could
compile on my amd64 box).  Note that this testcase is particularly
flaky: recent gccs will not issue a warning if one, for example, changes
the '2' to '1' in the force_reg() call.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]