* [Bug c++/30253] ice for legal code
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
@ 2006-12-18 17:10 ` dcb314 at hotmail dot com
2006-12-18 18:54 ` pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dcb314 at hotmail dot com @ 2006-12-18 17:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dcb314 at hotmail dot com 2006-12-18 17:10 -------
Created an attachment (id=12826)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12826&action=view)
gzipped C++ source code
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/30253] ice for legal code
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
2006-12-18 17:10 ` [Bug c++/30253] " dcb314 at hotmail dot com
@ 2006-12-18 18:54 ` pinskia at gcc dot gnu dot org
2006-12-18 19:02 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-18 18:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-12-18 18:54 -------
Reducing ...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/30253] ice for legal code
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
2006-12-18 17:10 ` [Bug c++/30253] " dcb314 at hotmail dot com
2006-12-18 18:54 ` pinskia at gcc dot gnu dot org
@ 2006-12-18 19:02 ` pinskia at gcc dot gnu dot org
2006-12-21 18:45 ` [Bug c++/30253] [4.3 Regression] ICE with statement expression inside a conditional pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-18 19:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-12-18 19:02 -------
Reduced testcase:
struct xpv {
int xpv_cur;
};
bool m_all_methods;
void f(bool a)
{
m_all_methods = ( a ? (({struct xpv *nxpv = 0;(nxpv->xpv_cur > 1 ); }) ? 1 :
0) :1);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/30253] [4.3 Regression] ICE with statement expression inside a conditional
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
` (2 preceding siblings ...)
2006-12-18 19:02 ` pinskia at gcc dot gnu dot org
@ 2006-12-21 18:45 ` pinskia at gcc dot gnu dot org
2006-12-21 19:55 ` dcb314 at hotmail dot com
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-21 18:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-12-21 18:45 -------
This was introduced between "4.3.0 20061202" and "4.3.0 20061220"
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC host triplet|x86_64-suse-gnu |
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2006-12-21 18:45:00
date| |
Summary|ice for legal code |[4.3 Regression] ICE with
| |statement expression inside
| |a conditional
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/30253] [4.3 Regression] ICE with statement expression inside a conditional
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
` (3 preceding siblings ...)
2006-12-21 18:45 ` [Bug c++/30253] [4.3 Regression] ICE with statement expression inside a conditional pinskia at gcc dot gnu dot org
@ 2006-12-21 19:55 ` dcb314 at hotmail dot com
2006-12-26 22:50 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dcb314 at hotmail dot com @ 2006-12-21 19:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dcb314 at hotmail dot com 2006-12-21 19:55 -------
(In reply to comment #4)
> This was introduced between "4.3.0 20061202" and "4.3.0 20061220"
Strange - is there a possible typo on the last date ?
I found snapshot 4.3-20061216 going wrong, so if the
last date is correct, we can reduce the interval
to 20061202 to 20061216.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/30253] [4.3 Regression] ICE with statement expression inside a conditional
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
` (4 preceding siblings ...)
2006-12-21 19:55 ` dcb314 at hotmail dot com
@ 2006-12-26 22:50 ` pinskia at gcc dot gnu dot org
2006-12-26 22:56 ` [Bug middle-end/30253] " pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-26 22:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-12-26 22:50 -------
This is obviously caused by the tuple changes.
I am trying to find a simple fix for this bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/30253] [4.3 Regression] ICE with statement expression inside a conditional
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
` (5 preceding siblings ...)
2006-12-26 22:50 ` pinskia at gcc dot gnu dot org
@ 2006-12-26 22:56 ` pinskia at gcc dot gnu dot org
2006-12-28 1:10 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-26 22:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2006-12-26 22:56 -------
Here is the patch which I am going to test in the new year:
Index: gimplify.c
===================================================================
--- gimplify.c (revision 120211)
+++ gimplify.c (working copy)
@@ -1013,8 +1013,9 @@
/* The wrapper is on the RHS of an assignment that we're pushing
down. */
gcc_assert (TREE_CODE (temp) == INIT_EXPR
- || TREE_CODE (temp) == MODIFY_EXPR);
- TREE_OPERAND (temp, 1) = *p;
+ || TREE_CODE (temp) == MODIFY_EXPR
+ || TREE_CODE (temp) == GIMPLE_MODIFY_STMT);
+ GENERIC_TREE_OPERAND (temp, 1) = *p;
*p = temp;
}
else
--
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
Component|c++ |middle-end
Last reconfirmed|2006-12-21 18:45:00 |2006-12-26 22:56:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/30253] [4.3 Regression] ICE with statement expression inside a conditional
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
` (6 preceding siblings ...)
2006-12-26 22:56 ` [Bug middle-end/30253] " pinskia at gcc dot gnu dot org
@ 2006-12-28 1:10 ` pinskia at gcc dot gnu dot org
2006-12-28 1:11 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-28 1:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gcc dot gnu dot org 2006-12-28 01:10 -------
*** Bug 30312 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gerald at pfeifer dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/30253] [4.3 Regression] ICE with statement expression inside a conditional
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
` (7 preceding siblings ...)
2006-12-28 1:10 ` pinskia at gcc dot gnu dot org
@ 2006-12-28 1:11 ` pinskia at gcc dot gnu dot org
2006-12-31 14:27 ` gerald at pfeifer dot com
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-28 1:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pinskia at gcc dot gnu dot org 2006-12-28 01:11 -------
Another Testcase (simplier):
#define f(x) ({ unsigned tmp=x; tmp; })
unsigned foo(unsigned x) {
return __builtin_constant_p(x) ? 0 : f(x);
}
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |blocker
Keywords| |build
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/30253] [4.3 Regression] ICE with statement expression inside a conditional
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
` (8 preceding siblings ...)
2006-12-28 1:11 ` pinskia at gcc dot gnu dot org
@ 2006-12-31 14:27 ` gerald at pfeifer dot com
2006-12-31 14:40 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: gerald at pfeifer dot com @ 2006-12-31 14:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from gerald at pfeifer dot com 2006-12-31 14:27 -------
(In reply to comment #9)
> Another Testcase (simplier):
> #define f(x) ({ unsigned tmp=x; tmp; })
>
> unsigned foo(unsigned x) {
> return __builtin_constant_p(x) ? 0 : f(x);
> }
Note that this small testcase of mine is destilled from FreeBSD's system
header. This bug causes bootstrap failure on all FreeBSD systems I am
aware of (which is why Andrew labeled this a blocker, I assume).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/30253] [4.3 Regression] ICE with statement expression inside a conditional
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
` (9 preceding siblings ...)
2006-12-31 14:27 ` gerald at pfeifer dot com
@ 2006-12-31 14:40 ` rguenth at gcc dot gnu dot org
2006-12-31 19:25 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-12-31 14:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from rguenth at gcc dot gnu dot org 2006-12-31 14:40 -------
The patch looks certainly obvious.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/30253] [4.3 Regression] ICE with statement expression inside a conditional
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
` (10 preceding siblings ...)
2006-12-31 14:40 ` rguenth at gcc dot gnu dot org
@ 2006-12-31 19:25 ` rguenth at gcc dot gnu dot org
2007-01-01 19:21 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-12-31 19:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2006-12-31 19:25 -------
Bootstrapped and tested on i686-pc-linux-gnu.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/30253] [4.3 Regression] ICE with statement expression inside a conditional
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
` (11 preceding siblings ...)
2006-12-31 19:25 ` rguenth at gcc dot gnu dot org
@ 2007-01-01 19:21 ` pinskia at gcc dot gnu dot org
2007-01-01 22:20 ` pinskia at gcc dot gnu dot org
2007-01-01 22:21 ` pinskia at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-01 19:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from pinskia at gcc dot gnu dot org 2007-01-01 19:21 -------
I am going to test this and then apply it as obvious once the testing is
finished.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/30253] [4.3 Regression] ICE with statement expression inside a conditional
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
` (12 preceding siblings ...)
2007-01-01 19:21 ` pinskia at gcc dot gnu dot org
@ 2007-01-01 22:20 ` pinskia at gcc dot gnu dot org
2007-01-01 22:21 ` pinskia at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-01 22:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from pinskia at gcc dot gnu dot org 2007-01-01 22:20 -------
Subject: Bug 30253
Author: pinskia
Date: Mon Jan 1 22:19:58 2007
New Revision: 120321
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120321
Log:
2007-01-01 Andrew Pinski <pinskia@gmail.com>
PR middle-end/30253
* gimplify (voidify_wrapper_expr): Update for
GIMPLIFY_MODIFY_STMT.
2007-01-01 Andrew Pinski <pinskia@gmail.com>
PR middle-end/30253
* gcc.c-torture/compile/statement-expression-1.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/statement-expression-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimplify.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30253
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/30253] [4.3 Regression] ICE with statement expression inside a conditional
2006-12-18 16:35 [Bug c++/30253] New: ice for legal code dcb314 at hotmail dot com
` (13 preceding siblings ...)
2007-01-01 22:20 ` pinskia at gcc dot gnu dot org
@ 2007-01-01 22:21 ` pinskia at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-01 22:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from pinskia at gcc dot gnu dot org 2007-01-01 22:21 -------
Fixed. Thanks both for the report.
--
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=30253
^ permalink raw reply [flat|nested] 16+ messages in thread