* [Bug middle-end/37969] "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org)
2008-10-30 21:02 [Bug c++/37969] New: "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org) h dot mth at web dot de
@ 2008-10-30 21:23 ` rguenth at gcc dot gnu dot org
2008-10-30 23:17 ` h dot mth at web dot de
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-10-30 21:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-10-30 21:20 -------
We need preprocessed source as a testcase.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37969
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37969] "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org)
2008-10-30 21:02 [Bug c++/37969] New: "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org) h dot mth at web dot de
2008-10-30 21:23 ` [Bug middle-end/37969] " rguenth at gcc dot gnu dot org
@ 2008-10-30 23:17 ` h dot mth at web dot de
2008-10-30 23:24 ` rguenth at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: h dot mth at web dot de @ 2008-10-30 23:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from h dot mth at web dot de 2008-10-30 23:14 -------
Too big to attach. See:
http://geki.ath.cx/hacks/b3dgeom.ii
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37969
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37969] "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org)
2008-10-30 21:02 [Bug c++/37969] New: "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org) h dot mth at web dot de
2008-10-30 21:23 ` [Bug middle-end/37969] " rguenth at gcc dot gnu dot org
2008-10-30 23:17 ` h dot mth at web dot de
@ 2008-10-30 23:24 ` rguenth at gcc dot gnu dot org
2008-10-30 23:28 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-10-30 23:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-10-30 23:22 -------
Created an attachment (id=16590)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16590&action=view)
unincluded testcase
Fails with -O2 -funswitch-loops -m64
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37969
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37969] "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org)
2008-10-30 21:02 [Bug c++/37969] New: "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org) h dot mth at web dot de
` (2 preceding siblings ...)
2008-10-30 23:24 ` rguenth at gcc dot gnu dot org
@ 2008-10-30 23:28 ` rguenth at gcc dot gnu dot org
2008-10-30 23:51 ` rguenth at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-10-30 23:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2008-10-30 23:26 -------
Reducing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37969
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/37969] "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org)
2008-10-30 21:02 [Bug c++/37969] New: "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org) h dot mth at web dot de
` (3 preceding siblings ...)
2008-10-30 23:28 ` rguenth at gcc dot gnu dot org
@ 2008-10-30 23:51 ` rguenth at gcc dot gnu dot org
2008-10-30 23:53 ` [Bug tree-optimization/37969] [4.3 Regression] " rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-10-30 23:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2008-10-30 23:48 -------
Created an attachment (id=16592)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16592&action=view)
reduced testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37969
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/37969] [4.3 Regression] "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org)
2008-10-30 21:02 [Bug c++/37969] New: "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org) h dot mth at web dot de
` (4 preceding siblings ...)
2008-10-30 23:51 ` rguenth at gcc dot gnu dot org
@ 2008-10-30 23:53 ` rguenth at gcc dot gnu dot org
2008-10-31 10:44 ` h dot mth at web dot de
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-10-30 23:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2008-10-30 23:51 -------
Confirmed. I cannot reproduce this with 4.2 or 4.4 (but maybe that just
requires a more reduced testcase).
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|middle-end |tree-optimization
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Known to fail| |4.3.2
Known to work| |4.2.4 4.4.0
Last reconfirmed|0000-00-00 00:00:00 |2008-10-30 23:51:33
date| |
Summary|"-O2 -funswitch-loops" |[4.3 Regression] "-O2 -
|causes ICE in |funswitch-loops" causes ICE
|build_int_cst_wide, at |in build_int_cst_wide, at
|tree.c:891 (OpenOffice.org) |tree.c:891 (OpenOffice.org)
Target Milestone|--- |4.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37969
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/37969] [4.3 Regression] "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org)
2008-10-30 21:02 [Bug c++/37969] New: "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org) h dot mth at web dot de
` (5 preceding siblings ...)
2008-10-30 23:53 ` [Bug tree-optimization/37969] [4.3 Regression] " rguenth at gcc dot gnu dot org
@ 2008-10-31 10:44 ` h dot mth at web dot de
2008-10-31 10:57 ` h dot mth at web dot de
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: h dot mth at web dot de @ 2008-10-31 10:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from h dot mth at web dot de 2008-10-31 10:43 -------
Created an attachment (id=16596)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16596&action=view)
more reduced testcase
With one of these changes the ICE hides.
die@ana:/tmp $ cat hide01
--- b3dgeom.3.cpp.ice 2008-10-31 11:38:37.000000000 +0100
+++ b3dgeom.3.cpp 2008-10-31 11:38:46.000000000 +0100
@@ -1,7 +1,7 @@
#include <iostream>
class B3DRange {
double mnMinimum;
- double mnMaximum;
+// double mnMaximum;
public:
double getWidth() const {
if(mnMinimum)
die@ana:/tmp $ cat hide02
--- b3dgeom.3.cpp.ice 2008-10-31 11:38:37.000000000 +0100
+++ b3dgeom.3.cpp 2008-10-31 11:39:02.000000000 +0100
@@ -4,7 +4,7 @@
double mnMaximum;
public:
double getWidth() const {
- if(mnMinimum)
+ if(!mnMinimum)
return mnMinimum;
else
return 0.0;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37969
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/37969] [4.3 Regression] "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org)
2008-10-30 21:02 [Bug c++/37969] New: "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org) h dot mth at web dot de
` (6 preceding siblings ...)
2008-10-31 10:44 ` h dot mth at web dot de
@ 2008-10-31 10:57 ` h dot mth at web dot de
2008-11-03 11:27 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: h dot mth at web dot de @ 2008-10-31 10:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from h dot mth at web dot de 2008-10-31 10:55 -------
To hide the ICE from "reduced testcase":
$ diff -u b3dgeom.3.cpp.orig b3dgeom.3.cpp
--- b3dgeom.3.cpp.orig 2008-10-31 11:52:10.000000000 +0100
+++ b3dgeom.3.cpp 2008-10-31 11:52:46.000000000 +0100
@@ -41,9 +41,9 @@
}
typename Traits::DifferenceType getRange() const {
if(isEmpty())
- return Traits::neutral();
- else
return (mnMaximum - mnMinimum);
+ else
+ return Traits::neutral();
}
};
struct DoubleTraits {
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37969
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/37969] [4.3 Regression] "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org)
2008-10-30 21:02 [Bug c++/37969] New: "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org) h dot mth at web dot de
` (7 preceding siblings ...)
2008-10-31 10:57 ` h dot mth at web dot de
@ 2008-11-03 11:27 ` jakub at gcc dot gnu dot org
2008-11-06 13:25 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-11-03 11:27 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37969
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/37969] [4.3 Regression] "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org)
2008-10-30 21:02 [Bug c++/37969] New: "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org) h dot mth at web dot de
` (8 preceding siblings ...)
2008-11-03 11:27 ` jakub at gcc dot gnu dot org
@ 2008-11-06 13:25 ` rguenth at gcc dot gnu dot org
2008-11-06 13:30 ` rguenth at gcc dot gnu dot org
2008-11-06 14:05 ` rguenth at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-11-06 13:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from rguenth at gcc dot gnu dot org 2008-11-06 13:24 -------
We ICE during greg trying to do
#3 0x0000000000d86888 in force_const_mem (mode=DFmode, x=0x7ffff7e7c410)
at /space/rguenther/src/svn/gcc-4_3-branch/gcc/varasm.c:3535
3535 align = CONSTANT_ALIGNMENT (make_tree (type, x), align);
(gdb) l
3530 align = GET_MODE_ALIGNMENT (mode == VOIDmode ? word_mode : mode);
3531 #ifdef CONSTANT_ALIGNMENT
3532 {
3533 tree type = lang_hooks.types.type_for_mode (mode, 0);
3534 if (type != NULL_TREE)
3535 align = CONSTANT_ALIGNMENT (make_tree (type, x), align);
3536 }
3537 #endif
and call make_tree with (const_int 1 [0x1]) and double. Oops.
More reduced C testcase:
void foo(double);
void CreateDefaultTexture(double mnMinimum, double mnMaximum,
unsigned short nCreateWhat)
{
double d = 0.0;
for(;;)
{
if(nCreateWhat & (0x0001)
&& mnMinimum != 0.0)
d = mnMinimum;
if(nCreateWhat & (0x0002)
&& mnMaximum != 0.0)
d = mnMaximum;
foo(d);
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37969
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/37969] [4.3 Regression] "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org)
2008-10-30 21:02 [Bug c++/37969] New: "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org) h dot mth at web dot de
` (9 preceding siblings ...)
2008-11-06 13:25 ` rguenth at gcc dot gnu dot org
@ 2008-11-06 13:30 ` rguenth at gcc dot gnu dot org
2008-11-06 14:05 ` rguenth at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-11-06 13:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from rguenth at gcc dot gnu dot org 2008-11-06 13:29 -------
-fno-if-conversion fixes it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37969
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/37969] [4.3 Regression] "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org)
2008-10-30 21:02 [Bug c++/37969] New: "-O2 -funswitch-loops" causes ICE in build_int_cst_wide, at tree.c:891 (OpenOffice.org) h dot mth at web dot de
` (10 preceding siblings ...)
2008-11-06 13:30 ` rguenth at gcc dot gnu dot org
@ 2008-11-06 14:05 ` rguenth at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-11-06 14:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from rguenth at gcc dot gnu dot org 2008-11-06 14:03 -------
This is PR37489.
*** This bug has been marked as a duplicate of 37489 ***
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37969
^ permalink raw reply [flat|nested] 13+ messages in thread