public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/23234] New: ICE in verify_flow_info()
@ 2005-08-04 17:44 uttamp at us dot ibm dot com
2005-08-04 17:55 ` [Bug tree-optimization/23234] [4.1 Regression] " pinskia at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: uttamp at us dot ibm dot com @ 2005-08-04 17:44 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1462 bytes --]
Following test program causes an internal compiler error,
$ cat y.c
double func ( double a, double b, double c)
{
double x0, x1, y0, y1;
int type = 0;
double ar;
if(b==0.0){
x0 = -c/a;
return( x0 > 1.0? 1.0 : ( x0 < 0.0 ? 0.0: x0));
}
if(a==0.0) {
y0 = -c/b;
return( y0 > 1.0? 1.0 : ( y0 < 0.0 ? 0.0: y0));
}
x0 = -c/a;
y0 = -c/b;
type = ((y0>=1.0)&&(y1>=1.0) ? 16 : type);
switch(type){
case 3: ar = (0.5*(y0+y1)); break;
}
return ar;
}
$ /opt/mline-20050802/bin/gcc -c -ffast-math -O2 y.c
$ y.c: In function âfuncâ:
y.c:2: error: control flow in the middle of basic block 0
y.c:2: internal compiler error: verify_flow_info failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
This test case works with gcc_cvs code till 20050801. This is also a reason to
fail eon benchmark.
--
Summary: ICE in verify_flow_info()
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: uttamp at us dot ibm dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc-linux
GCC host triplet: powerpc-linux
GCC target triplet: powerpc-linu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23234
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/23234] [4.1 Regression] ICE in verify_flow_info()
2005-08-04 17:44 [Bug tree-optimization/23234] New: ICE in verify_flow_info() uttamp at us dot ibm dot com
@ 2005-08-04 17:55 ` pinskia at gcc dot gnu dot org
2005-08-04 17:57 ` uttamp at us dot ibm dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-04 17:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-04 17:55 -------
Confirmed, reduced testcase:
double func ( double a, double b, double c)
{
double y0;
if(a==0.0) {
y0 = -c/b;
return y0;
}
y0 = -c/b;
return y0;
}
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC build triplet|powerpc-linux |
GCC host triplet|powerpc-linux |
GCC target triplet|powerpc-linu |
Keywords| |ice-on-valid-code
Known to fail| |4.1.0
Known to work| |4.0.0
Last reconfirmed|0000-00-00 00:00:00 |2005-08-04 17:55:39
date| |
Summary|ICE in verify_flow_info() |[4.1 Regression] ICE in
| |verify_flow_info()
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23234
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/23234] [4.1 Regression] ICE in verify_flow_info()
2005-08-04 17:44 [Bug tree-optimization/23234] New: ICE in verify_flow_info() uttamp at us dot ibm dot com
2005-08-04 17:55 ` [Bug tree-optimization/23234] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-08-04 17:57 ` uttamp at us dot ibm dot com
2005-08-06 14:34 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: uttamp at us dot ibm dot com @ 2005-08-04 17:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From uttamp at us dot ibm dot com 2005-08-04 17:57 -------
(In reply to comment #1)
> Confirmed, reduced testcase:
> double func ( double a, double b, double c)
> {
> double y0;
> if(a==0.0) {
> y0 = -c/b;
> return y0;
> }
> y0 = -c/b;
> return y0;
> }
nice. ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23234
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/23234] [4.1 Regression] ICE in verify_flow_info()
2005-08-04 17:44 [Bug tree-optimization/23234] New: ICE in verify_flow_info() uttamp at us dot ibm dot com
2005-08-04 17:55 ` [Bug tree-optimization/23234] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-08-04 17:57 ` uttamp at us dot ibm dot com
@ 2005-08-06 14:34 ` pinskia at gcc dot gnu dot org
2005-08-07 15:19 ` steven at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-06 14:34 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23234
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/23234] [4.1 Regression] ICE in verify_flow_info()
2005-08-04 17:44 [Bug tree-optimization/23234] New: ICE in verify_flow_info() uttamp at us dot ibm dot com
` (2 preceding siblings ...)
2005-08-06 14:34 ` pinskia at gcc dot gnu dot org
@ 2005-08-07 15:19 ` steven at gcc dot gnu dot org
2005-08-07 15:52 ` steven at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-08-07 15:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-08-07 15:19 -------
I'll take a look at this.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |steven at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-08-04 17:55:39 |2005-08-07 15:19:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23234
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/23234] [4.1 Regression] ICE in verify_flow_info()
2005-08-04 17:44 [Bug tree-optimization/23234] New: ICE in verify_flow_info() uttamp at us dot ibm dot com
` (3 preceding siblings ...)
2005-08-07 15:19 ` steven at gcc dot gnu dot org
@ 2005-08-07 15:52 ` steven at gcc dot gnu dot org
2005-08-07 16:13 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-08-07 15:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-08-07 15:52 -------
Index: tree-ssa-math-opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-math-opts.c,v
retrieving revision 2.4
diff -u -p -r2.4 tree-ssa-math-opts.c
--- tree-ssa-math-opts.c 1 Aug 2005 08:58:25 -0000 2.4
+++ tree-ssa-math-opts.c 7 Aug 2005 15:52:07 -0000
@@ -56,14 +56,15 @@ gate_cse_reciprocals (void)
/* Check if DEF's uses include more than one floating-point division,
and if so replace them by multiplications with the reciprocal. If
- PHI is true, insert the reciprocal calculation before BSI, otherwise
- insert it after and move BSI to the new statement.
+ BEFORE_BSI is true, insert the reciprocal calculation before BSI,
+ otherwise insert it after and move BSI to the new statement.
Does not check the type of DEF, nor that DEF is a GIMPLE register.
This is done in the caller for speed, because otherwise this routine
would be called for every definition and phi node. */
static void
-execute_cse_reciprocals_1 (block_stmt_iterator *bsi, tree def, bool phi)
+execute_cse_reciprocals_1 (block_stmt_iterator *bsi,
+ tree def, bool before_bsi)
{
use_operand_p use_p;
imm_use_iterator use_iter;
@@ -99,7 +100,7 @@ execute_cse_reciprocals_1 (block_stmt_it
fold_build2 (RDIV_EXPR, type, build_real (type, dconst1),
def));
- if (phi)
+ if (before_bsi)
bsi_insert_before (bsi, new_stmt, BSI_SAME_STMT);
else
bsi_insert_after (bsi, new_stmt, BSI_NEW_STMT);
@@ -133,7 +134,7 @@ execute_cse_reciprocals (void)
{
block_stmt_iterator bsi;
bsi = bsi_start (single_succ (ENTRY_BLOCK_PTR));
- execute_cse_reciprocals_1 (&bsi, default_def (arg), false);
+ execute_cse_reciprocals_1 (&bsi, default_def (arg), true);
}
FOR_EACH_BB (bb)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23234
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/23234] [4.1 Regression] ICE in verify_flow_info()
2005-08-04 17:44 [Bug tree-optimization/23234] New: ICE in verify_flow_info() uttamp at us dot ibm dot com
` (4 preceding siblings ...)
2005-08-07 15:52 ` steven at gcc dot gnu dot org
@ 2005-08-07 16:13 ` steven at gcc dot gnu dot org
2005-08-09 3:28 ` cvs-commit at gcc dot gnu dot org
2005-08-09 4:36 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-08-07 16:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-08-07 16:13 -------
That patch from comment #4 is also not right. See the URL for something
that I expect to be correct (fingers crossed while it's trying to pass
testing... ;-)
--
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2005-
| |08/msg00402.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23234
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/23234] [4.1 Regression] ICE in verify_flow_info()
2005-08-04 17:44 [Bug tree-optimization/23234] New: ICE in verify_flow_info() uttamp at us dot ibm dot com
` (5 preceding siblings ...)
2005-08-07 16:13 ` steven at gcc dot gnu dot org
@ 2005-08-09 3:28 ` cvs-commit at gcc dot gnu dot org
2005-08-09 4:36 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-09 3:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-08-09 03:28 -------
Subject: Bug 23234
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: steven@gcc.gnu.org 2005-08-09 03:28:38
Modified files:
gcc : ChangeLog tree-ssa-math-opts.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/tree-ssa: pr23234.c
Log message:
gcc/
PR tree-optimization/23234
* tree-ssa-math-opts.c (place_reciprocal): New enum.
(execute_cse_reciprocals_1): Replace the 'phi' argument with an
argument of the new enum.
(execute_cse_reciprocals): Add reciprocals for function arguments
on the unique successor edge of the entry block. Update other calls
to execute_cse_reciprocals_1.
testsuite/
PR tree-optimization/23234
* gcc.dg/tree-ssa/pr23234.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9683&r2=2.9684
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-math-opts.c.diff?cvsroot=gcc&r1=2.4&r2=2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5895&r2=1.5896
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr23234.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23234
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/23234] [4.1 Regression] ICE in verify_flow_info()
2005-08-04 17:44 [Bug tree-optimization/23234] New: ICE in verify_flow_info() uttamp at us dot ibm dot com
` (6 preceding siblings ...)
2005-08-09 3:28 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-09 4:36 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-09 4:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-09 04:36 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23234
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-08-09 4:36 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-04 17:44 [Bug tree-optimization/23234] New: ICE in verify_flow_info() uttamp at us dot ibm dot com
2005-08-04 17:55 ` [Bug tree-optimization/23234] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-08-04 17:57 ` uttamp at us dot ibm dot com
2005-08-06 14:34 ` pinskia at gcc dot gnu dot org
2005-08-07 15:19 ` steven at gcc dot gnu dot org
2005-08-07 15:52 ` steven at gcc dot gnu dot org
2005-08-07 16:13 ` steven at gcc dot gnu dot org
2005-08-09 3:28 ` cvs-commit at gcc dot gnu dot org
2005-08-09 4:36 ` 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).