* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
@ 2005-10-25 19:20 ` pinskia at gcc dot gnu dot org
2005-10-26 14:17 ` micis at gmx dot de
` (31 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-25 19:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2005-10-25 19:19 -------
Can you try this again, I think these are all fixed now?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
2005-10-25 19:20 ` pinskia at gcc dot gnu dot org
@ 2005-10-26 14:17 ` micis at gmx dot de
2005-10-26 16:55 ` pinskia at gcc dot gnu dot org
` (30 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: micis at gmx dot de @ 2005-10-26 14:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from micis at gmx dot de 2005-10-26 14:17 -------
With the snapshot gcc-4.1-20051022 I get the following additional errors when I
use --enable-checking=fold and run make check
gcc.c-torture/compile/20021108-1.c
gcc.c-torture/compile/920501-7.c
gcc.c-torture/compile/labels-1.c
gcc.c-torture/compile/labels-2.c
gcc.c-torture/compile/labels-3.c
gcc.dg/20021029-1.c
gcc.dg/pr16973.c
all fail with the message:
"internal compiler error: fold check: original tree changed by fold"
Michael
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
2005-10-25 19:20 ` pinskia at gcc dot gnu dot org
2005-10-26 14:17 ` micis at gmx dot de
@ 2005-10-26 16:55 ` pinskia at gcc dot gnu dot org
2006-02-16 2:51 ` ghazi at gcc dot gnu dot org
` (29 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-26 16:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gcc dot gnu dot org 2005-10-26 16:54 -------
(In reply to comment #7)
> With the snapshot gcc-4.1-20051022 I get the following additional errors when I
> use --enable-checking=fold and run make check
Thanks, that is only one bug now as they all have the following in common, they
use address of label extension.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-10-26 16:54:58
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2005-10-26 16:55 ` pinskia at gcc dot gnu dot org
@ 2006-02-16 2:51 ` ghazi at gcc dot gnu dot org
2006-02-21 13:59 ` ghazi at gcc dot gnu dot org
` (28 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2006-02-16 2:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from ghazi at gcc dot gnu dot org 2006-02-16 02:51 -------
Still have the address of labels failure on 4.0, 4.1 and mainline:
http://gcc.gnu.org/ml/gcc-testresults/2006-02/msg00383.html
http://gcc.gnu.org/ml/gcc-testresults/2006-02/msg00431.html
http://gcc.gnu.org/ml/gcc-testresults/2006-02/msg00508.html
4.0 has some additional errors that I believe can be fixed by backporting the
fix for PR16045.
--
ghazi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ghazi at gcc dot gnu dot org
Last reconfirmed|2006-01-29 17:51:11 |2006-02-16 02:51:15
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2006-02-16 2:51 ` ghazi at gcc dot gnu dot org
@ 2006-02-21 13:59 ` ghazi at gcc dot gnu dot org
2006-06-02 20:12 ` rsa at us dot ibm dot com
` (27 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2006-02-21 13:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from ghazi at gcc dot gnu dot org 2006-02-21 13:59 -------
4.0 results are now on par with 4.1, meaning AFAICS we only have the address of
labels problem to worry about on all 4.* branches.
http://gcc.gnu.org/ml/gcc-testresults/2006-02/msg00986.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2006-02-21 13:59 ` ghazi at gcc dot gnu dot org
@ 2006-06-02 20:12 ` rsa at us dot ibm dot com
2007-01-16 4:52 ` ghazi at gcc dot gnu dot org
` (26 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: rsa at us dot ibm dot com @ 2006-06-02 20:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from rsa at us dot ibm dot com 2006-06-02 20:11 -------
I recently ran into this on ppc/ppc64 when building a toolchain with gcc4.1 or
gcc4.2.
When the bootstrap gcc was built with --enable-checking=all (or =fold which we
just tested) the glibc 32bit build stage fails in vfprintf. Peter Bergner
extracted the minimal failure bit out here:
vfprintf.c
int main (void)
{
static void *array[] = { &&foo - &&bar };
return 0;
foo:
return 1;
bar:
return 2;
}
Compiler /home/user/gcc/gcc-4_1-20060601-2-biarch/bin/gcc compiled with
--enable-checking=all (=fold)
user@host:~/gcc/bugs/vfprintf> /home/user/gcc/gcc-4_1-20060601-2-biarch/bin/gcc
-c vfprintf.c
vfprintf.c: In function main:
vfprintf.c:3: internal compiler error: fold check: original tree changed by
fold
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
rsa at us dot ibm dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rsa at us dot ibm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2006-06-02 20:12 ` rsa at us dot ibm dot com
@ 2007-01-16 4:52 ` ghazi at gcc dot gnu dot org
2007-01-18 14:42 ` ghazi at gcc dot gnu dot org
` (25 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2007-01-16 4:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from ghazi at gcc dot gnu dot org 2007-01-16 04:52 -------
Same results one year later on sparc/sparc64 solaris2.10 with 4.0.x branch
using --enable-checking=yes,rtl,fold:
http://gcc.gnu.org/ml/gcc-testresults/2007-01/msg00592.html
http://gcc.gnu.org/ml/gcc-testresults/2007-01/msg00593.html
will check other branches, but it takes a while...
--
ghazi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.0.4
Last reconfirmed|2006-02-16 02:51:15 |2007-01-16 04:52:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2007-01-16 4:52 ` ghazi at gcc dot gnu dot org
@ 2007-01-18 14:42 ` ghazi at gcc dot gnu dot org
2007-06-20 12:28 ` rguenth at gcc dot gnu dot org
` (24 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2007-01-18 14:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from ghazi at gcc dot gnu dot org 2007-01-18 14:42 -------
4.1.x branch still has the fold checking errors with labels:
http://gcc.gnu.org/ml/gcc-testresults/2007-01/msg00699.html
http://gcc.gnu.org/ml/gcc-testresults/2007-01/msg00700.html
--
ghazi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|4.0.4 |4.0.4 4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2007-01-18 14:42 ` ghazi at gcc dot gnu dot org
@ 2007-06-20 12:28 ` rguenth at gcc dot gnu dot org
2007-06-20 18:50 ` spop at gcc dot gnu dot org
` (23 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-06-20 12:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from rguenth at gcc dot gnu dot org 2007-06-20 12:28 -------
*** Bug 32024 has been marked as a duplicate of this bug. ***
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rob1weld at aol dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2007-06-20 12:28 ` rguenth at gcc dot gnu dot org
@ 2007-06-20 18:50 ` spop at gcc dot gnu dot org
2007-06-20 22:46 ` rob1weld at aol dot com
` (22 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-06-20 18:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from spop at gcc dot gnu dot org 2007-06-20 18:50 -------
(In reply to comment #5)
> This depends on PR 22455 now as --enable-checking=fold is broken.
>
With
--
spop at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |spop at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2007-06-20 18:50 ` spop at gcc dot gnu dot org
@ 2007-06-20 22:46 ` rob1weld at aol dot com
2007-06-20 22:58 ` spop at gcc dot gnu dot org
` (21 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: rob1weld at aol dot com @ 2007-06-20 22:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from rob1weld at aol dot com 2007-06-20 22:46 -------
Uros Bizjak seems to have tracked this problems down for 4.3.0 on target
i686-pc-cygwin and i686-pc-linux-gnu in the bug report that Richard just marked
as a dupe.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2007-06-20 22:46 ` rob1weld at aol dot com
@ 2007-06-20 22:58 ` spop at gcc dot gnu dot org
2007-06-20 23:32 ` spop at gcc dot gnu dot org
` (20 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-06-20 22:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from spop at gcc dot gnu dot org 2007-06-20 22:58 -------
Subject: Re: ICE: fold check: original tree changed by fold with
--enable-checking=fold
Hi,
The following patch fixes a part of the reported testsuite fails.
With this patch we avoid folding the TREE_CHAIN of an SSA_NAME, that
corresponds to its SSA_NAME_DEF_STMT.
Index: gcc/fold-const.c
===================================================================
--- gcc/fold-const.c (revision 125883)
+++ gcc/fold-const.c (working copy)
@@ -12775,7 +12775,8 @@ recursive_label:
fold_checksum_tree (TREE_TYPE (expr), ctx, ht);
if (TREE_CODE_CLASS (code) != tcc_type
&& TREE_CODE_CLASS (code) != tcc_declaration
- && code != TREE_LIST)
+ && code != TREE_LIST
+ && code != SSA_NAME)
fold_checksum_tree (TREE_CHAIN (expr), ctx, ht);
switch (TREE_CODE_CLASS (code))
{
The only fails that remain when compiling with default languages and
--enable-checking=assert,fold,gc,misc,rtl,rtlflag,runtime,tree
on i686-linux are:
gcc.c-torture/compile/20021108-1.c
gcc.c-torture/compile/920501-7.c
gcc.c-torture/compile/labels-1.c
gcc.c-torture/compile/labels-2.c
gcc.c-torture/compile/labels-3.c
gcc.c-torture/execute/comp-goto-1.c
gcc.dg/20021029-1.c
gcc.dg/pr16973.c
Okay for trunk?
Sebastian
PS: The remaining tests all fail when fold_build2 is passed an
ADDR_EXPR with a MINUS_EXPR.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (11 preceding siblings ...)
2007-06-20 22:58 ` spop at gcc dot gnu dot org
@ 2007-06-20 23:32 ` spop at gcc dot gnu dot org
2007-06-21 8:00 ` rguenther at suse dot de
` (19 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-06-20 23:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from spop at gcc dot gnu dot org 2007-06-20 23:31 -------
Subject: Re: ICE: fold check: original tree changed by fold with
--enable-checking=fold
Hi, here is the final fix for the remaining cases, closing this PR.
Okay for trunk after bootntest on i686-linux with default languages
and --enable-checking=assert,fold,gc,misc,rtl,rtlflag,runtime,tree ?
Sebastian
------- Comment #19 from spop at gcc dot gnu dot org 2007-06-20 23:31 -------
Created an attachment (id=13752)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13752&action=view)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (12 preceding siblings ...)
2007-06-20 23:32 ` spop at gcc dot gnu dot org
@ 2007-06-21 8:00 ` rguenther at suse dot de
2007-06-21 8:02 ` rguenther at suse dot de
` (18 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: rguenther at suse dot de @ 2007-06-21 8:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from rguenther at suse dot de 2007-06-21 07:59 -------
Subject: Re: ICE: fold check: original tree changed
by fold with --enable-checking=fold
On Thu, 20 Jun 2007, spop at gcc dot gnu dot org wrote:
>
>
> ------- Comment #17 from spop at gcc dot gnu dot org 2007-06-20 22:58 -------
> Subject: Re: ICE: fold check: original tree changed by fold with
> --enable-checking=fold
>
> Hi,
>
> The following patch fixes a part of the reported testsuite fails.
> With this patch we avoid folding the TREE_CHAIN of an SSA_NAME, that
> corresponds to its SSA_NAME_DEF_STMT.
>
> Index: gcc/fold-const.c
> ===================================================================
> --- gcc/fold-const.c (revision 125883)
> +++ gcc/fold-const.c (working copy)
> @@ -12775,7 +12775,8 @@ recursive_label:
> fold_checksum_tree (TREE_TYPE (expr), ctx, ht);
> if (TREE_CODE_CLASS (code) != tcc_type
> && TREE_CODE_CLASS (code) != tcc_declaration
> - && code != TREE_LIST)
> + && code != TREE_LIST
> + && code != SSA_NAME)
> fold_checksum_tree (TREE_CHAIN (expr), ctx, ht);
> switch (TREE_CODE_CLASS (code))
> {
>
> The only fails that remain when compiling with default languages and
> --enable-checking=assert,fold,gc,misc,rtl,rtlflag,runtime,tree
> on i686-linux are:
>
> gcc.c-torture/compile/20021108-1.c
> gcc.c-torture/compile/920501-7.c
> gcc.c-torture/compile/labels-1.c
> gcc.c-torture/compile/labels-2.c
> gcc.c-torture/compile/labels-3.c
> gcc.c-torture/execute/comp-goto-1.c
> gcc.dg/20021029-1.c
> gcc.dg/pr16973.c
>
> Okay for trunk?
Yes, this is ok.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (13 preceding siblings ...)
2007-06-21 8:00 ` rguenther at suse dot de
@ 2007-06-21 8:02 ` rguenther at suse dot de
2007-06-21 8:16 ` richard dot guenther at gmail dot com
` (17 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: rguenther at suse dot de @ 2007-06-21 8:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #21 from rguenther at suse dot de 2007-06-21 08:01 -------
Subject: Re: ICE: fold check: original tree changed
by fold with --enable-checking=fold
On Thu, 20 Jun 2007, spop at gcc dot gnu dot org wrote:
>
>
> ------- Comment #18 from spop at gcc dot gnu dot org 2007-06-20 23:31 -------
> Subject: Re: ICE: fold check: original tree changed by fold with
> --enable-checking=fold
>
> Hi, here is the final fix for the remaining cases, closing this PR.
> Okay for trunk after bootntest on i686-linux with default languages
> and --enable-checking=assert,fold,gc,misc,rtl,rtlflag,runtime,tree ?
This doesn't look right - let me investigate.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (14 preceding siblings ...)
2007-06-21 8:02 ` rguenther at suse dot de
@ 2007-06-21 8:16 ` richard dot guenther at gmail dot com
2007-06-21 8:21 ` spop at gcc dot gnu dot org
` (16 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: richard dot guenther at gmail dot com @ 2007-06-21 8:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #22 from richard dot guenther at gmail dot com 2007-06-21 08:16 -------
Subject: Re: ICE: fold check: original tree changed by fold with
--enable-checking=fold
On 6/21/07, Sebastian Pop <spop@gcc.gnu.org> wrote:
> Hi, here is the final fix for the remaining cases, closing this PR.
> Okay for trunk after bootntest on i686-linux with default languages
> and --enable-checking=assert,fold,gc,misc,rtl,rtlflag,runtime,tree ?
The fold_binary change looks unnecessary. The rest is ok.
Thanks,
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (15 preceding siblings ...)
2007-06-21 8:16 ` richard dot guenther at gmail dot com
@ 2007-06-21 8:21 ` spop at gcc dot gnu dot org
2007-06-21 8:48 ` rguenther at suse dot de
` (15 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-06-21 8:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #23 from spop at gcc dot gnu dot org 2007-06-21 08:21 -------
Subject: Re: ICE: fold check: original tree changed by fold with
--enable-checking=fold
On 6/21/07, Richard Guenther <richard.guenther@gmail.com> wrote:
>
> The fold_binary change looks unnecessary.
ok.
> The rest is ok.
>
There was something wrong in the rest, so I'm proposing this fix instead,
as we were not using the modified base anymore for building the result 't'.
@@ -14191,14 +14220,15 @@ build_fold_addr_expr_with_type (tree t,
}
else
{
- tree base = t;
+ tree copy_t = copy_node (t);
+ tree base = copy_t;
while (handled_component_p (base))
base = TREE_OPERAND (base, 0);
if (DECL_P (base))
TREE_ADDRESSABLE (base) = 1;
- t = build1 (ADDR_EXPR, ptrtype, t);
+ t = build1 (ADDR_EXPR, ptrtype, copy_t);
}
return t;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (16 preceding siblings ...)
2007-06-21 8:21 ` spop at gcc dot gnu dot org
@ 2007-06-21 8:48 ` rguenther at suse dot de
2007-06-21 10:07 ` richard dot guenther at gmail dot com
` (14 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: rguenther at suse dot de @ 2007-06-21 8:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #24 from rguenther at suse dot de 2007-06-21 08:48 -------
Subject: Re: ICE: fold check: original tree changed
by fold with --enable-checking=fold
On Thu, 21 Jun 2007, spop at gcc dot gnu dot org wrote:
>
>
> ------- Comment #23 from spop at gcc dot gnu dot org 2007-06-21 08:21 -------
> Subject: Re: ICE: fold check: original tree changed by fold with
> --enable-checking=fold
>
> On 6/21/07, Richard Guenther <richard.guenther@gmail.com> wrote:
> >
> > The fold_binary change looks unnecessary.
>
> ok.
>
> > The rest is ok.
> >
>
> There was something wrong in the rest, so I'm proposing this fix instead,
> as we were not using the modified base anymore for building the result 't'.
>
> @@ -14191,14 +14220,15 @@ build_fold_addr_expr_with_type (tree t,
> }
> else
> {
> - tree base = t;
> + tree copy_t = copy_node (t);
> + tree base = copy_t;
>
> while (handled_component_p (base))
> base = TREE_OPERAND (base, 0);
> if (DECL_P (base))
> TREE_ADDRESSABLE (base) = 1;
>
> - t = build1 (ADDR_EXPR, ptrtype, t);
> + t = build1 (ADDR_EXPR, ptrtype, copy_t);
> }
>
> return t;
Oh, indeed. The above is ok. (The fold_binary change still looks
unnecessary)
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (17 preceding siblings ...)
2007-06-21 8:48 ` rguenther at suse dot de
@ 2007-06-21 10:07 ` richard dot guenther at gmail dot com
2007-06-21 18:21 ` spop at gcc dot gnu dot org
` (13 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: richard dot guenther at gmail dot com @ 2007-06-21 10:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #25 from richard dot guenther at gmail dot com 2007-06-21 10:07 -------
Subject: Re: ICE: fold check: original tree changed by fold with
--enable-checking=fold
On 6/21/07, Sebastian Pop <spop@gcc.gnu.org> wrote
> On 6/21/07, Richard Guenther <richard.guenther@gmail.com> wrote:
> >
> > The fold_binary change looks unnecessary.
>
> ok.
>
> > The rest is ok.
> >
>
> There was something wrong in the rest, so I'm proposing this fix instead,
> as we were not using the modified base anymore for building the result 't'.
>
> @@ -14191,14 +14220,15 @@ build_fold_addr_expr_with_type (tree t,
> }
> else
> {
> - tree base = t;
> + tree copy_t = copy_node (t);
> + tree base = copy_t;
>
> while (handled_component_p (base))
> base = TREE_OPERAND (base, 0);
> if (DECL_P (base))
> TREE_ADDRESSABLE (base) = 1;
>
> - t = build1 (ADDR_EXPR, ptrtype, t);
> + t = build1 (ADDR_EXPR, ptrtype, copy_t);
> }
As you noted copying trees here is wrong, too. We can either try to get rid
of setting the TREE_ADDRESSABLE flag here or fix fold checking code to
ignore this particular change. Note the above code is this way since the
tree-ssa merge.
Another thing would be to note where we call this helper from fold() routines
and not set the flag only for those callers which should be safe. We'd need
another flag argument to the function or another wrapper.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (18 preceding siblings ...)
2007-06-21 10:07 ` richard dot guenther at gmail dot com
@ 2007-06-21 18:21 ` spop at gcc dot gnu dot org
2007-06-21 19:33 ` rguenther at suse dot de
` (12 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-06-21 18:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #26 from spop at gcc dot gnu dot org 2007-06-21 18:21 -------
Subject: Re: ICE: fold check: original tree changed by fold with
--enable-checking=fold
Just to sum it up, and for asking for advice,
attached is the patch that I'm bootstrapping and testing now.
> Another thing would be to note where we call this helper from fold() routines
> and not set the flag only for those callers which should be safe. We'd need
> another flag argument to the function or another wrapper.
>
In another version of this patch, I replaced all the callers from the
folder, to use a gcc_assert (TREE_ADDRESSABLE (base) == 1), and this
failed because some calls from the C front-end used that function and
did not have set their addressable flag (yet?). This resulted in all
the fails left in the second part of the bug.
With the attached patch, fold functions do not set that flag, and this
solves the remaining fails. I'm bootstrapping and testing all
languages again with fold checking.
Sebastian
------- Comment #27 from spop at gcc dot gnu dot org 2007-06-21 18:21 -------
Created an attachment (id=13760)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13760&action=view)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (19 preceding siblings ...)
2007-06-21 18:21 ` spop at gcc dot gnu dot org
@ 2007-06-21 19:33 ` rguenther at suse dot de
2007-06-21 20:56 ` spop at gcc dot gnu dot org
` (11 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: rguenther at suse dot de @ 2007-06-21 19:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #28 from rguenther at suse dot de 2007-06-21 19:33 -------
Subject: Re: ICE: fold check: original tree changed
by fold with --enable-checking=fold
On Thu, 21 Jun 2007, spop at gcc dot gnu dot org wrote:
> ------- Comment #26 from spop at gcc dot gnu dot org 2007-06-21 18:21 -------
> Subject: Re: ICE: fold check: original tree changed by fold with
> --enable-checking=fold
>
> Just to sum it up, and for asking for advice,
> attached is the patch that I'm bootstrapping and testing now.
>
> > Another thing would be to note where we call this helper from fold() routines
> > and not set the flag only for those callers which should be safe. We'd need
> > another flag argument to the function or another wrapper.
> >
>
> In another version of this patch, I replaced all the callers from the
> folder, to use a gcc_assert (TREE_ADDRESSABLE (base) == 1), and this
> failed because some calls from the C front-end used that function and
> did not have set their addressable flag (yet?). This resulted in all
> the fails left in the second part of the bug.
>
> With the attached patch, fold functions do not set that flag, and this
> solves the remaining fails. I'm bootstrapping and testing all
> languages again with fold checking.
This looks good (again ;)).
Thanks,
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (20 preceding siblings ...)
2007-06-21 19:33 ` rguenther at suse dot de
@ 2007-06-21 20:56 ` spop at gcc dot gnu dot org
2007-06-21 21:25 ` spop at gcc dot gnu dot org
` (10 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-06-21 20:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #29 from spop at gcc dot gnu dot org 2007-06-21 20:55 -------
Subject: Re: ICE: fold check: original tree changed by fold with
--enable-checking=fold
So,
the last patch bootstrapped, and tests passed with exactly the same fails
as on trunk. I'm going to commit that patch to trunk. I'll also send a
message with the patch to the gcc-patches@.
Sebastian
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (21 preceding siblings ...)
2007-06-21 20:56 ` spop at gcc dot gnu dot org
@ 2007-06-21 21:25 ` spop at gcc dot gnu dot org
2007-06-24 2:23 ` rob1weld at aol dot com
` (9 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-06-21 21:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #30 from spop at gcc dot gnu dot org 2007-06-21 21:25 -------
Subject: Bug 20623
Author: spop
Date: Thu Jun 21 21:25:27 2007
New Revision: 125929
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125929
Log:
PR middle-end/20623
* tree.h (debug_fold_checksum): Declared.
* fold-const.c (build_fold_addr_expr_with_type_1): New.
(build_fold_addr_expr_with_type, build_fold_addr_expr): Use
build_fold_addr_expr_with_type_1.
(fold_addr_expr, debug_fold_checksum): New.
(fold_checksum_tree): Don't fold TREE_CHAIN of an SSA_NAME.
(fold_unary, fold_comparison, split_address_to_core_and_offset):
Use fold_addr_expr.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/tree.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (22 preceding siblings ...)
2007-06-21 21:25 ` spop at gcc dot gnu dot org
@ 2007-06-24 2:23 ` rob1weld at aol dot com
2007-06-24 17:46 ` rob1weld at aol dot com
` (8 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: rob1weld at aol dot com @ 2007-06-24 2:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #31 from rob1weld at aol dot com 2007-06-24 02:22 -------
(In reply to comment #14)
> *** Bug 32024 has been marked as a duplicate of this bug. ***
32024 is fixed. I would add 4.3.0 to _this_ "Known to work" list if I was able.
--
rob1weld at aol dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|rob1weld at aol dot com |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (23 preceding siblings ...)
2007-06-24 2:23 ` rob1weld at aol dot com
@ 2007-06-24 17:46 ` rob1weld at aol dot com
2007-06-24 18:41 ` ghazi at gcc dot gnu dot org
` (7 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: rob1weld at aol dot com @ 2007-06-24 17:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #32 from rob1weld at aol dot com 2007-06-24 17:45 -------
Everyone: Don't forget "df", it doesn't slow checking much.
Compile + check time < 16 hours :) only:
--enable-stage1-checking=assert,df,fold,gc,misc,rtl,rtlflag,runtime,tree
Results for 4.3.0 20070623 (experimental) testsuite on i686-pc-linux-gnu
http://gcc.gnu.org/ml/gcc-testresults/2007-06/msg01093.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (24 preceding siblings ...)
2007-06-24 17:46 ` rob1weld at aol dot com
@ 2007-06-24 18:41 ` ghazi at gcc dot gnu dot org
2007-06-25 5:06 ` rob1weld at aol dot com
` (6 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2007-06-24 18:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #33 from ghazi at gcc dot gnu dot org 2007-06-24 18:40 -------
(In reply to comment #32)
> Everyone: Don't forget "df", it doesn't slow checking much.
> Compile + check time < 16 hours :) only:
> --enable-stage1-checking=assert,df,fold,gc,misc,rtl,rtlflag,runtime,tree
To avoid forgetting anything, try "yes,rtl,fold" as your checking options.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (25 preceding siblings ...)
2007-06-24 18:41 ` ghazi at gcc dot gnu dot org
@ 2007-06-25 5:06 ` rob1weld at aol dot com
2007-06-25 5:44 ` ghazi at gcc dot gnu dot org
` (5 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: rob1weld at aol dot com @ 2007-06-25 5:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #34 from rob1weld at aol dot com 2007-06-25 05:06 -------
(In reply to comment #33)
> (In reply to comment #32)
> > Everyone: Don't forget "df", it doesn't slow checking much.
> > Compile + check time < 16 hours :) only:
> > --enable-stage1-checking=assert,df,fold,gc,misc,rtl,rtlflag,runtime,tree
> To avoid forgetting anything, try "yes,rtl,fold" as your checking options.
Would that enable gcac. Is gcac less useful and very very slow.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (26 preceding siblings ...)
2007-06-25 5:06 ` rob1weld at aol dot com
@ 2007-06-25 5:44 ` ghazi at gcc dot gnu dot org
2007-06-30 2:16 ` ghazi at gcc dot gnu dot org
` (4 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2007-06-25 5:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #35 from ghazi at gcc dot gnu dot org 2007-06-25 05:44 -------
(In reply to comment #34)
> (In reply to comment #33)
> > (In reply to comment #32)
> > > Everyone: Don't forget "df", it doesn't slow checking much.
> > > Compile + check time < 16 hours :) only:
> > > --enable-stage1-checking=assert,df,fold,gc,misc,rtl,rtlflag,runtime,tree
> > To avoid forgetting anything, try "yes,rtl,fold" as your checking options.
> Would that enable gcac. Is gcac less useful and very very slow.
The "yes" option does not invoke "gcac". It is equivalent to the default on
mainline, as if you didn't specify any checking flags. Look in
gcc/configure.ac and search for "gcac" or "rtlflag" and you'll see the shell
code in question.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (27 preceding siblings ...)
2007-06-25 5:44 ` ghazi at gcc dot gnu dot org
@ 2007-06-30 2:16 ` ghazi at gcc dot gnu dot org
2007-06-30 2:23 ` ghazi at gcc dot gnu dot org
` (3 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2007-06-30 2:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #36 from ghazi at gcc dot gnu dot org 2007-06-30 02:16 -------
I tried --enable-checking=yes,fold on sparc-sun-solaris2.10, bootstrap works
but I'm still getting a few extra failures. Here are two testresults from the
same checkout, one regular and one with fold checking turned on:
http://gcc.gnu.org/ml/gcc-testresults/2007-06/msg01217.html
http://gcc.gnu.org/ml/gcc-testresults/2007-06/msg01270.html
The differences are:
> FAIL: g++.dg/gomp/atomic-10.C (internal compiler error)
> FAIL: g++.dg/gomp/atomic-4.C (internal compiler error)
> FAIL: gcc.dg/gomp/appendix-a/a.17.1.c (internal compiler error)
> FAIL: gcc.dg/gomp/atomic-10.c (internal compiler error)
> FAIL: gcc.dg/gomp/atomic-4.c (internal compiler error)
> FAIL: libgomp.c/shared-1.c (internal compiler error)
> FAIL: libgomp.c++/pr27337.C -O0 (internal compiler error)
> FAIL: libgomp.c++/pr27337.C -O1 (internal compiler error)
> FAIL: libgomp.c++/pr27337.C -O2 (internal compiler error)
> FAIL: libgomp.c++/pr27337.C -O3 -fomit-frame-pointer (internal compiler error)
> FAIL: libgomp.c++/pr27337.C -O3 -fomit-frame-pointer -funroll-loops (internal compiler error)
> FAIL: libgomp.c++/pr27337.C -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (internal compiler error)
> FAIL: libgomp.c++/pr27337.C -O3 -g (internal compiler error)
> FAIL: libgomp.c++/pr27337.C -Os (internal compiler error)
> FAIL: libgomp.c++/shared-1.C -O (internal compiler error)
All of the failures are of the form:
internal compiler error: in fold_checksum_tree, at fold-const.c:12890
I'll create a testcase for one of them.
--
ghazi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2007-01-16 04:52:08 |2007-06-30 02:16:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (28 preceding siblings ...)
2007-06-30 2:16 ` ghazi at gcc dot gnu dot org
@ 2007-06-30 2:23 ` ghazi at gcc dot gnu dot org
2008-01-26 7:18 ` ghazi at gcc dot gnu dot org
` (2 subsequent siblings)
32 siblings, 0 replies; 41+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2007-06-30 2:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #37 from ghazi at gcc dot gnu dot org 2007-06-30 02:22 -------
Run this in a.17.1.i targetted to sparc-sun-solaris2.10 with
--enable-checking=yes,fold and:
cc1 -fpreprocessed a.17.1.i -quiet -dumpbase a.17.1.c -mcpu=v9 -auxbase-strip
a.17.1.s -version -fopenmp -fno-show-column -o a.17.1.s
That should show the error.
# 1
"/tmp/kg/basel/egcc-SVN20070627/gcc/testsuite/gcc.dg/gomp/appendix-a/a.17.1.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1
"/tmp/kg/basel/egcc-SVN20070627/gcc/testsuite/gcc.dg/gomp/appendix-a/a.17.1.c"
void
a17_1_wrong ()
{
union
{
int n;
float x;
} u;
#pragma omp parallel
{
#pragma omp atomic
u.n++;
#pragma omp atomic
u.x += 1.0;
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (29 preceding siblings ...)
2007-06-30 2:23 ` ghazi at gcc dot gnu dot org
@ 2008-01-26 7:18 ` ghazi at gcc dot gnu dot org
2009-08-12 14:22 ` rmansfield at qnx dot com
2010-02-27 14:06 ` zsojka at seznam dot cz
32 siblings, 0 replies; 41+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2008-01-26 7:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #38 from ghazi at gcc dot gnu dot org 2008-01-26 05:11 -------
Update: mainline appears to pass fold checking albeit with a few extra timeouts
due to length compilation times. However the last fix for fold checking was
never backported to the branches. On 4.1/4.2 I still get these extra fold
checking errors due to label addresses:
FAIL: gcc.c-torture/compile/20021108-1.c
FAIL: gcc.c-torture/compile/920501-7.c
FAIL: gcc.c-torture/compile/labels-1.c
FAIL: gcc.c-torture/compile/labels-2.c
FAIL: gcc.c-torture/compile/labels-3.c
FAIL: gcc.dg/20021029-1.c
FAIL: gcc.dg/pr16973.c
Here are the latest results for x86_64-unknown-linux-gnu:
4.1 (extra errors): http://gcc.gnu.org/ml/gcc-testresults/2008-01/msg01221.html
4.2 (extra errors): http://gcc.gnu.org/ml/gcc-testresults/2008-01/msg01222.html
trunk (x86_64 ok): http://gcc.gnu.org/ml/gcc-testresults/2008-01/msg01253.html
I don't have access to solaris any more to see if there are still gomp fold
checking failures as from comment #37.
--
ghazi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|4.0.4 4.1.2 |4.0.4 4.1.2 4.1.3 4.2.2
| |4.2.3
Known to work| |4.3.0
Last reconfirmed|2007-06-30 02:16:08 |2008-01-26 05:11:37
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (30 preceding siblings ...)
2008-01-26 7:18 ` ghazi at gcc dot gnu dot org
@ 2009-08-12 14:22 ` rmansfield at qnx dot com
2010-02-27 14:06 ` zsojka at seznam dot cz
32 siblings, 0 replies; 41+ messages in thread
From: rmansfield at qnx dot com @ 2009-08-12 14:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #39 from rmansfield at qnx dot com 2009-08-12 14:22 -------
I came across a original-tree-changed-by-fold ICE building libsupc++ for a
arm-unknown-linux-gnu target with --enable-checking=fold.
gcc version 4.5.0 20090812 (experimental) [trunk revision 150681] (GCC)
../../../../libstdc++-v3/libsupc++/dyncast.cc: In function 'void*
__cxxabiv1::__dynamic_cast(const void*, const __cxxabiv1::__class_type_info*,
const __cxxabiv1::__class_type_info*, ptrdiff_t)':
../../../../libstdc++-v3/libsupc++/dyncast.cc:86:1: internal compiler error:
fold check: original tree changed by fold
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [dyncast.lo] Error 1
make[4]: Leaving directory
`/home/ryan/gcc/trunk/gcc/arm-build/arm-unknown-linux-gnu/libstdc++-v3/libsupc++'
--
rmansfield at qnx dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rmansfield at qnx dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
[not found] <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
` (31 preceding siblings ...)
2009-08-12 14:22 ` rmansfield at qnx dot com
@ 2010-02-27 14:06 ` zsojka at seznam dot cz
32 siblings, 0 replies; 41+ messages in thread
From: zsojka at seznam dot cz @ 2010-02-27 14:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #40 from zsojka at seznam dot cz 2010-02-27 14:06 -------
Follown file fails at all opt levels at both x86_64 and i?86:
---------- testcase.cpp ----------
namespace {
bool bar(int i) { return i; }
}
int foo(int i) { return bar(i) ? i : 0; }
----------------------------------
It was reduced from dyncast.cc (bootstrap fails there).
$ /mnt/sdb1/build-157106-checking-fold/gcc/cc1plus -O1 testcase.cpp
bool<unnamed>::bar(int) int foo(int)
Analyzing compilation unit
Performing interprocedural optimizations
<visibility> <*free_lang_data> <early_local_cleanups> <whole-program> <inline>
<static-var> <pure-const>Assembling functions:
int foo(int)
testcase.cpp: In function ‘int foo(int)’:
testcase.cpp:4:5: internal compiler error: fold check: original tree changed by
fold
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623
^ permalink raw reply [flat|nested] 41+ messages in thread