public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40780] New: [4.4/4.5 Regression] ICE in gimplify_conversion
@ 2009-07-16 23:49 jakub at gcc dot gnu dot org
2009-07-17 0:09 ` [Bug c++/40780] " jakub at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-07-16 23:49 UTC (permalink / raw)
To: gcc-bugs
template <class T1, typename T2, typename T3>
struct A
{
typedef T2 (T1::*m) (T3);
A (m) {}
};
struct B;
struct C
{
void foo (B *);
};
typedef A <C, void, B *> D;
typedef void (C::*E) (B *);
struct F;
typedef void (C::*G) (F);
D d ((E) (G) & C::foo);
ICEs with -m32:
rh511229.ii: In function 'void __static_initialization_and_destruction_0(int,
int)':
rh511229.ii:16:22: internal compiler error: tree check: expected class
'expression', have 'constant' (ptrmem_cst) in gimplify_conversion, at
gimplify.c:1831
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
The ICE started between r140129 and r140150.
--
Summary: [4.4/4.5 Regression] ICE in gimplify_conversion
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
GCC target triplet: i686-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40780
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/40780] [4.4/4.5 Regression] ICE in gimplify_conversion
2009-07-16 23:49 [Bug c++/40780] New: [4.4/4.5 Regression] ICE in gimplify_conversion jakub at gcc dot gnu dot org
@ 2009-07-17 0:09 ` jakub at gcc dot gnu dot org
2009-07-17 8:15 ` dodji at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-07-17 0:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2009-07-17 00:08 -------
r140145 in particular.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40780
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/40780] [4.4/4.5 Regression] ICE in gimplify_conversion
2009-07-16 23:49 [Bug c++/40780] New: [4.4/4.5 Regression] ICE in gimplify_conversion jakub at gcc dot gnu dot org
2009-07-17 0:09 ` [Bug c++/40780] " jakub at gcc dot gnu dot org
@ 2009-07-17 8:15 ` dodji at gcc dot gnu dot org
2009-07-17 8:42 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-07-17 8:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dodji at gcc dot gnu dot org 2009-07-17 08:15 -------
Richard, could you please have a look at this one ?
Thanks in advance :-)
--
dodji at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40780
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/40780] [4.4/4.5 Regression] ICE in gimplify_conversion
2009-07-16 23:49 [Bug c++/40780] New: [4.4/4.5 Regression] ICE in gimplify_conversion jakub at gcc dot gnu dot org
2009-07-17 0:09 ` [Bug c++/40780] " jakub at gcc dot gnu dot org
2009-07-17 8:15 ` dodji at gcc dot gnu dot org
@ 2009-07-17 8:42 ` jakub at gcc dot gnu dot org
2009-07-17 9:14 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-07-17 8:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2009-07-17 08:42 -------
I believe we should do:
--- gimplify.c.jj72009-07-08 11:28:03.000000000 +0200
+++ gimplify.c2009-07-17 10:40:56.000000000 +0200
@@ -1826,7 +1826,7 @@ gimplify_conversion (tree *expr_p)
/* If we have a conversion to a non-register type force the
use of a VIEW_CONVERT_EXPR instead. */
- if (!is_gimple_reg_type (TREE_TYPE (*expr_p)))
+ if (CONVERT_EXPR_P (*expr_p) && !is_gimple_reg_type (TREE_TYPE (*expr_p)))
*expr_p = fold_build1 (VIEW_CONVERT_EXPR, TREE_TYPE (*expr_p),
TREE_OPERAND (*expr_p, 0));
which fixes the testcase (see earlier ifs in gimplify_conversion which also
test CONVERT_EXPR_P (*expr_p), as each step might turn the conversion into
something different and blindly using TREE_OPERAND (*expr_p, 0) on something
that doesn't have operands is wrong.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-07-17 08:42:41
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40780
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/40780] [4.4/4.5 Regression] ICE in gimplify_conversion
2009-07-16 23:49 [Bug c++/40780] New: [4.4/4.5 Regression] ICE in gimplify_conversion jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-07-17 8:42 ` jakub at gcc dot gnu dot org
@ 2009-07-17 9:14 ` rguenth at gcc dot gnu dot org
2009-07-17 10:40 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-17 9:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2009-07-17 09:14 -------
Yes, looks obvious. Thus, the patch is ok if it bootstraps/tests.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40780
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/40780] [4.4/4.5 Regression] ICE in gimplify_conversion
2009-07-16 23:49 [Bug c++/40780] New: [4.4/4.5 Regression] ICE in gimplify_conversion jakub at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-07-17 9:14 ` rguenth at gcc dot gnu dot org
@ 2009-07-17 10:40 ` jakub at gcc dot gnu dot org
2009-07-17 10:46 ` jakub at gcc dot gnu dot org
2009-07-17 10:57 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-07-17 10:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jakub at gcc dot gnu dot org 2009-07-17 10:40 -------
Subject: Bug 40780
Author: jakub
Date: Fri Jul 17 10:40:09 2009
New Revision: 149740
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149740
Log:
PR c++/40780
* gimplify.c (gimplify_conversion): Don't change non-conversions into
VIEW_CONVERT_EXPR.
* g++.dg/template/ptrmem19.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/template/ptrmem19.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimplify.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40780
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/40780] [4.4/4.5 Regression] ICE in gimplify_conversion
2009-07-16 23:49 [Bug c++/40780] New: [4.4/4.5 Regression] ICE in gimplify_conversion jakub at gcc dot gnu dot org
` (4 preceding siblings ...)
2009-07-17 10:40 ` jakub at gcc dot gnu dot org
@ 2009-07-17 10:46 ` jakub at gcc dot gnu dot org
2009-07-17 10:57 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-07-17 10:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jakub at gcc dot gnu dot org 2009-07-17 10:46 -------
Subject: Bug 40780
Author: jakub
Date: Fri Jul 17 10:45:40 2009
New Revision: 149741
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149741
Log:
PR c++/40780
* gimplify.c (gimplify_conversion): Don't change non-conversions into
VIEW_CONVERT_EXPR.
* g++.dg/template/ptrmem19.C: New test.
Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/ptrmem19.C
Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/gimplify.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40780
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/40780] [4.4/4.5 Regression] ICE in gimplify_conversion
2009-07-16 23:49 [Bug c++/40780] New: [4.4/4.5 Regression] ICE in gimplify_conversion jakub at gcc dot gnu dot org
` (5 preceding siblings ...)
2009-07-17 10:46 ` jakub at gcc dot gnu dot org
@ 2009-07-17 10:57 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-07-17 10:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jakub at gcc dot gnu dot org 2009-07-17 10:57 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40780
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-07-17 10:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-16 23:49 [Bug c++/40780] New: [4.4/4.5 Regression] ICE in gimplify_conversion jakub at gcc dot gnu dot org
2009-07-17 0:09 ` [Bug c++/40780] " jakub at gcc dot gnu dot org
2009-07-17 8:15 ` dodji at gcc dot gnu dot org
2009-07-17 8:42 ` jakub at gcc dot gnu dot org
2009-07-17 9:14 ` rguenth at gcc dot gnu dot org
2009-07-17 10:40 ` jakub at gcc dot gnu dot org
2009-07-17 10:46 ` jakub at gcc dot gnu dot org
2009-07-17 10:57 ` jakub 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).