public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/19579] New: -march=i686 generates a bogus program
@ 2005-01-23  0:29 abulmo at club-internet dot fr
  2005-01-23  0:31 ` [Bug target/19579] " pinskia at gcc dot gnu dot org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: abulmo at club-internet dot fr @ 2005-01-23  0:29 UTC (permalink / raw)
  To: gcc-bugs

The following program:

/*----------8<-----------------------*/
int printf(const char *, ...);

int f(void)
{
	return 0;	
}

void g(int a[])
{
	int n3, n0;
	int even;
	int diff = a[1] - a[0];

	n3 = 3;
	if ((n0 = f()) > 0) {
		even = diff + 2 * (n3 - n0);
	} else {
		even = diff + 2 * n3 + 1;
		if (even > 0) even++;
		else if (even < 0) even--;
	}

	if (even % 2 == 0) {
		printf("OK! even = %d\n", even);
	} else {
		printf("WRONG! even = %d\n", even);
	}
}

int main(void)
{
	int a[2] = {46, 16};
	g(a);
	return 0;
}
/*----------8<-----------------------*/

when compiled with:
    $ gcc-3.4.3 bug.c -o bug -O2 -march=i686

displays when executed:
    WRONG! even = -23

whereas when compiled with:
    $ gcc-3.4.3 bug.c -o bug -O2

gives the expected output:
    OK! even = -24

The bug is also exhibited when some others -march options are used, like
-march=athlon-xp.

gcc-3.4.3 -v output is:
Reading specs from
/home/richard/programs/gcc-3.4.3/lib/gcc/i686-pc-linux-gnu/3.4.3/specs
Configured with: /home/richard/tmp/gcc/gcc-3.4.3/configure
--prefix=/home/richard/programs/gcc-3.4.3 --program-suffix=-3.4.3
--enable-threads=posix --enable-languages=c,c++
Thread model: posix
gcc version 3.4.3

bug.i:
# 1 "bug.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "bug.c"
int printf(const char *, ...);

int f(void)
{
 return 0;
}

void g(int a[])
{
 int n3, n0;
 int even;
 int diff = a[1] - a[0];

 n3 = 3;
 if ((n0 = f()) > 0) {
  even = diff + 2 * (n3 - n0);
 } else {
  even = diff + 2 * n3 + 1;
  if (even > 0) even++;
  else if (even < 0) even--;
 }

 if (even % 2 == 0) {
  printf("OK! even = %d\n", even);
 } else {
  printf("WRONG! even = %d\n", even);
 }
}

int main(void)
{
 int a[2] = {46, 16};
 g(a);
 return 0;
}

-- 
           Summary: -march=i686 generates a bogus program
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: abulmo at club-internet dot fr
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: gcc-3.4.3/gentoo-linux/athlon-xp 2500+


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


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

* [Bug target/19579] -march=i686 generates a bogus program
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
@ 2005-01-23  0:31 ` pinskia at gcc dot gnu dot org
  2005-01-23 21:15 ` [Bug target/19579] [3.3/3.4 regression] " reichelt at gcc dot gnu dot org
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-23  0:31 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |target
           Keywords|                            |wrong-code


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


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

* [Bug target/19579] [3.3/3.4 regression] -march=i686 generates a bogus program
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
  2005-01-23  0:31 ` [Bug target/19579] " pinskia at gcc dot gnu dot org
@ 2005-01-23 21:15 ` reichelt at gcc dot gnu dot org
  2005-01-23 21:32 ` [Bug target/19579] [3.3/3.4/4.0 " belyshev at depni dot sinp dot msu dot ru
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-01-23 21:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-01-23 21:14 -------
Confirmed.

Here's a condensed testcase (compile with "-O2 -march=i686" on
i686-pc-linux-gnu):

================================================
int foo(int i, int j)
{
    int k = i+1;

    if (j)
    {
        if (k>0)
            k++;
        else
            if (k<0) k--;
    }

    return k;
}

int main()
{
    return foo(-2,1)+2;
}
================================================

The program should return 0, but returns 1 instead

The bug was introduced in gcc 3.3.4 and affects the 3.3 branch and the
3.4 branch. Mainline does not seem to be affected, but maybe the bug
is latent.

Ian, it looks like your patch for PR 1532 introduced the regression:
http://gcc.gnu.org/ml/gcc-cvs/2004-03/msg00264.html

Could you please have a look?


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian at airs dot com,
                   |                            |reichelt at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |critical
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   GCC host triplet|gcc-3.4.3/gentoo-           |i686-pc-linux-gnu
                   |linux/athlon-xp 2500+       |
 GCC target triplet|                            |i686-pc-linux-gnu
           Keywords|                            |monitored
      Known to fail|                            |3.3.4 3.3.5 3.4.0 3.4.3
      Known to work|                            |3.3.3 4.0.0
   Last reconfirmed|0000-00-00 00:00:00         |2005-01-23 21:14:58
               date|                            |
            Summary|-march=i686 generates a     |[3.3/3.4 regression] -
                   |bogus program               |march=i686 generates a bogus
                   |                            |program
   Target Milestone|---                         |3.4.4


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


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

* [Bug target/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
  2005-01-23  0:31 ` [Bug target/19579] " pinskia at gcc dot gnu dot org
  2005-01-23 21:15 ` [Bug target/19579] [3.3/3.4 regression] " reichelt at gcc dot gnu dot org
@ 2005-01-23 21:32 ` belyshev at depni dot sinp dot msu dot ru
  2005-01-23 22:06 ` steven at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2005-01-23 21:32 UTC (permalink / raw)
  To: gcc-bugs


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


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

* [Bug target/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (2 preceding siblings ...)
  2005-01-23 21:32 ` [Bug target/19579] [3.3/3.4/4.0 " belyshev at depni dot sinp dot msu dot ru
@ 2005-01-23 22:06 ` steven at gcc dot gnu dot org
  2005-01-23 22:08 ` steven at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-23 22:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-23 22:06 -------
The tree dump already looks wrong to me on mainline: 
 
g (k, l) 
{ 
  int j.0; 
  int j; 
  _Bool D.1460; 
  int D.1459; 
  int D.1458; 
  int D.1457; 
 
<bb 0>: 
  D.1457 = f (); 
  if (D.1457 != 0) goto <L0>; else goto <L1>; 
 
<L0>:; 
  j = k + l; 
  goto <bb 6> (<L5>); 
 
<L1>:; 
  j = k + l; 
  j.0 = j + 1; 
  if (j.0 > 0) goto <L2>; else goto <L3>; 
 
<L2>:; 
  j = j + 2; 
  goto <bb 6> (<L5>); 
 
<L3>:; 
  if (j.0 < 0) goto <L5>; else goto <L10>; 
 
<L10>:; 
  j = j.0; 
 
<L5>:; 
  if ((j & 1) != 0) goto <L8>; else goto <L9>; 
 
<L8>:; 
  abort (); 
 
<L9>:; 
  return; 
 
} 
 
Note how "j0 = j + 1" is assigned to j, which is "k + l" at that point, 
but the predecrement does not happen. 
 

-- 


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


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

* [Bug target/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (3 preceding siblings ...)
  2005-01-23 22:06 ` steven at gcc dot gnu dot org
@ 2005-01-23 22:08 ` steven at gcc dot gnu dot org
  2005-01-23 22:13 ` steven at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-23 22:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-23 22:08 -------
Oh bugger.  The tree dump is good. 
 

-- 


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


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

* [Bug target/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (4 preceding siblings ...)
  2005-01-23 22:08 ` steven at gcc dot gnu dot org
@ 2005-01-23 22:13 ` steven at gcc dot gnu dot org
  2005-01-23 22:14 ` pinskia at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-23 22:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-23 22:13 -------
"-O -frerun-cse-after-loop" is enough to reproduce it on AMD64. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   GCC host triplet|i686-pc-linux-gnu           |
 GCC target triplet|i686-pc-linux-gnu           |
   Target Milestone|3.4.4                       |3.3.6


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


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

* [Bug target/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (5 preceding siblings ...)
  2005-01-23 22:13 ` steven at gcc dot gnu dot org
@ 2005-01-23 22:14 ` pinskia at gcc dot gnu dot org
  2005-01-23 22:25 ` kazu at cs dot umass dot edu
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-23 22:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-23 22:14 -------
As per GDR (a while back) moving 3.4.x regressions to the target milestone for 3.4.x.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gdr at gcc dot gnu dot org
   Target Milestone|3.3.6                       |3.4.4


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


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

* [Bug target/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (6 preceding siblings ...)
  2005-01-23 22:14 ` pinskia at gcc dot gnu dot org
@ 2005-01-23 22:25 ` kazu at cs dot umass dot edu
  2005-01-23 23:50 ` [Bug rtl-optimization/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program for x86* steven at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-01-23 22:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kazu at cs dot umass dot edu  2005-01-23 22:25 -------
On my machine, Athlon XP 2500 running Fedora Core 3,

-O2 -march=i686 produces OK!, but
-O2 -march=athlon-xp produces WRONG!

if the original testcase is compiled with the current mainline.

-- 


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


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

* [Bug rtl-optimization/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (7 preceding siblings ...)
  2005-01-23 22:25 ` kazu at cs dot umass dot edu
@ 2005-01-23 23:50 ` steven at gcc dot gnu dot org
  2005-01-24  0:02 ` steven at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-23 23:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-23 23:50 -------
>From the dump, I think the cse_condition_code_reg code is OK, but it  
is exposing a bug elsewhere.  

-- 


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


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

* [Bug rtl-optimization/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (8 preceding siblings ...)
  2005-01-23 23:50 ` [Bug rtl-optimization/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program for x86* steven at gcc dot gnu dot org
@ 2005-01-24  0:02 ` steven at gcc dot gnu dot org
  2005-01-24  0:35 ` steven at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-24  0:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-24 00:02 -------
This looks more like an if-conversion bug in if-after-combine. 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sayle at gcc dot gnu dot org


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


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

* [Bug rtl-optimization/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (9 preceding siblings ...)
  2005-01-24  0:02 ` steven at gcc dot gnu dot org
@ 2005-01-24  0:35 ` steven at gcc dot gnu dot org
  2005-01-24  9:40 ` steven at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-24  0:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-24 00:34 -------
For the RTL illiterate like myself: 
 
BB2: j = k + l 
     j0 = j + 1 
     flags = (j0 <= 0) 
     if (flags) goto BB4 else goto BB3 
     flags are in live_at_end 
 
BB3: flags are not in live_at_start 
     j = j + 2 [ kills the flags ] 
     goto BB5 
     flags are not in live_at_end 
 
BB4: flags are in live_at_start 
     j = (flags) ? j : j0 
     goto BB5 
     flags are not in live_at_end 
 
BB5: just an uninteresting join block 
 
 
Then if-conversion basically merges BB2, BB3, and BB4 to give: 
 
BB2: j = k + l 
     j0 = j + 1 
     r65 = j + 2 [ kills the flags ] 
     r66 = (flags) ? j : j0 
     flags = (j0 <= 0) 
     j = (flags) ? r66 : r65 
     falthru to BB5 
 
BB5: just an uninteresting former join block 
 

-- 


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


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

* [Bug rtl-optimization/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (10 preceding siblings ...)
  2005-01-24  0:35 ` steven at gcc dot gnu dot org
@ 2005-01-24  9:40 ` steven at gcc dot gnu dot org
  2005-01-24 10:30 ` jakub at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-24  9:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-24 09:40 -------
wrong-code bug, should be P1. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |steven at gcc dot gnu dot
                   |                            |org
           Priority|P2                          |P1


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


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

* [Bug rtl-optimization/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (11 preceding siblings ...)
  2005-01-24  9:40 ` steven at gcc dot gnu dot org
@ 2005-01-24 10:30 ` jakub at gcc dot gnu dot org
  2005-01-24 11:31 ` jakub at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-01-24 10:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jakub at gcc dot gnu dot org  2005-01-24 10:30 -------
Regarding the question in #11:
LOG_LINKS only point to instructions in the same basic block:
/* Set up in flow.c; empty before then.
   Holds a chain of INSN_LIST rtx's whose first operands point at
   previous insns with direct data-flow connections to this one.
   That means that those insns set variables whose next use is in this insn.
   They are always in the same basic block as this insn.  */
#define LOG_LINKS(INSN) XEXP(INSN, 7)


-- 


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


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

* [Bug rtl-optimization/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (12 preceding siblings ...)
  2005-01-24 10:30 ` jakub at gcc dot gnu dot org
@ 2005-01-24 11:31 ` jakub at gcc dot gnu dot org
  2005-01-24 14:13 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-01-24 11:31 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-01-23 21:14:58         |2005-01-24 11:30:57
               date|                            |


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


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

* [Bug rtl-optimization/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (13 preceding siblings ...)
  2005-01-24 11:31 ` jakub at gcc dot gnu dot org
@ 2005-01-24 14:13 ` pinskia at gcc dot gnu dot org
  2005-01-25 23:09 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-24 14:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-24 14:13 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-01/msg01713.html>.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug rtl-optimization/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (14 preceding siblings ...)
  2005-01-24 14:13 ` pinskia at gcc dot gnu dot org
@ 2005-01-25 23:09 ` cvs-commit at gcc dot gnu dot org
  2005-01-26  1:19 ` [Bug rtl-optimization/19579] [3.3/3.4 " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-25 23:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-01-25 23:09 -------
Subject: Bug 19579

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jakub@gcc.gnu.org	2005-01-25 23:09:10

Modified files:
	gcc            : ChangeLog ifcvt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/execute: 20050124-1.c 

Log message:
	PR rtl-optimization/19579
	* ifcvt.c (noce_try_cmove_arith): If emitting instructions to set up
	both A and B, see if they don't clobber registers the other expr uses.
	
	* gcc.c-torture/execute/20050124-1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7273&r2=2.7274
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ifcvt.c.diff?cvsroot=gcc&r1=1.178&r2=1.179
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4936&r2=1.4937
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20050124-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug rtl-optimization/19579] [3.3/3.4 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (15 preceding siblings ...)
  2005-01-25 23:09 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-26  1:19 ` pinskia at gcc dot gnu dot org
  2005-02-10 20:35 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-26  1:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-26 01:19 -------
Fixed at least on the mainline.

-- 
           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                       |3.3.3 4.0.0
            Summary|[3.3/3.4/4.0 regression] -  |[3.3/3.4 regression] -
                   |march=i686 generates a bogus|march=i686 generates a bogus
                   |program for x86*            |program for x86*


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


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

* [Bug rtl-optimization/19579] [3.3/3.4 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (16 preceding siblings ...)
  2005-01-26  1:19 ` [Bug rtl-optimization/19579] [3.3/3.4 " pinskia at gcc dot gnu dot org
@ 2005-02-10 20:35 ` cvs-commit at gcc dot gnu dot org
  2005-02-10 20:42 ` [Bug rtl-optimization/19579] [3.3 " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-10 20:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-10 17:11 -------
Subject: Bug 19579

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	jakub@gcc.gnu.org	2005-02-10 17:11:13

Modified files:
	gcc            : ChangeLog ifcvt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/execute: 20050124-1.c 

Log message:
	PR rtl-optimization/19579
	* ifcvt.c (noce_try_cmove_arith): If emitting instructions to set up
	both A and B, see if they don't clobber registers the other expr uses.
	
	* gcc.c-torture/execute/20050124-1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.795&r2=2.2326.2.796
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ifcvt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.136.4.1&r2=1.136.4.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.358&r2=1.3389.2.359
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20050124-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.12.1



-- 


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


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

* [Bug rtl-optimization/19579] [3.3 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (17 preceding siblings ...)
  2005-02-10 20:35 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-10 20:42 ` pinskia at gcc dot gnu dot org
  2005-04-28  8:34 ` gdr at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-10 20:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-10 17:19 -------
Fixed also in 3.4.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|3.3.3 4.0.0                 |3.3.3 4.0.0 3.4.4
            Summary|[3.3/3.4 regression] -      |[3.3 regression] -march=i686
                   |march=i686 generates a bogus|generates a bogus program
                   |program for x86*            |for x86*
   Target Milestone|3.4.4                       |3.3.6


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


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

* [Bug rtl-optimization/19579] [3.3 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (18 preceding siblings ...)
  2005-02-10 20:42 ` [Bug rtl-optimization/19579] [3.3 " pinskia at gcc dot gnu dot org
@ 2005-04-28  8:34 ` gdr at gcc dot gnu dot org
  2005-05-01  7:23 ` cvs-commit at gcc dot gnu dot org
  2005-05-01 13:17 ` pinskia at gcc dot gnu dot org
  21 siblings, 0 replies; 23+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-04-28  8:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2005-04-28 08:34 -------
(In reply to comment #15)
> Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-01/msg01713.html>.

Roger --

  Are you still confident in this patch (as you said last Jan) for 3.3.6?

-- Gaby


-- 


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


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

* [Bug rtl-optimization/19579] [3.3 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (19 preceding siblings ...)
  2005-04-28  8:34 ` gdr at gcc dot gnu dot org
@ 2005-05-01  7:23 ` cvs-commit at gcc dot gnu dot org
  2005-05-01 13:17 ` pinskia at gcc dot gnu dot org
  21 siblings, 0 replies; 23+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-01  7:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-05-01 07:23 -------
Subject: Bug 19579

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	sayle@gcc.gnu.org	2005-05-01 07:23:20

Modified files:
	gcc            : ChangeLog ifcvt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/execute: 20050124-1.c 

Log message:
	PR rtl-optimization/19579
	Backport from mainline
	2005-01-26  Jakub Jelinek  <jakub@redhat.com>
	* ifcvt.c (noce_try_cmove_arith): If emitting instructions to set up
	both A and B, see if they don't clobber registers the other expr uses.
	
	* gcc.c-torture/execute/20050124-1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.1067&r2=1.16114.2.1068
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ifcvt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.105.4.9&r2=1.105.4.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.399&r2=1.2261.2.400
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20050124-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.32.1



-- 


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


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

* [Bug rtl-optimization/19579] [3.3 regression] -march=i686 generates a bogus program for x86*
  2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
                   ` (20 preceding siblings ...)
  2005-05-01  7:23 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-01 13:17 ` pinskia at gcc dot gnu dot org
  21 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-01 13:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-01 13:17 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2005-05-01 13:17 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-23  0:29 [Bug c/19579] New: -march=i686 generates a bogus program abulmo at club-internet dot fr
2005-01-23  0:31 ` [Bug target/19579] " pinskia at gcc dot gnu dot org
2005-01-23 21:15 ` [Bug target/19579] [3.3/3.4 regression] " reichelt at gcc dot gnu dot org
2005-01-23 21:32 ` [Bug target/19579] [3.3/3.4/4.0 " belyshev at depni dot sinp dot msu dot ru
2005-01-23 22:06 ` steven at gcc dot gnu dot org
2005-01-23 22:08 ` steven at gcc dot gnu dot org
2005-01-23 22:13 ` steven at gcc dot gnu dot org
2005-01-23 22:14 ` pinskia at gcc dot gnu dot org
2005-01-23 22:25 ` kazu at cs dot umass dot edu
2005-01-23 23:50 ` [Bug rtl-optimization/19579] [3.3/3.4/4.0 regression] -march=i686 generates a bogus program for x86* steven at gcc dot gnu dot org
2005-01-24  0:02 ` steven at gcc dot gnu dot org
2005-01-24  0:35 ` steven at gcc dot gnu dot org
2005-01-24  9:40 ` steven at gcc dot gnu dot org
2005-01-24 10:30 ` jakub at gcc dot gnu dot org
2005-01-24 11:31 ` jakub at gcc dot gnu dot org
2005-01-24 14:13 ` pinskia at gcc dot gnu dot org
2005-01-25 23:09 ` cvs-commit at gcc dot gnu dot org
2005-01-26  1:19 ` [Bug rtl-optimization/19579] [3.3/3.4 " pinskia at gcc dot gnu dot org
2005-02-10 20:35 ` cvs-commit at gcc dot gnu dot org
2005-02-10 20:42 ` [Bug rtl-optimization/19579] [3.3 " pinskia at gcc dot gnu dot org
2005-04-28  8:34 ` gdr at gcc dot gnu dot org
2005-05-01  7:23 ` cvs-commit at gcc dot gnu dot org
2005-05-01 13:17 ` pinskia at gcc dot gnu dot org

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