public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply
@ 2005-06-11 16:11 pinskia at gcc dot gnu dot org
  2005-06-11 16:12 ` [Bug tree-optimization/22018] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-11 16:11 UTC (permalink / raw)
  To: gcc-bugs

The following should not abort at any optimization level but does at -O2:
void abort (void);
void g(int);
void f(int l)
{
  unsigned i;
  for (i = 0; i < l; i++)
    {
      int y = i;
      int z = y*-32;
      g(z);
    }
}

void g(int i)
{
  static int x = 0;
  if (i == 0)
    x ++;
  if (x > 1)
    abort ();
}

int main(void)
{
  f(3);
  return 0;
}


This is reduced from the message at:
<http://gcc.gnu.org/ml/gcc-patches/2005-06/msg00458.html>.

-- 
           Summary: [4.1 Regression] VRP miscompiles multiply
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: wrong-code, build
          Severity: critical
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug tree-optimization/22018] [4.1 Regression] VRP miscompiles multiply
  2005-06-11 16:11 [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply pinskia at gcc dot gnu dot org
  2005-06-11 16:12 ` [Bug tree-optimization/22018] " pinskia at gcc dot gnu dot org
@ 2005-06-11 16:12 ` pinskia at gcc dot gnu dot org
  2005-06-11 16:14 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-11 16:12 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at libertysurf dot
                   |                            |fr


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


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

* [Bug tree-optimization/22018] [4.1 Regression] VRP miscompiles multiply
  2005-06-11 16:11 [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply pinskia at gcc dot gnu dot org
@ 2005-06-11 16:12 ` pinskia at gcc dot gnu dot org
  2005-06-11 16:12 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-11 16:12 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dnovillo at gcc dot gnu dot
                   |                            |org
   Target Milestone|---                         |4.1.0


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


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

* [Bug tree-optimization/22018] [4.1 Regression] VRP miscompiles multiply
  2005-06-11 16:11 [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply pinskia at gcc dot gnu dot org
  2005-06-11 16:12 ` [Bug tree-optimization/22018] " pinskia at gcc dot gnu dot org
  2005-06-11 16:12 ` pinskia at gcc dot gnu dot org
@ 2005-06-11 16:14 ` pinskia at gcc dot gnu dot org
  2005-06-11 16:20 ` ebotcazou at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-11 16:14 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |21916
              nThis|                            |


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


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

* [Bug tree-optimization/22018] [4.1 Regression] VRP miscompiles multiply
  2005-06-11 16:11 [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-06-11 16:14 ` pinskia at gcc dot gnu dot org
@ 2005-06-11 16:20 ` ebotcazou at gcc dot gnu dot org
  2005-06-12  2:06 ` danglin at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-06-11 16:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-06-11 16:19 -------
Thanks Andrew!


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|ebotcazou at libertysurf dot|ebotcazou at gcc dot gnu dot
                   |fr                          |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-06-11 16:19:58
               date|                            |


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


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

* [Bug tree-optimization/22018] [4.1 Regression] VRP miscompiles multiply
  2005-06-11 16:11 [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-06-11 16:20 ` ebotcazou at gcc dot gnu dot org
@ 2005-06-12  2:06 ` danglin at gcc dot gnu dot org
  2005-06-14  5:18 ` ebotcazou at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: danglin at gcc dot gnu dot org @ 2005-06-12  2:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From danglin at gcc dot gnu dot org  2005-06-12 02:06 -------
Test also aborts on hppa-2.0w-hp-hpux11.11 and hppa-unknown-linux-gnu
using stage1/xgcc (4.1.0).


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


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


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

* [Bug tree-optimization/22018] [4.1 Regression] VRP miscompiles multiply
  2005-06-11 16:11 [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-06-12  2:06 ` danglin at gcc dot gnu dot org
@ 2005-06-14  5:18 ` ebotcazou at gcc dot gnu dot org
  2005-06-15 11:33 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-06-14  5:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2005-06-14 05:17 -------
Diego, what about applying a quick fix?  The compiler has been miscompiled for 2
weeks on SPARC.


-- 


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


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

* [Bug tree-optimization/22018] [4.1 Regression] VRP miscompiles multiply
  2005-06-11 16:11 [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-06-14  5:18 ` ebotcazou at gcc dot gnu dot org
@ 2005-06-15 11:33 ` cvs-commit at gcc dot gnu dot org
  2005-06-15 11:34 ` dnovillo at gcc dot gnu dot org
  2005-06-16 21:25 ` cvs-commit at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-15 11:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-06-15 11:33 -------
Subject: Bug 22018

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	dnovillo@gcc.gnu.org	2005-06-15 11:33:14

Modified files:
	gcc            : ChangeLog tree-vrp.c 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/gcc.dg/tree-ssa: vrp13.c 
Added files:
	gcc/testsuite/gcc.dg/tree-ssa: pr22018.c 

Log message:
	PR 22018
	* tree-vrp.c (vrp_int_const_binop): New.
	(extract_range_from_binary_expr): Call it.
	Unify handling division and multiplication.
	
	testsuite/ChangeLog:
	
	PR 22018
	* gcc.dg/tree-ssa/vrp13.c: Add multiplication tests.
	* gcc.dg/tree-ssa/pr22018.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9150&r2=2.9151
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-vrp.c.diff?cvsroot=gcc&r1=2.27&r2=2.28
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5638&r2=1.5639
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr22018.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/vrp13.c.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


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


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

* [Bug tree-optimization/22018] [4.1 Regression] VRP miscompiles multiply
  2005-06-11 16:11 [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-06-15 11:33 ` cvs-commit at gcc dot gnu dot org
@ 2005-06-15 11:34 ` dnovillo at gcc dot gnu dot org
  2005-06-16 21:25 ` cvs-commit at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2005-06-15 11:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dnovillo at gcc dot gnu dot org  2005-06-15 11:34 -------

Fixed.  http://gcc.gnu.org/ml/gcc-patches/2005-06/msg01261.html

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


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


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

* [Bug tree-optimization/22018] [4.1 Regression] VRP miscompiles multiply
  2005-06-11 16:11 [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-06-15 11:34 ` dnovillo at gcc dot gnu dot org
@ 2005-06-16 21:25 ` cvs-commit at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-16 21:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-06-16 21:25 -------
Subject: Bug 22018

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	ebotcazou@gcc.gnu.org	2005-06-16 21:25:04

Modified files:
	gcc            : ChangeLog tree-vrp.c 

Log message:
	PR tree-optimization/22018
	* tree-vrp.c (vrp_int_const_binop): Overhaul handling of overflow.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9164&r2=2.9165
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-vrp.c.diff?cvsroot=gcc&r1=2.29&r2=2.30



-- 


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


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

end of thread, other threads:[~2005-06-16 21:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-11 16:11 [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply pinskia at gcc dot gnu dot org
2005-06-11 16:12 ` [Bug tree-optimization/22018] " pinskia at gcc dot gnu dot org
2005-06-11 16:12 ` pinskia at gcc dot gnu dot org
2005-06-11 16:14 ` pinskia at gcc dot gnu dot org
2005-06-11 16:20 ` ebotcazou at gcc dot gnu dot org
2005-06-12  2:06 ` danglin at gcc dot gnu dot org
2005-06-14  5:18 ` ebotcazou at gcc dot gnu dot org
2005-06-15 11:33 ` cvs-commit at gcc dot gnu dot org
2005-06-15 11:34 ` dnovillo at gcc dot gnu dot org
2005-06-16 21:25 ` cvs-commit 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).