* [Bug tree-optimization/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
@ 2007-03-09 8:31 ` tbm at cyrius dot com
2007-03-09 8:51 ` [Bug middle-end/31095] " pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tbm at cyrius dot com @ 2007-03-09 8:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tbm at cyrius dot com 2007-03-09 08:30 -------
Testcase:
typedef long unsigned int size_t;
__extension__ typedef long int __time_t;
__extension__ typedef long int __suseconds_t;
typedef struct
{
}
__sigset_t;
struct timeval
{
__time_t tv_sec;
__suseconds_t tv_usec;
};
extern void bcopy (__const void *__src, void *__dest, size_t __n)
__attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
capture_next_packet (int bpf, int timeout, int *sz)
{
struct timeval past, now, then;
{
bcopy (&then, &past, sizeof (then));
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31095
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
2007-03-09 8:31 ` [Bug tree-optimization/31095] " tbm at cyrius dot com
@ 2007-03-09 8:51 ` pinskia at gcc dot gnu dot org
2007-03-09 11:11 ` tbm at cyrius dot com
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-09 8:51 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |middle-end
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31095
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
2007-03-09 8:31 ` [Bug tree-optimization/31095] " tbm at cyrius dot com
2007-03-09 8:51 ` [Bug middle-end/31095] " pinskia at gcc dot gnu dot org
@ 2007-03-09 11:11 ` tbm at cyrius dot com
2007-04-29 12:36 ` tbm at cyrius dot com
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tbm at cyrius dot com @ 2007-03-09 11:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tbm at cyrius dot com 2007-03-09 11:11 -------
I've confirmed that this doesn't happen with 4.2.0 20070309.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31095
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
` (2 preceding siblings ...)
2007-03-09 11:11 ` tbm at cyrius dot com
@ 2007-04-29 12:36 ` tbm at cyrius dot com
2007-04-30 18:34 ` janis at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tbm at cyrius dot com @ 2007-04-29 12:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from tbm at cyrius dot com 2007-04-29 13:36 -------
Janis, can you do a regression hunt on this one?
--
tbm at cyrius dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janis at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31095
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
` (3 preceding siblings ...)
2007-04-29 12:36 ` tbm at cyrius dot com
@ 2007-04-30 18:34 ` janis at gcc dot gnu dot org
2007-04-30 18:39 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: janis at gcc dot gnu dot org @ 2007-04-30 18:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from janis at gcc dot gnu dot org 2007-04-30 19:33 -------
The same failure occurs on powerpc-linux, where a regression hunt identified
this patch:
http://gcc.gnu.org/viewcvs?view=rev&rev=119535
r119535 | hubicka | 2006-12-05 10:15:28 +0000 (Tue, 05 Dec 2006)
--
janis at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31095
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
` (4 preceding siblings ...)
2007-04-30 18:34 ` janis at gcc dot gnu dot org
@ 2007-04-30 18:39 ` pinskia at gcc dot gnu dot org
2007-05-02 22:02 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-30 18:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2007-04-30 19:39 -------
The problem is obvious, we don't optimize bcopy not to a call during expand but
this is ok, the issue is we are trying to expand a COMPOUND_EXPR which came
from simplifying bcopy which really should have been done earlier anyways.
--
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 |2007-04-30 19:39:07
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31095
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
` (5 preceding siblings ...)
2007-04-30 18:39 ` pinskia at gcc dot gnu dot org
@ 2007-05-02 22:02 ` pinskia at gcc dot gnu dot org
2007-05-03 21:06 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-02 22:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2007-05-02 23:01 -------
gfortran.fortran-torture/execute/st_function.f90 at -O1 and above fail the same
way (it is the same bug, I looked into the failure, though it does not use
bcopy so that work around will not work).
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |blocker
GCC target triplet|ia64-linux-gnu |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31095
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
` (6 preceding siblings ...)
2007-05-02 22:02 ` pinskia at gcc dot gnu dot org
@ 2007-05-03 21:06 ` pinskia at gcc dot gnu dot org
2007-05-18 20:50 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-03 21:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2007-05-03 22:06 -------
*** Bug 31805 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31095
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
` (7 preceding siblings ...)
2007-05-03 21:06 ` pinskia at gcc dot gnu dot org
@ 2007-05-18 20:50 ` pinskia at gcc dot gnu dot org
2007-05-22 20:27 ` sje at cup dot hp dot com
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-18 20:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gcc dot gnu dot org 2007-05-18 21:49 -------
*** Bug 31991 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tobi at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31095
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
` (8 preceding siblings ...)
2007-05-18 20:50 ` pinskia at gcc dot gnu dot org
@ 2007-05-22 20:27 ` sje at cup dot hp dot com
2007-05-22 21:21 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: sje at cup dot hp dot com @ 2007-05-22 20:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from sje at cup dot hp dot com 2007-05-22 21:27 -------
Is anyone looking at this bug? It seems to have generated a lot of interest.
I can reproduce it on IA64 HP-UX (using the code in comment #1) but when I undo
the change in 119535 (see comment #4) I still get the problem so I am not sure
if that patch is the root cause of the problem or not.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31095
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
` (9 preceding siblings ...)
2007-05-22 20:27 ` sje at cup dot hp dot com
@ 2007-05-22 21:21 ` pinskia at gcc dot gnu dot org
2007-05-22 21:49 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-22 21:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from pinskia at gcc dot gnu dot org 2007-05-22 22:21 -------
#5 0x102946e0 in expand_expr_real_1 (exp=0xf7d53630, target=0x0,
tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
at /home/apinski/src/ptrplus/gcc/gcc/expr.c:8872
(gdb) p debug_generic_expr (exp)
past = then;, (void *) &past;
The problem is in expand_builtin_memmove_args, even though we do:
3475 while (TREE_CODE (result) == COMPOUND_EXPR)
We have a NOP_EXPR around the COMPOUND_EXPR, working on a fix because I was the
one who introduced the NOP_EXPR.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31095
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
` (10 preceding siblings ...)
2007-05-22 21:21 ` pinskia at gcc dot gnu dot org
@ 2007-05-22 21:49 ` pinskia at gcc dot gnu dot org
2007-05-23 1:17 ` pinskia at gcc dot gnu dot org
2007-05-23 1:17 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-22 21:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from pinskia at gcc dot gnu dot org 2007-05-22 22:48 -------
Index: builtins.c
===================================================================
Here is the patch which fixes the problem:
--- builtins.c (revision 124965)
+++ builtins.c (working copy)
@@ -3485,6 +3485,7 @@ expand_builtin_memmove_args (tree dest,
if (result)
{
+ STRIP_TYPE_NOPS (result);
while (TREE_CODE (result) == COMPOUND_EXPR)
{
expand_expr (TREE_OPERAND (result, 0), const0_rtx, VOIDmode,
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31095
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
` (11 preceding siblings ...)
2007-05-22 21:49 ` pinskia at gcc dot gnu dot org
@ 2007-05-23 1:17 ` pinskia at gcc dot gnu dot org
2007-05-23 1:17 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-23 1:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from pinskia at gcc dot gnu dot org 2007-05-23 02:17 -------
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=31095
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/31095] [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786
2007-03-09 8:30 [Bug tree-optimization/31095] New: [4.3 Regression] ICE in expand_expr_real_1, at expr.c:8786 tbm at cyrius dot com
` (12 preceding siblings ...)
2007-05-23 1:17 ` pinskia at gcc dot gnu dot org
@ 2007-05-23 1:17 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-23 1:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from pinskia at gcc dot gnu dot org 2007-05-23 02:17 -------
Subject: Bug 31095
Author: pinskia
Date: Wed May 23 01:17:14 2007
New Revision: 124975
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124975
Log:
2007-05-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/31095
* builtins.c (expand_builtin_memmove_args): Strip nops that don't
change the type before looking for a COMPOUND_EXPR.
2007-05-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/31095
* gcc.c-torture/compile/bcopy-1.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/bcopy-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/builtins.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31095
^ permalink raw reply [flat|nested] 15+ messages in thread