This is the mail archive of the gcc-bugs@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]

[Bug target/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program


------- Additional Comments From belyshev at depni dot sinp dot msu dot ru  2005-01-23 21:32 -------
I can confirm this bug on mainline with this testcase:
------------------------------------------------------------------------------
void abort (void);

int f ()
{
  return 0;
}

void __attribute__((noinline)) g (int k, int l)
{
  int j;
  
  if (f ())
    {
      j = k + l;
    }
  else
    {
      j = k + l + 1;
      if (j > 0)
	j++;
      else
	if (j < 0)
	  j--;
    }

  if (j % 2 != 0)
    abort ();
}

int main ()
{
  g (-2, 0);
  return 0;
}
------------------------------------------------------------------------------

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|3.3.4 3.3.5 3.4.0 3.4.3     |3.3.4 3.3.5 3.4.0 3.4.3
                   |                            |4.0.0
      Known to work|3.3.3 4.0.0                 |3.3.3
            Summary|[3.3/3.4 regression] -      |[3.3/3.4/4.0 regression] -
                   |march=i686 generates a bogus|march=i686 generates a bogus
                   |program                     |program


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19579


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