* [Bug c/27381] ice on valid code with -O2
2006-05-02 11:16 [Bug c/27381] New: ice on valid code with -O2 dcb314 at hotmail dot com
@ 2006-05-02 11:19 ` dcb314 at hotmail dot com
2006-05-02 11:39 ` rguenth at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2006-05-02 11:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dcb314 at hotmail dot com 2006-05-02 11:19 -------
Created an attachment (id=11357)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11357&action=view)
C source code
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27381
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/27381] ice on valid code with -O2
2006-05-02 11:16 [Bug c/27381] New: ice on valid code with -O2 dcb314 at hotmail dot com
2006-05-02 11:19 ` [Bug c/27381] " dcb314 at hotmail dot com
@ 2006-05-02 11:39 ` rguenth at gcc dot gnu dot org
2006-05-02 12:26 ` [Bug c/27381] ice on valid code with -O rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-05-02 11:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2006-05-02 11:39 -------
Reducing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27381
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/27381] ice on valid code with -O
2006-05-02 11:16 [Bug c/27381] New: ice on valid code with -O2 dcb314 at hotmail dot com
2006-05-02 11:19 ` [Bug c/27381] " dcb314 at hotmail dot com
2006-05-02 11:39 ` rguenth at gcc dot gnu dot org
@ 2006-05-02 12:26 ` rguenth at gcc dot gnu dot org
2006-05-02 12:37 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-05-02 12:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2006-05-02 12:26 -------
Confirmed. Reduced testcase:
typedef char gchar;
typedef unsigned char xmlChar;
typedef struct _xmlNode xmlNode;
typedef xmlNode *xmlNodePtr;
struct _xmlNode {
struct _xmlNode *next;
struct _xmlNode *childs;
};
typedef struct _GFFileEntry GFFileEntry;
struct _GFFileEntry {
gchar *path;
};
gf_fm_load_font_2_0_truetype (xmlNodePtr node)
{
xmlNodePtr child;
GFFileEntry ttf;
ttf.path = ((void *)0);
for (child = node->childs;
child != ((void *)0);
child = child->next) {
xmlChar *type, *xmlpath;
if (type
&& !__builtin_strcmp (type, "ttf")
&& !ttf.path) {
if (xmlpath) {
ttf.path = g_strdup (xmlpath);
}
}
if (type) free((type));
if (ttf.path) break;
}
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at redhat dot com
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Known to work| |4.1.0
Last reconfirmed|0000-00-00 00:00:00 |2006-05-02 12:26:37
date| |
Summary|ice on valid code with -O2 |ice on valid code with -O
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27381
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/27381] ice on valid code with -O
2006-05-02 11:16 [Bug c/27381] New: ice on valid code with -O2 dcb314 at hotmail dot com
` (2 preceding siblings ...)
2006-05-02 12:26 ` [Bug c/27381] ice on valid code with -O rguenth at gcc dot gnu dot org
@ 2006-05-02 12:37 ` rguenth at gcc dot gnu dot org
2006-05-02 14:54 ` [Bug tree-optimization/27381] [4.2 Regression] " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-05-02 12:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2006-05-02 12:37 -------
Caused by
Author: amacleod
Date: Fri Apr 28 20:39:18 2006
New Revision: 113356
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113356
Log:
The condition the assert was flawed.
2006-04-28 Andrew MacLeod <amacleod@redhat.com>
* tree-ssa-dom.c (propagate_rhs_into_lhs): Fix assert clause.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-dom.c
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amacleod at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27381
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/27381] [4.2 Regression] ice on valid code with -O
2006-05-02 11:16 [Bug c/27381] New: ice on valid code with -O2 dcb314 at hotmail dot com
` (3 preceding siblings ...)
2006-05-02 12:37 ` rguenth at gcc dot gnu dot org
@ 2006-05-02 14:54 ` pinskia at gcc dot gnu dot org
2006-05-02 15:38 ` amacleod at redhat dot com
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-02 14:54 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |blocker
Component|c |tree-optimization
Summary|ice on valid code with -O |[4.2 Regression] ice on
| |valid code with -O
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27381
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/27381] [4.2 Regression] ice on valid code with -O
2006-05-02 11:16 [Bug c/27381] New: ice on valid code with -O2 dcb314 at hotmail dot com
` (4 preceding siblings ...)
2006-05-02 14:54 ` [Bug tree-optimization/27381] [4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-05-02 15:38 ` amacleod at redhat dot com
2006-05-02 15:40 ` amacleod at redhat dot com
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: amacleod at redhat dot com @ 2006-05-02 15:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from amacleod at redhat dot com 2006-05-02 15:38 -------
The assert condition is not flawed. It has exposed a second bug with the old
immuse iterator scheme that was also hidden by the old algorithm work around
Jeff had implemented.
When iterating over the immediate uses, and deleting a stmt (such as a
conditional) causes an edge to be removed, PHI nodes have an argument deleted.
when we remove PHI arguments, we move the last phi argument to whatever
position we actually deleted, and reduce the argument count. When arguments
are moved, they were simply being delinked and then linked back into the use
chain.
In this particular example, the argument being moved was another occurence of
the ssa_name being iterated over, and by delinking it and linking it back in,
it was moved back to the beginning of the immuse list. This caused it to be
missed during the iteration pahse, and rightfully triggered the assert.
The fix is to simply keep the same linked position when the argument is moved
instead of removing it from the list and linking it back in.
Patch is currently being tested.
Andrew
--
amacleod at redhat dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |amacleod at redhat dot com
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2006-05-02 12:26:37 |2006-05-02 15:38:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27381
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/27381] [4.2 Regression] ice on valid code with -O
2006-05-02 11:16 [Bug c/27381] New: ice on valid code with -O2 dcb314 at hotmail dot com
` (5 preceding siblings ...)
2006-05-02 15:38 ` amacleod at redhat dot com
@ 2006-05-02 15:40 ` amacleod at redhat dot com
2006-05-03 17:13 ` amacleod at gcc dot gnu dot org
2006-05-04 4:53 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: amacleod at redhat dot com @ 2006-05-02 15:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from amacleod at redhat dot com 2006-05-02 15:40 -------
Created an attachment (id=11361)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11361&action=view)
proposed patch
This is the patch undergoing testing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27381
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/27381] [4.2 Regression] ice on valid code with -O
2006-05-02 11:16 [Bug c/27381] New: ice on valid code with -O2 dcb314 at hotmail dot com
` (6 preceding siblings ...)
2006-05-02 15:40 ` amacleod at redhat dot com
@ 2006-05-03 17:13 ` amacleod at gcc dot gnu dot org
2006-05-04 4:53 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: amacleod at gcc dot gnu dot org @ 2006-05-03 17:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from amacleod at redhat dot com 2006-05-03 17:13 -------
Subject: Bug 27381
Author: amacleod
Date: Wed May 3 17:13:37 2006
New Revision: 113499
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113499
Log:
2006-05-02 Andrew MacLeod <amacleod@redhat.com>
PR tree-optimization/27381
* tree-phinodes.c (remove_phi_arg_num): When moving a phi argument,
maintain the same immediate_use links.
* tree-ssa-operands.c (dump_immediate_uses_for): Show iteration marker
node rather than segfaulting.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-phinodes.c
trunk/gcc/tree-ssa-operands.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27381
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/27381] [4.2 Regression] ice on valid code with -O
2006-05-02 11:16 [Bug c/27381] New: ice on valid code with -O2 dcb314 at hotmail dot com
` (7 preceding siblings ...)
2006-05-03 17:13 ` amacleod at gcc dot gnu dot org
@ 2006-05-04 4:53 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-04 4:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gcc dot gnu dot org 2006-05-04 04:53 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27381
^ permalink raw reply [flat|nested] 10+ messages in thread