public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
@ 2005-10-14 12:00 ` bonzini at gcc dot gnu dot org
  2005-10-14 12:13 ` rguenth at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2005-10-14 12:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from bonzini at gcc dot gnu dot org  2005-10-14 12:00 -------
I'm not sure this is really fixed.

With this test case,

float a = g();
printf ("%g\n", a);
printf ("%g\n", 2 / a);
printf ("%g\n", 3 / a);

the division is inserted before the *first* printf, while I believe it should
be inserted before the second.

The patch in pr23948 tries to insert reciprocals before the use point, rather
than after the def point, which would fix this as well.

Should this bug be reopened?


-- 

bonzini at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |23948


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


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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
  2005-10-14 12:00 ` [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math) bonzini at gcc dot gnu dot org
@ 2005-10-14 12:13 ` rguenth at gcc dot gnu dot org
  2005-10-14 12:16 ` rguenth at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-14 12:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2005-10-14 12:13 -------
Yes, I think so.  You don't even need printf, but any observable side-effect,
like a store to a global will do.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
  2005-10-14 12:00 ` [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math) bonzini at gcc dot gnu dot org
  2005-10-14 12:13 ` rguenth at gcc dot gnu dot org
@ 2005-10-14 12:16 ` rguenth at gcc dot gnu dot org
  2005-10-14 12:19 ` rguenth at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-14 12:16 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2005-
                   |                            |10/msg00687.html
           Severity|minor                       |major
 GCC target triplet|i686-pc-linux-gnu           |
           Keywords|                            |patch


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


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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2005-10-14 12:16 ` rguenth at gcc dot gnu dot org
@ 2005-10-14 12:19 ` rguenth at gcc dot gnu dot org
  2005-10-22 21:56 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-14 12:19 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|rguenth at gcc dot gnu dot  |bonzini at gcc dot gnu dot
                   |org                         |org
             Status|REOPENED                    |ASSIGNED


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


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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2005-10-14 12:19 ` rguenth at gcc dot gnu dot org
@ 2005-10-22 21:56 ` pinskia at gcc dot gnu dot org
  2005-10-31  4:20 ` mmitchel at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-22 21:56 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |critical


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


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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2005-10-22 21:56 ` pinskia at gcc dot gnu dot org
@ 2005-10-31  4:20 ` mmitchel at gcc dot gnu dot org
  2005-11-01 22:00 ` bonzini at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-31  4:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from mmitchel at gcc dot gnu dot org  2005-10-31 04:20 -------
This is a serious wrong-code problem; it's a showstopper.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1


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


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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2005-10-31  4:20 ` mmitchel at gcc dot gnu dot org
@ 2005-11-01 22:00 ` bonzini at gcc dot gnu dot org
  2005-11-01 22:17 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2005-11-01 22:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from bonzini at gcc dot gnu dot org  2005-11-01 22:00 -------
It is a showstopper, but a patch has been ready for months...  I admit the
patch is non-trivial, but the testcases are comprehensive.

Maybe it's best to wait until the branch and backport it a week later.  But I
don't think so.


-- 


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


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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2005-11-01 22:00 ` bonzini at gcc dot gnu dot org
@ 2005-11-01 22:17 ` rguenth at gcc dot gnu dot org
  2005-11-03 10:05 ` bonzini at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-11-01 22:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from rguenth at gcc dot gnu dot org  2005-11-01 22:17 -------
Note that the patch is in the suse compiler since three weeks now without a
problem.


-- 


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


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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2005-11-01 22:17 ` rguenth at gcc dot gnu dot org
@ 2005-11-03 10:05 ` bonzini at gcc dot gnu dot org
  2005-11-16 14:12 ` steven at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2005-11-03 10:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from bonzini at gcc dot gnu dot org  2005-11-03 10:05 -------
Note that while PR23948 could be fixed by hacking the current recip pass so
that it inserts the division into another basic block, this is not true of this
bug. 


-- 


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


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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2005-11-03 10:05 ` bonzini at gcc dot gnu dot org
@ 2005-11-16 14:12 ` steven at gcc dot gnu dot org
  2005-11-16 14:16 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-11-16 14:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from steven at gcc dot gnu dot org  2005-11-16 14:12 -------
Is this bug going anywhere???


-- 


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


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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2005-11-16 14:12 ` steven at gcc dot gnu dot org
@ 2005-11-16 14:16 ` rguenth at gcc dot gnu dot org
  2005-11-16 14:46 ` bonzini at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-11-16 14:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from rguenth at gcc dot gnu dot org  2005-11-16 14:16 -------
Nobody reviewed the patch AFAIK.  Still the patch hasn't caused any problems
sofar in the SUSE compiler.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2005-11-16 14:16 ` rguenth at gcc dot gnu dot org
@ 2005-11-16 14:46 ` bonzini at gcc dot gnu dot org
  2006-01-11 13:02 ` [Bug tree-optimization/23109] [4.1/4.2 " bonzini at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2005-11-16 14:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from bonzini at gcc dot gnu dot org  2005-11-16 14:46 -------
I have little hope of seeing this reviewed before the branch.  But it should be
put in 4.2 very early so that we backport it well before 4.1.0 is released.

BTW I think that 23948 and 24123 are way more severe than 23109 even though
this one is a wrong code bug.  These three bugs are three almost-showstoppers,
and are actually different manifestations of the same basic flaw (recip should
insert temporaries near the uses, not near the defs).  PR23948 makes
-ffast-math unusable in C++, and PR24123 generates really abysmal code (20x
slower!).

Paolo


-- 


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


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

* [Bug tree-optimization/23109] [4.1/4.2 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2005-11-16 14:46 ` bonzini at gcc dot gnu dot org
@ 2006-01-11 13:02 ` bonzini at gcc dot gnu dot org
  2006-01-11 14:29 ` [Bug tree-optimization/23109] [4.1 " bonzini at gcc dot gnu dot org
  2006-01-11 14:30 ` bonzini at gnu dot org
  14 siblings, 0 replies; 18+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2006-01-11 13:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from bonzini at gnu dot org  2006-01-11 13:02 -------
Subject: Bug 23109

Author: bonzini
Date: Wed Jan 11 13:02:18 2006
New Revision: 109578

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109578
Log:
gcc:
2006-01-11  Paolo Bonzini  <bonzini@gnu.org>

        PR tree-optimization/23109
        PR tree-optimization/23948
        PR tree-optimization/24123

        * Makefile.in (tree-ssa-math-opts.o): Adjust dependencies.
        * tree-cfg.c (single_noncomplex_succ): New.
        * tree-flow.h (single_noncomplex_succ): Declare it.
        * tree-ssa-math-opts.c (enum place_reciprocal): Remove.
        * tree-ssa-math-opts.c (enum place_reciprocal): Remove.
        (struct occurrence, occ_head, occ_pool, is_divide_by, compute_merit,
        insert_bb, register_division_in, insert_reciprocals,
        replace_reciprocal, free_bb): New.
        (execute_cse_reciprocals_1): Rewritten.
        (execute_cse_reciprocals): Adjust calls to execute_cse_reciprocals_1.
        Do not commit any edge insertion.  Always compute dominators and
        create the allocation pool.
        * target-def.h (TARGET_MIN_DIVISIONS_FOR_RECIP_MUL): New.
        * target.h (struct gcc_target): Add min_divistions_for_recip_mul.
        * targhooks.c (default_min_divistions_for_recip_mul): New.
        * targhooks.h (default_min_divistions_for_recip_mul): New prototype.
        * passes.c (init_optimization_passes): Run recip after tree loop
        optimizations.
        * doc/tm.texi (Misc): Document TARGET_MIN_DIVISIONS_FOR_RECIP_MUL.

gcc/testsuite:
2006-01-11  Paolo Bonzini  <bonzini@gnu.org>

        PR tree-optimization/23109
        PR tree-optimization/23948
        PR tree-optimization/24123

        * gcc.dg/tree-ssa/recip-3.c, gcc.dg/tree-ssa/recip-4.c,
        gcc.dg/tree-ssa/recip-5.c, gcc.dg/tree-ssa/recip-6.c,
        gcc.dg/tree-ssa/recip-7.c, gcc.dg/tree-ssa/pr23109.c,
        g++.dg/tree-ssa/pr23948.C: New testcases.
        * gcc.dg/tree-ssa/recip-2.c, gcc.dg/tree-ssa/pr23234.c: Provide
        three divisions in order to do the optimization.


Added:
    trunk/gcc/testsuite/g++.dg/tree-ssa/pr23948.C
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-4.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-6.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-7.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in
    trunk/gcc/doc/tm.texi
    trunk/gcc/passes.c
    trunk/gcc/target-def.h
    trunk/gcc/target.h
    trunk/gcc/targhooks.c
    trunk/gcc/targhooks.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr23234.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-2.c
    trunk/gcc/tree-cfg.c
    trunk/gcc/tree-flow.h
    trunk/gcc/tree-ssa-math-opts.c


-- 


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



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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2006-01-11 13:02 ` [Bug tree-optimization/23109] [4.1/4.2 " bonzini at gcc dot gnu dot org
@ 2006-01-11 14:29 ` bonzini at gcc dot gnu dot org
  2006-01-11 14:30 ` bonzini at gnu dot org
  14 siblings, 0 replies; 18+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2006-01-11 14:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from bonzini at gnu dot org  2006-01-11 14:29 -------
Subject: Bug 23109

Author: bonzini
Date: Wed Jan 11 14:29:29 2006
New Revision: 109586

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109586
Log:
gcc:
2006-01-11  Paolo Bonzini  <bonzini@gnu.org>

        PR tree-optimization/23109
        PR tree-optimization/23948
        PR tree-optimization/24123

        * Makefile.in (tree-ssa-math-opts.o): Adjust dependencies.
        * tree-cfg.c (single_noncomplex_succ): New.
        * tree-flow.h (single_noncomplex_succ): Declare it.
        * tree-ssa-math-opts.c (enum place_reciprocal): Remove.
        * tree-ssa-math-opts.c (enum place_reciprocal): Remove.
        (struct occurrence, occ_head, occ_pool, is_divide_by, compute_merit,
        insert_bb, register_division_in, insert_reciprocals,
        replace_reciprocal, free_bb): New.
        (execute_cse_reciprocals_1): Rewritten.
        (execute_cse_reciprocals): Adjust calls to execute_cse_reciprocals_1.
        Do not commit any edge insertion.  Always compute dominators and
        create the allocation pool.
        * target-def.h (TARGET_MIN_DIVISIONS_FOR_RECIP_MUL): New.
        * target.h (struct gcc_target): Add min_divistions_for_recip_mul.
        * targhooks.c (default_min_divistions_for_recip_mul): New.
        * targhooks.h (default_min_divistions_for_recip_mul): New prototype.
        * passes.c (init_optimization_passes): Run recip after tree loop
        optimizations.
        * doc/tm.texi (Misc): Document TARGET_MIN_DIVISIONS_FOR_RECIP_MUL.

gcc/testsuite:
2006-01-11  Paolo Bonzini  <bonzini@gnu.org>

        PR tree-optimization/23109
        PR tree-optimization/23948
        PR tree-optimization/24123

        * gcc.dg/tree-ssa/recip-3.c, gcc.dg/tree-ssa/recip-4.c,
        gcc.dg/tree-ssa/recip-5.c, gcc.dg/tree-ssa/recip-6.c,
        gcc.dg/tree-ssa/recip-7.c, gcc.dg/tree-ssa/pr23109.c,
        g++.dg/tree-ssa/pr23948.C: New testcases.
        * gcc.dg/tree-ssa/recip-2.c, gcc.dg/tree-ssa/pr23234.c: Provide
        three divisions in order to do the optimization.


Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/tree-ssa/pr23948.C
      - copied unchanged from r109578,
trunk/gcc/testsuite/g++.dg/tree-ssa/pr23948.C
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c
      - copied unchanged from r109578,
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr23109.c
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c
      - copied unchanged from r109578,
trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-3.c
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/recip-4.c
      - copied unchanged from r109578,
trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-4.c
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c
      - copied unchanged from r109578,
trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-5.c
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/recip-6.c
      - copied unchanged from r109578,
trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-6.c
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/recip-7.c
      - copied unchanged from r109578,
trunk/gcc/testsuite/gcc.dg/tree-ssa/recip-7.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/Makefile.in
    branches/gcc-4_1-branch/gcc/doc/tm.texi
    branches/gcc-4_1-branch/gcc/passes.c
    branches/gcc-4_1-branch/gcc/target-def.h
    branches/gcc-4_1-branch/gcc/target.h
    branches/gcc-4_1-branch/gcc/targhooks.c
    branches/gcc-4_1-branch/gcc/targhooks.h
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/pr23234.c
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/recip-2.c
    branches/gcc-4_1-branch/gcc/tree-cfg.c
    branches/gcc-4_1-branch/gcc/tree-flow.h
    branches/gcc-4_1-branch/gcc/tree-ssa-math-opts.c


-- 


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



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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
       [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2006-01-11 14:29 ` [Bug tree-optimization/23109] [4.1 " bonzini at gcc dot gnu dot org
@ 2006-01-11 14:30 ` bonzini at gnu dot org
  14 siblings, 0 replies; 18+ messages in thread
From: bonzini at gnu dot org @ 2006-01-11 14:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from bonzini at gnu dot org  2006-01-11 14:30 -------
patch committed to 4.1 too


-- 

bonzini at gnu dot org changed:

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


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



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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
  2005-07-28 10:43 [Bug c/23109] New: compiler generates wrong code leading to spurious division by zero p dot van-hoof at qub dot ac dot uk
  2005-07-28 16:56 ` [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math) pinskia at gcc dot gnu dot org
  2005-08-01  8:53 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-01  8:54 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-08-01  8:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rguenth at gcc dot gnu dot org  2005-08-01 08:54 -------
Fixed.

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


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


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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
  2005-07-28 10:43 [Bug c/23109] New: compiler generates wrong code leading to spurious division by zero p dot van-hoof at qub dot ac dot uk
  2005-07-28 16:56 ` [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math) pinskia at gcc dot gnu dot org
@ 2005-08-01  8:53 ` cvs-commit at gcc dot gnu dot org
  2005-08-01  8:54 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-01  8:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-08-01 08:53 -------
Subject: Bug 23109

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rguenth@gcc.gnu.org	2005-08-01 08:53:00

Modified files:
	gcc            : ChangeLog tree-ssa-loop-im.c 
	                 tree-ssa-math-opts.c 

Log message:
	2005-08-01  Richard Guenther  <rguenther@suse.de>
	
	PR tree-optimization/23109
	* tree-ssa-math-opts.c (execute_cse_reciprocals_1):
	If trapping math is in effect, use post-dominator information
	to check if we'd in any case reach a trapping point before
	doing the reciprocal insertion.
	(execute_cse_reciprocals): Compute post-dominators, if necessary.
	* tree-ssa-loop-im.c (determine_invariantness_stmt): RDIV
	expressions are invariant only if trapping math is not in effect.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9622&r2=2.9623
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop-im.c.diff?cvsroot=gcc&r1=2.48&r2=2.49
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-math-opts.c.diff?cvsroot=gcc&r1=2.2&r2=2.3



-- 


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


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

* [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math)
  2005-07-28 10:43 [Bug c/23109] New: compiler generates wrong code leading to spurious division by zero p dot van-hoof at qub dot ac dot uk
@ 2005-07-28 16:56 ` pinskia at gcc dot gnu dot org
  2005-08-01  8:53 ` cvs-commit at gcc dot gnu dot org
  2005-08-01  8:54 ` rguenth at gcc dot gnu dot org
  2 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-28 16:56 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
          Component|c                           |tree-optimization
            Summary|compiler generates wrong    |[4.1 Regression] compiler
                   |code leading to spurious    |generates wrong code leading
                   |division by zero            |to spurious division by zero
                   |                            |with -funsafe-math-
                   |                            |optimizations (instead of -
                   |                            |ftrapping-math)
   Target Milestone|---                         |4.1.0


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


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

end of thread, other threads:[~2006-01-11 14:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23109-1396@http.gcc.gnu.org/bugzilla/>
2005-10-14 12:00 ` [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math) bonzini at gcc dot gnu dot org
2005-10-14 12:13 ` rguenth at gcc dot gnu dot org
2005-10-14 12:16 ` rguenth at gcc dot gnu dot org
2005-10-14 12:19 ` rguenth at gcc dot gnu dot org
2005-10-22 21:56 ` pinskia at gcc dot gnu dot org
2005-10-31  4:20 ` mmitchel at gcc dot gnu dot org
2005-11-01 22:00 ` bonzini at gcc dot gnu dot org
2005-11-01 22:17 ` rguenth at gcc dot gnu dot org
2005-11-03 10:05 ` bonzini at gcc dot gnu dot org
2005-11-16 14:12 ` steven at gcc dot gnu dot org
2005-11-16 14:16 ` rguenth at gcc dot gnu dot org
2005-11-16 14:46 ` bonzini at gcc dot gnu dot org
2006-01-11 13:02 ` [Bug tree-optimization/23109] [4.1/4.2 " bonzini at gcc dot gnu dot org
2006-01-11 14:29 ` [Bug tree-optimization/23109] [4.1 " bonzini at gcc dot gnu dot org
2006-01-11 14:30 ` bonzini at gnu dot org
2005-07-28 10:43 [Bug c/23109] New: compiler generates wrong code leading to spurious division by zero p dot van-hoof at qub dot ac dot uk
2005-07-28 16:56 ` [Bug tree-optimization/23109] [4.1 Regression] compiler generates wrong code leading to spurious division by zero with -funsafe-math-optimizations (instead of -ftrapping-math) pinskia at gcc dot gnu dot org
2005-08-01  8:53 ` cvs-commit at gcc dot gnu dot org
2005-08-01  8:54 ` rguenth 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).