public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/11771] New: [3.4 regression] Segfault with simple double arithmetics
@ 2003-08-02 12:17 falk at debian dot org
  2003-08-03 14:34 ` [Bug middle-end/11771] " levon at movementarian dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: falk at debian dot org @ 2003-08-02 12:17 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [3.4 regression] Segfault with simple double arithmetics
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: critical
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: falk at debian dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: alphaev68-unknown-linux-gnu
  GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu

% cat foo.c 
double f(double x) {
    return -(1 - x) + (x ? -(1 - x) : 0);
}

% gcc -v -c foo.c
Reading specs from
/usr/local/stow/gcc-2003.08.02/bin/../lib/gcc/alphaev68-unknown-linux-gnu/3.4/specs
Configured with: ../configure --enable-languages=c++
Thread model: posix
gcc version 3.4 20030801 (experimental)
 /usr/local/stow/gcc-2003.08.02/bin/../libexec/gcc/alphaev68-unknown-linux-gnu/3.4/cc1 -quiet -v -iprefix /usr/local/stow/gcc-2003.08.02/bin/../lib/gcc/alphaev68-unknown-linux-gnu/3.4/ foo.c -quiet -dumpbase foo.c -mcpu=ev67 -auxbase foo -version -o /tmp/ccYl8EBT.s
ignoring nonexistent directory
"/usr/local/stow/gcc-2003.08.02/bin/../lib/gcc/alphaev68-unknown-linux-gnu/3.4/../../../../alphaev68-unknown-linux-gnu/include"
ignoring nonexistent directory "NONE/include"
ignoring duplicate directory
"/usr/local/lib/gcc/alphaev68-unknown-linux-gnu/3.4/include"
ignoring nonexistent directory
"/usr/local/lib/gcc/alphaev68-unknown-linux-gnu/3.4/../../../../alphaev68-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/stow/gcc-2003.08.02/bin/../lib/gcc/alphaev68-unknown-linux-gnu/3.4/include
 /usr/local/include
 /usr/include
End of search list.
GNU C version 3.4 20030801 (experimental) (alphaev68-unknown-linux-gnu)
        compiled by GNU C version 3.4 20030801 (experimental).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64090
gcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Also occurs with g++. 3.3 works fine.


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

* [Bug middle-end/11771] [3.4 regression] Segfault with simple double arithmetics
  2003-08-02 12:17 [Bug middle-end/11771] New: [3.4 regression] Segfault with simple double arithmetics falk at debian dot org
@ 2003-08-03 14:34 ` levon at movementarian dot org
  2003-08-03 14:38 ` pinskia at physics dot uc dot edu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: levon at movementarian dot org @ 2003-08-03 14:34 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


levon at movementarian dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |levon at movementarian dot
                   |                            |org


------- Additional Comments From levon at movementarian dot org  2003-08-03 14:34 -------
I'm seeing this on i686-pc-linux-gnu. There's an inifinite recursion :

#2824 0x081833d1 in fold (expr=0x4032e3c0) at ../../gcc/fold-const.c:5824
#2825 0x081833d1 in fold (expr=0x4032e3a8) at ../../gcc/fold-const.c:5824
#2826 0x081833d1 in fold (expr=0x4032e390) at ../../gcc/fold-const.c:5824
...

(gdb) list fold-const.c:5824
5819                  || (INTEGRAL_TYPE_P (type) && flag_wrapv && !flag_trapv))
5820              && negate_expr_p (arg1)
5821              && (! TREE_SIDE_EFFECTS (arg0) || TREE_CONSTANT (arg1))
5822              && (! TREE_SIDE_EFFECTS (arg1) || TREE_CONSTANT (arg0)))
5823            return fold (build (MINUS_EXPR, type, negate_expr (arg1),
5824                                TREE_OPERAND (arg0, 0)));
5825
5826          if (! FLOAT_TYPE_P (type))
5827            {
5828              if (! wins && integer_zerop (arg0))


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

* [Bug middle-end/11771] [3.4 regression] Segfault with simple double arithmetics
  2003-08-02 12:17 [Bug middle-end/11771] New: [3.4 regression] Segfault with simple double arithmetics falk at debian dot org
  2003-08-03 14:34 ` [Bug middle-end/11771] " levon at movementarian dot org
@ 2003-08-03 14:38 ` pinskia at physics dot uc dot edu
  2003-08-03 18:46 ` roger at eyesopen dot com
  2003-08-05  3:23 ` pinskia at physics dot uc dot edu
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-03 14:38 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
  GCC build triplet|alphaev68-unknown-linux-gnu |
   GCC host triplet|alphaev68-unknown-linux-gnu |
 GCC target triplet|alphaev68-unknown-linux-gnu |*-*-*
           Priority|P2                          |P1
   Last reconfirmed|0000-00-00 00:00:00         |2003-08-03 14:38:35
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-08-03 14:38 -------
I can confirm this on powerpc-apple-dariwn6.6 in the mainline (20030802).


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

* [Bug middle-end/11771] [3.4 regression] Segfault with simple double arithmetics
  2003-08-02 12:17 [Bug middle-end/11771] New: [3.4 regression] Segfault with simple double arithmetics falk at debian dot org
  2003-08-03 14:34 ` [Bug middle-end/11771] " levon at movementarian dot org
  2003-08-03 14:38 ` pinskia at physics dot uc dot edu
@ 2003-08-03 18:46 ` roger at eyesopen dot com
  2003-08-05  3:23 ` pinskia at physics dot uc dot edu
  3 siblings, 0 replies; 5+ messages in thread
From: roger at eyesopen dot com @ 2003-08-03 18:46 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


roger at eyesopen dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |roger at eyesopen dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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

* [Bug middle-end/11771] [3.4 regression] Segfault with simple double arithmetics
  2003-08-02 12:17 [Bug middle-end/11771] New: [3.4 regression] Segfault with simple double arithmetics falk at debian dot org
                   ` (2 preceding siblings ...)
  2003-08-03 18:46 ` roger at eyesopen dot com
@ 2003-08-05  3:23 ` pinskia at physics dot uc dot edu
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-05  3:23 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

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


------- Additional Comments From pinskia at physics dot uc dot edu  2003-08-05 03:23 -------
Fixed by <http://gcc.gnu.org/ml/gcc-cvs/2003-08/msg00208.html>
 2003-08-04  Roger Sayle
 
	PR middle-end/11771
	* fold-const.c (negate_expr_p <MINUS_EXPR>): Change to match the
	logic in negate_expr, i.e. we don't invert (A-B) for floating
	point types unless flag_unsafe_math_optimizations.

Do not know why the log_* was not working.


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

end of thread, other threads:[~2003-08-05  3:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-02 12:17 [Bug middle-end/11771] New: [3.4 regression] Segfault with simple double arithmetics falk at debian dot org
2003-08-03 14:34 ` [Bug middle-end/11771] " levon at movementarian dot org
2003-08-03 14:38 ` pinskia at physics dot uc dot edu
2003-08-03 18:46 ` roger at eyesopen dot com
2003-08-05  3:23 ` pinskia at physics dot uc dot edu

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